[scilab-Users] scilab 5.1.1 compilation under Solaris 10

Langella Raphael raphael.langella at steria.cnes.fr
Thu Aug 20 17:42:17 CEST 2009


> -----Message d'origine-----
> De : irf610 at gmail.com [mailto:irf610 at gmail.com] De la part de 
> Jonathan Blanchard
> Envoyé : jeudi 20 août 2009 16:06
> À : users at lists.scilab.org
> Objet : Re: [scilab-Users] scilab 5.1.1 compilation under Solaris 10
> 
> On Thu, Aug 20, 2009 at 4:44 AM, Langella 
> Raphael<raphael.langella at steria.cnes.fr> wrote:
> >> -----Message d'origine-----
> >> De : irf610 at gmail.com [mailto:irf610 at gmail.com] De la part de 
> >> Jonathan Blanchard Envoyé : mardi 18 août 2009 18:45 À : 
> >> users at lists.scilab.org Objet : Re: [scilab-Users] scilab 5.1.1 
> >> compilation under Solaris 10
> >>
> >> Hi,
> >>
> >> Sun Studio 12 won't work and you must use a very recent version of 
> >> gcc. Preferably 4.3.3 or 4.3.4.
> >>
> >> If you get any errors with GCC you can post them here.
> >>
> >> Jonathan Blanchard
> >
> > OK, so I've tried with gcc 4.3.3 under Solaris 9 (by the 
> way, it's Solaris/SPARC). I get this error:
> >
> > In file included from src/c/callDynamicGateway.c:16:
> > src/c/getdynamicdebuginfo.c:28:20: error: getopt.h: No such file or 
> > directory
> >
> > So, I've tried commenting this include and it works (I 
> think those functions are defined in unistd.h).
> > But then I get this error:
> >
> > src/c/mput.c:16:21: error: stdint.h: No such file or directory
> >
> > So I edited modules/fileio/src/c/mput.c and replaced 
> <stdint.h> with <inttypes.h>. I also had to do it with 
> mget.c, mputi.c and mgeti.c.
> >
> > Next, I get this error:
> >
> > src/c/evaluate_expr.c: In function 'evaluate_expr':
> > src/c/evaluate_expr.c:517: error: expected expression 
> before 'return'
> >
> > isnan and isint aren't defined in math.h under Solaris 9.
> >
> > So I edited modules/scicos_blocks/src/c/evaluate_expr.c :
> > After:
> > #ifndef max
> > #define max(a,b) ((a) >= (b) ? (a) : (b)) #endif
> >
> > I added:
> > # define isnan(x) \
> >        (sizeof (x) == sizeof (long double) ? isnan_ld (x) \
> >        : sizeof (x) == sizeof (double) ? isnan_d (x) \
> >        : isnan_f (x))
> > static inline int isnan_f  (float       x) { return x != x; 
> } static 
> > inline int isnan_d  (double      x) { return x != x; } 
> static inline 
> > int isnan_ld (long double x) { return x != x; }
> >
> > # define isinf(x) \
> >        (sizeof (x) == sizeof (long double) ? isinf_ld (x) \
> >        : sizeof (x) == sizeof (double) ? isinf_d (x) \
> >        : isinf_f (x))
> > static inline int isinf_f  (float       x) { return isnan 
> (x - x); } 
> > static inline int isinf_d  (double      x) { return isnan 
> (x - x); } 
> > static inline int isinf_ld (long double x) { return isnan (x - x); }
> >
> >
> > The last file (scilab-bin) fails with this error:
> >
> > Undefined                       first referenced
> >  symbol                             in file 
> > libintl_bind_textdomain_codeset     
> > 
> /Produits/tmp/rla/Sol9/scilab-5.1.1/modules/localization/.libs/libscil
> > ocalization.so libintl_gettext                     
> > 
> /Produits/tmp/rla/Sol9/scilab-5.1.1/modules/graphic_export/.libs/libsc
> > igraphic_export.so libintl_textdomain                  
> > 
> /Produits/tmp/rla/Sol9/scilab-5.1.1/modules/localization/.libs/libscil
> > ocalization.so libiconv_close                      
> > 
> /Produits/tmp/rla/Sol9/scilab-5.1.1/modules/localization/.libs/libscil
> > ocalization.so libiconv_open                       
> > 
> /Produits/tmp/rla/Sol9/scilab-5.1.1/modules/localization/.libs/libscil
> > ocalization.so libintl_bindtextdomain              
> > 
> /Produits/tmp/rla/Sol9/scilab-5.1.1/modules/localization/.libs/libscil
> > ocalization.so libintl_dgettext                    
> > 
> /Produits/tmp/rla/Sol9/scilab-5.1.1/modules/localization/.libs/libscil
> > ocalization.so
> > ld: fatal: Symbol referencing errors. No output written to 
> > .libs/scilab-bin
> >
> > The command line is missing -lintl and -liconv. I've added 
> it to LDFLAGS, rerun configure and it works.
> >
> > Next, I get this error:
> > ./bin/scilab -ns -nwni -f 
> > modules/functions/scripts/buildmacros/buildmacros.sce
> > Could not find the Java configuration for the model 
> <sun4u>. Please contact us.
> > ld.so.1: scilab-bin: fatal: libjava.so: open failed: No 
> such file or 
> > directory Killed
> >
> > uname -m returns sun4u and not sparc. I've corrected the 
> scilab scripts so it recognize sun4u. I've rerun gmake, it works!
> >
> > But make install fails:
> >
> > /bin/bash: -c: line 1: syntax error near unexpected token `;'
> > /bin/bash: -c: line 1: `echo "-------- Install macros (if 
> any) --------";  for dir in macros/  ; do  /bin/bash 
> /Produits/tmp/rla/Sol9/scilab-5.1.1/config/install-sh -d 
> /Produits/publics/sparc.SunOS.5.9/scilab/5.1.1/share/scilab/mo
> dules/blas/$dir &&  if test -d ./$dir/; then  
> FILELIST="./$dir/*.sci ./$dir/*.bin ./$dir/*.sce ./$dir/names 
> ./$dir/lib"; for specialExt in ; do  
> specialExtDir="$specialExtDir ./$dir/$specialExt";  done;  
> FILELIST="$FILELIST $specialExtDir";  for file in `ls -1 
> $FILELIST 2>/dev/null`; do  echo 
> "/Produits/publics/sparc.SunOS.5.9/bin/install -c -m 644 
> $file 
> /Produits/publics/sparc.SunOS.5.9/scilab/5.1.1/share/scilab/mo
> dules/blas/$dir" ;  
> /Produits/publics/sparc.SunOS.5.9/bin/install -c -m 644 
> "$file" 
> /Produits/publics/sparc.SunOS.5.9/scilab/5.1.1/share/scilab/mo
> dules/blas/$dir ;  done;  fi;  done'
> >
> > I'm not sure what's wrong here.
> >
> > By the way, is Solaris/SPARC a supported plateform?
> >
> > Raphaël Langella
> >
> 
> Well SPARC was a supported platform way back for Scilab 4. It 
> still builds but I seriously doubt you can make it work for Solaris 9.
> 
> As a pointer though you might want to add -Dsolaris -Dsun to 
> the compiler flags for all three of C,C++ and FF compiler. I 
> use something like this :
> 
> export CFLAGS="-Dsolaris -Dsun"
> export CPPFLAGS="-Dsolaris -Dsun"
> export FFLAGS="-Dsolaris -Dsun"
> 
> This should fix at least the isnan and stuff.

Well, I tried setting those variables, but it didn't fix the isnan/isint, nor any of the other problem I had.



More information about the users mailing list