[Contents] [TitleIndex] [WordIndex

How to compile Scilab 5.X ?

Scilab is compilable with many compilers on many platforms.

Scilab can be compiled with. For the C language :

For fortran :

# Note that the target 'all' is not building the localization except if you enable the option "--enable-build-localization" in the configure
make all 
make install

You will also need other dependencies to build. See Dependencies of Scilab 5.X.

Install dependencies under Ubuntu / Debian

It is pretty easy to install all the build dependencies quickly under Ubuntu and Debian. Starting with Ubuntu (>= 9.4) and with Debian (>= Squeeze), the following command will install all the build dependencies of Scilab:

$ apt-get build-dep scilab

It should print a message like:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  ant ant-gcj ant-optional ant-optional-gcj antlr ca-certificates-java cdbs chrpath docbook-xsl docbook-xsl-doc-html fdupes fop gcj-4.3-base icedtea-6-jre-cacao intltool java-wrappers javahelp2
  libaccess-bridge-java libantlr-java libantlr-java-gcj libavalon-framework-java libbatik-java libbsf-java libcommons-io-java libcommons-logging-java libflexdock-java libflexdock-jni libgcj-bc
  libgcj-common libgcj9-0 libgcj9-jar libice-dev libjaxp1.3-java libjaxp1.3-java-gcj libjeuclid-core-java libjgoodies-looks-java libjogl-java libjogl-jni libjrosetta-java liblaf-plugin-java
  libpvm3 libreadline5-dev libsaxon-java libservlet2.3-java libskinlf-java libsm-dev libxalan2-java libxalan2-java-gcj libxerces2-java libxerces2-java-gcj libxml-commons-external-java
  libxmlgraphics-commons-java libxt-dev openjdk-6-jdk openjdk-6-jre openjdk-6-jre-headless openjdk-6-jre-lib pvm pvm-dev rhino ttf-bengali-fonts ttf-kannada-fonts ttf-oriya-fonts ttf-telugu-fonts
  ttf-wqy-zenhei tzdata-java
0 upgraded, 66 newly installed, 0 to remove and 0 not upgraded.
Need to get 104MB of archives.
After this operation, 271MB of additional disk space will be used.
Do you want to continue [Y/n]? 

If you want to build the Ubuntu/Debian packages, try

$ apt-get source scilab
$ cd scilab-*
$ dpkg-buildpackage 

Install dependencies under OpenSUSE >= 11.1

# Add the education repository
$ zypper si --build-deps-only scilab

Compilation with LLVM / clang

Due to a bug in clang++, it is not possible to fully compile Scilab with LLVM & clang. However, with an option, Scilab can be used in NW & NWNI modes.

./configure --without-gui --without-openmp CC=clang CXX=clang
make LDFLAGS="-lstdc++"

Compilation under CentOS

This process (tested on CentOS 5.10) works with nightly-builds sources of Scilab 5.5 branch and more recent versions.

Install recent Ocaml compiler:

wget http://caml.inria.fr/pub/distrib/ocaml-4.01/ocaml-$OCAML_VERSION.tar.gz
tar -zxf ocaml-$OCAML_VERSION.tar.gz
./configure "$@" -prefix $HOME/ocaml/
make world bootstrap opt
make install
cd -

Do not forget to add $HOME/ocaml/bin/ to your PATH variable.

Get prerequirements:

Extract prerequirements in source tree.

Configure options:

./configure \
--with-jdk=`pwd`/java/jdk/ \
--with-ant=`pwd`/java/ant/bin/ \
--with-libxml2=`pwd`/usr/ \
--with-tcl-include=`pwd`/usr/include/ \
--with-tcl-library=`pwd`/usr/lib/ \
--with-matio-include=`pwd`/usr/include/ \
--with-hdf5-include=`pwd`/usr/include/ \
CFLAGS="-I`pwd`/usr/include/" \
LDFLAGS="-L`pwd`/usr/lib/" \
PATH=`pwd`/usr/bin/:$PATH \

To enable MPI features, add --with-mpi to configure options.

To compile with optimized libraries such as ATLAS, please use --with-atlas=<PATH> configure option.


LD_LIBRARY_PATH=`pwd`/lib/thirdparty/:$LD_LIBRARY_PATH make

Compile/regenerate by element

It is possible to compile element by elements.


make macros


make doc

Unitary/non regression tests

make check


make localization

Configure options

./configure has many options. By default (from Scilab 5.1.0), the default behavior is to enable all options and allow the deactivation of the non-mandatory features. The most useful are :

See also Description of configure options for more information


If you want to compile Scilab with gcj (GNU compiler for Java) - not functional at the moment - , you can call the configure:

./configure --with-jdk=/usr/lib/jvm/java-gcj


export JAVA_HOME=/usr/lib/jvm/java-gcj

If you want to regenerate the Makefiles without redoing the long ./configure, call the command config.status in the root directory:



See Dependencies of Scilab 5.X

How to compile just a module ?

Go into the directory of the module and type make.

For example, if you want to rebuild the module boolean, this will do :

cd modules/boolean

To rebuild the macros of a module :

make macros

To clean the macros of a module :

make clean-macros

To rebuild the Java code of a module :

make java

To regenerate the swig wrapper files of a module (--with-swig-generation is needed in the ./configure)

make swig

To regenerate the giws wrapper files of a module (--with-giws-generation is needed in the ./configure)

make giws

Libraries are generated in the hidden directory .libs/ and the version is in the name of the library (for example, in Scilab 5.0, the module/lib core is named libscicore.so.5.0.0).

How does it work ?

What about localization ?

Dynamic/Incremental Link

Example (TO be developed and commented)

files = ['npend.o','np.o','ener.o','dlslv.o' ];



See Compiling Scilab 5.x under GNU-Linux Unix - FAQ

2022-09-08 09:26