1. Scilab on Solaris 10
This has been tested with Scilab 4.0 & 4.1. Scilab has been compiled and installed on a solaris machine opteron-based (Sun V40z, quadri proc).
Solaris OS is no longer supported by the Scilab Consortium.
Requirements :
- Solaris 10 (or opensolaris)
Sun studio 11 (free tools) - http://developers.sun.com/sunstudio/
GNU packages from http://www.blastwave.org
The list of packages to be installed:
- SUNWgcc
- SUNWgccruntime
- SUNWaconf
- SUNWgnu-automake
- SUNWgnu-gettext
- SUNWant
- java-dev
- SUNWlxml
- SUNWtcl
- SUNWtk
- SUNWgettext
- SUNWgmake
- SUNWgm4
- SUNWgnu-libiconv
- SUNWxorg-headers
- SUNWocaml
- SUNWpcre
- SUNWncurses
- SUNWlxml
- SUNWgit
1.1. Installation of mandatory packages
/usr/sfw/bin/wget ftp://ftp.sunfreeware.com/pub/freeware/intel/10/xaw3d-1.5-sol10-intel-local.gz ftp://ftp.sunfreeware.com/pub/freeware/intel/10/ncurses-5.6-sol10-x86-local.gz ftp://ftp.sunfreeware.com/pub/freeware/intel/10/tcl-8.5a4-sol10-x86-local.gz ftp://ftp.sunfreeware.com/pub/freeware/intel/10/tk-8.5a4-sol10-x86-local.gz ftp://ftp.sunfreeware.com/pub/freeware/intel/10/pcre-7.1-sol10-x86-local.gz
gunzip *.gz
for file in *local; do pkgadd -d \$file; done
Pcre is not used in Scilab 4.X, but is mandatory in Scilab 5.
1.2. Compilation of Scilab 4.X
export PATH=\$PATH:/usr/ccs/bin/ (TO FIX)
export PATH=/opt/SUNWspro/bin/:\$PATH (TO FIX)
export LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH
./configure \ --with-tcl-include=/opt/csw/include --with-tcl-library=/opt/csw/lib \ --with-tk-include=/opt/csw/include --with-tk-library=/opt/csw/lib \ --without-pvm \ --prefix=/usr/local \ CC=cc \ CXX=CC \ F77=f77 \ LDFLAGS="-R/opt/csw/lib"
then modify Makefile.incl:
CC_LDFLAGS = -R/opt/csw/lib FC_LDFLAGS = -R/opt/csw/lib LD_LDFLAGS = -R/opt/csw/lib TCLTK_LIBS = -L/opt/csw/lib -R/opt/csw/lib -ltk8.4 -L/opt/csw/lib -R/opt/csw/lib -ltcl8.4 -ldl
in routines/scicos/evaluate_expr.c
--- /tmp/scilab-4.1/routines/scicos/evaluate_expr.c 2005-09-23 14:28:00.000000000 +0200 +++ routines/scicos/evaluate_expr.c 2007-01-08 13:30:27.179476000 +0100 @@ -6,6 +6,7 @@ #if defined(solaris) #include <ieeefp.h> +#undef isinf int isinf(double x) { return !finite(x) && x==x; } #endif #if defined(__alpha)
--- /tmp/scilab-4.1/scripts/scilab.g.in 2006-12-06 14:42:42.000000000 +0100 +++ scripts/scilab.g.in 2007-01-08 17:57:32.370783000 +0100 @@ -155,12 +155,12 @@ Postscript-Latex) wantedEpsName=$2.eps - newEps=$(echo $2 | cut -d . -f1).eps + newEps=`echo $2 | cut -d . -f1`.eps # move the file in case BEpsf will destroy it mv $newEps $newEps.scilab.temp 1> /dev/null 2>&1 wantedTexName=$2.tex - newTex=$(echo $2 | cut -d . -f1).tex # get the name created by Blatexpr + newTex=`echo $2 | cut -d . -f1`.tex # get the name created by Blatexpr # move the file in case BEpsf will destroy it mv $newTex $newTex.scilab.temp 1> /dev/null 2>&1
(But it's not sufficient, because a few errors persist)
/local/henry/scilab-4.1/bin/scilab: syntax error at line 158: `newEps=$' unexpected
And you have to modify also this file, and scripts/scilab.g to succeed.
Solution is given on comp.soft-sys.math.scilab: "bin/scilab file is generated by script/Makefile using script/scilab.g file and script/scilab.g is generated by configure using. So you need to execute configure again followed by make all..."
Here, you can do make:
make all | & tee MAKE.LOG
Before installing, verify that these GNU tools mandatory are in your path: "find install make tar xargs"
make -k install |& tee INSTALL.LOG
without -k, make failed because there is no disclean target in examples/mex-examples/cmex/ (no Makefile indeed)
The original text is available here : http://www.latp.univ-mrs.fr/~henry/doku.php?id=scilab.
2. FAQ
* When make is linking everything at the end, I get : {{{f90_dfr_ch /export/home/sylvestr/scilab/modules/io/.libs/libsciio.so f90_dfr_r8 /export/home/sylvestr/scilab/modules/io/.libs/libsciio.so f95_error_message_and_abort /export/home/sylvestr/scilab/modules/io/.libs/libsciio.so f90_open_access_f77compat /export/home/sylvestr/scilab/modules/core/.libs/libscicore.so anint /export/home/sylvestr/scilab/modules/elementaries_functions/.libs/libscielementaries_functions.so nintf /export/home/sylvestr/scilab/libs/lapack/.libs/libscilapack.so z_abs /export/home/sylvestr/scilab/modules/linear_algebra/.libs/libscilinear_algebra.so z_exp /export/home/sylvestr/scilab/modules/arnoldi/.libs/libsciarnoldi.so }}} It is because the linking if badly made. It should be done by the fortran compiler and not cc. An other solution would be to add the fortran lib. (need further investigations)
3. Other links
http://iremia.univ-reunion.fr/intranet/wiki/Wiki.jsp?page=ScilabSolaris