Compiling Scilab 5.x under GNU-Linux Unix - FAQ
- I want to improve the speed of the Scilab compilation, what should I do ?
- I made a change in a library and it relinked other libraries, why that ?
- When I try to regenerate Makefile.in and/or configure, I got a few warnings
- I get this error when I am compiling lapack.
- I get this problem when I try to compile with Intel compiler. What the hell is that ?
- When I compile Scilab, I get a ''undefined versioned symbol name _LIB_VERSION@@GLIBC_2.0''
- Some packages are missing when I compile Scilab console module. Where can I find them ?
- I compiled Scilab once but since I updated, it is complaining about a missing file
- Compilation of Scilab against Tcl/Tk 8.5 stops with an error when building macros
- I compiled Scilab successfully but I get an error during startup
- I get a long Java warning on startup but Scilab is working
- I have some weird undefined reference to some gfortran stuff
- I want to compile Scilab without Java
- Could you explain the options of the Scilab configure ?
- When I plot a function in Scilab the plot produces a blank window. How do I fix this?
- I get the message "Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-6-openjdk/jre/lib/ext/libjava-access-bridge-jni.so" on startup
- I get tonnes of "undefined reference to" at the final link of Scilab binary
- My ATLAS library is installed in a non-standard directory. How do I configure scilab ?
- Building the documentation leads to an error about a valid primitive ?
- Using the dynamic link, I am getting "ignoring unknown tag F77"
- On startup, I get 'Document is empty'
- I have been playing with Java 7 and coming back to version 6 fails
- How can I reproduce Scilab started with stdin closed
- On startup, I get Glib-ERROR on gmem.c
- Icons and Mimetypes user installation
- See Also
Compiling Scilab 5.x under GNU-Linux Unix - FAQ
I want to improve the speed of the Scilab compilation, what should I do ?
By using parallel build
Try the command:
where x is the number of concurrent build tasks (don't set a big number, this could overload your computer).
By using ccache
Use ccache, http://ccache.samba.org/ For this, install ccache and launch the configure with the options:
./configure CC="ccache gcc" CXX="ccache g++"
(we have report that CXX sometimes does not work under Fedora, just removed it)
Some quick benchmarks show an improvement of about 30% of the compilation's length.
I made a change in a library and it relinked other libraries, why that ?
There are dependencies between libraries. If the compilation process detects that the library which it depends on has changed, it will recompile. It is done because a symbol (ex : function name) may have been changed and this could lead to an undefined symbol.
When I try to regenerate Makefile.in and/or configure, I got a few warnings
If you have something like :
libs/lapack/Makefile.am:295: user target `libdummy_lapack_la-dlamch.lo' defined here... /usr/share/automake-1.9/am/depend2.am: ... overrides Automake target `libdummy_lapack_la-dlamch.lo' defined here
It is (unfortunately) normal. We have to override compilation flags in order to deactivate optimization for a few files...
I get this error when I am compiling lapack.
xerbla.o(.text+0x3a): undefined reference to `for_write_seq_fmt' xerbla.o(.text+0x57): undefined reference to `for_write_seq_fmt_xmit' xerbla.o(.text+0x6b): undefined reference to `for_stop_core'
How can I fix it ?
This may come from the fact that you may have tried to compile scilab with an Intel Compiler and then switch to a GNU compiler. (difference between lib included or not).
I get this problem when I try to compile with Intel compiler. What the hell is that ?
ifort: Command line warning: ignoring unknown option '-relax' ifort: Command line warning: ignoring unknown option '-soname' IPO link: can not find "libblas.so.0" ifort: error: problem during multi-file optimization compilation (code 1)
Some version of libtool have problem with Intel compilers. Try a more recent version (or the CVS one). Caution : you shouldn't have this error unless you are altering configure.ac or Makefile.am
When I compile Scilab, I get a ''undefined versioned symbol name _LIB_VERSION@@GLIBC_2.0''
This is a crappy problem on some version of the glibc. Usually, -lieee have to place prior to -lm during the linking. See : http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=51267 As libtool compute automatically the order of loading of library, it is hard to change it. Please consider update your version of the glibc.
Some packages are missing when I compile Scilab console module. Where can I find them ?
All needed packages to compile Scilab under Linux can be found in Scilab SVN pre-requirements directory:
mkdir Prerequirements cd Prerequirements svn co --username anonymous --password Scilab svn://svn.scilab.org/scilab/trunk/Dev-Tools/SE/Prerequirements/linux/
So, to download scilab and the prerequirements packages :
git clone git://git.scilab.org/scilab scilab.sources svn export --force --username anonymous --password Scilab svn://svn.scilab.org/scilab/trunk/Dev-Tools/SE/Prerequirements/linux/bin scilab.sources/scilab/bin svn export --force --username anonymous --password Scilab svn://svn.scilab.org/scilab/trunk/Dev-Tools/SE/Prerequirements/linux/thirdparty scilab.sources/scilab/thirdparty
Note : up to the 5.4.1 version, the repo was Linux for 32 bits, linux_x64 for 64 bits. Since then it has been changed to linux and linux_x64
I compiled Scilab once but since I updated, it is complaining about a missing file
If it looks like (case A):
make: Leaving directory `/home/user/scilab/trunk/scilab/modules/console' Making all in renderer make: Entering directory `/home/user/scilab/trunk/scilab/modules/renderer' make: *** No rule to make target `src/cpp/GraphicSynchronization/GraphicSynchronizerJava.cpp', needed by `libscirenderer_la-GraphicSynchronizerJava.lo'. Stop. make: Leaving directory `/home/user/scilab/trunk/scilab/modules/renderer' make: *** [all-recursive] Error 1 make: Leaving directory `/home/user/scilab/trunk/scilab/modules' make: *** [all-recursive] Error 1
or with Scilab binary (case B):
make: Entering directory `/home/user/ProjetScilab/GIT-master/scilab/scilab' make: *** No rule to make target `modules/shell/src/c/others/mainscic.c', needed by `scilab_bin-mainscic.o'. Stop. make: Leaving directory `/home/user/ProjetScilab/GIT-master/scilab/scilab' make: *** [all-recursive] Error 1
It is a problem of the autotools which do not rebuild the dependencies correctly. In case A, please do
cd modules/<module>/ rm .deps/* cd - ./configure <your option> make
It should fix this problem.
In case B, please do:
rm -rf .deps/ ./configure <your option> make
Compilation of Scilab against Tcl/Tk 8.5 stops with an error when building macros
Typical output is:
./bin/scilab -ns -nwni -f modules/functions/scripts/buildmacros/buildmacros.sce /home/user/Scilab/trunk/scilab/.libs/lt-scilab-bin: error while loading shared libraries: libtk8.5.so: cannot open shared object file: No such file or directory make: [macros] Erreur 127 (ignorée) make: quittant le répertoire « /home/user/Scilab/trunk/scilab »
The workaround is to:
and start again. This problem happens for instance with KUbuntu 7.10 (Gutsy Gibbon) and OpenSuse 10.3 as well.
I compiled Scilab successfully but I get an error during startup
If it looks like :
lt-scilab-bin: xcb_xlib.c:52: xcb_xlib_unlock: l'assertion « c->xlib.lock » a échoué. ./bin/scilab: line 378: 17254 Abandon "$SCILABBIN" $*
then you can work around it by doing:
and launch Scilab again. This problem happens for instance with openSuse 10.3. More information
I get a long Java warning on startup but Scilab is working
It is the same issue as the previous one (lib XCB).
Locking assertion failure. Backtrace: #0 /usr/lib/libxcb-xlib.so.0 [0xb5069767] #1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_lock+0x2e) [0xb506981e] #2 /usr/lib/libX11.so.6 [0xb5170518] #3 /usr/lib/libX11.so.6(XGetVisualInfo+0x26) [0xb51670a6] #4 /usr/lib/jvm/java-1.5.0-sun-188.8.131.52/jre/lib/i386/xawt/libmawt.so [0x767650b9] #5 /usr/lib/jvm/java-1.5.0-sun-184.108.40.206/jre/lib/i386/xawt/libmawt.so [0x76765303] #6 /usr/lib/jvm/java-1.5.0-sun-220.127.116.11/jre/lib/i386/xawt/libmawt.so [0x76765fa1] #7 /usr/lib/jvm/java-1.5.0-sun-18.104.22.168/jre/lib/i386/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0x26) [0x76766136] [...] #12 /usr/lib/jvm/java-1.5.0-sun/jre/lib/i386/server/libjvm.so [0xb5a90eac] #13 /usr/lib/jvm/java-1.5.0-sun/jre/lib/i386/server/libjvm.so [0xb5c60aa8] #14 /usr/lib/jvm/java-1.5.0-sun/jre/lib/i386/server/libjvm.so [0xb5a90cdf] #15 /usr/lib/jvm/java-1.5.0-sun/jre/lib/i386/server/libjvm.so(JVM_DoPrivileged+0x32d) [0xb5aee7ed] #16 /usr/lib/jvm/java-1.5.0-sun/jre/lib/i386/libjava.so(Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2+0x3d) [0xb621f30d] [...]
The very crappy fix is:
sudo sed -i 's/XINERAMA/FAKEEXTN/g' /usr/lib/jvm/java-1.5.0-sun/jre/lib/i386/xawt/libmawt.so
I have some weird undefined reference to some gfortran stuff
If you have some errors like:
SCI/modules/io/.libs/libsciio.so: undefined reference to `_gfortran_internal_malloc'
It is probably because you update some of your compilers. make clean in the module should fix the issue.
I want to compile Scilab without Java
Please not that you won't have the Scilab GUI and the Scilab-Java API/Connector.
To do that, add the three options: --without-gui --without-javasci --disable-build-help to the ./configure
See also: Description of configure options
Could you explain the options of the Scilab configure ?
When I plot a function in Scilab the plot produces a blank window. How do I fix this?
You may see an error like:
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no gluegen-rt in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at com.sun.gluegen.runtime.NativeLibLoader.loadLibraryInternal(NativeLibLoader..java:102) at com.sun.gluegen.runtime.NativeLibLoader.access $000(NativeLibLoader.java:51)
The problem is twofold. The shared library libgluengen-rt.so cannot be found or the gluegen-rt.jar, jogl.jar class libraries cannot be found either. Make the three dynamic libraries (libgluegen-rt.so, libjogl.so, libjogl_awt.so) available in the LD_LIBRARY_PATH or place them in the java platform directory, like /path/to/the/jdk1.xxx/jre/lib/amd64 if you are running x86_64 linux or /path/to/the/jdk1.xxx/jre/lib/i386 if you are running i386 linux (32bit) or where ever your java runtime environment is. The jogl*.so libraries are the Java OpenGL libraries for grapjics.
Also update the SCI/etc/classpath.xml file and update the path to gluegen-rt.jar or jogl.jar or place both jar libraries in the java extension directory like /path/to/the/jdk1.xxx/jre/lib/ext for my version of Java. By doing this you do not have to include them in the CLASSPATH.
I get the message "Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-6-openjdk/jre/lib/ext/libjava-access-bridge-jni.so" on startup
This problem is related to a packaging issue of the JVM under Debian (and maybe Ubuntu) in the version 6b14-1.5~pre1-5 (at least). Update your JVM (for example, version 6b16-4 will work).
I get tonnes of "undefined reference to" at the final link of Scilab binary
If you can some error messages like:
./modules/core/.libs/libscicore.so: undefined reference to `zzledt_' /home/xxx/scilab/src/scilab-5.2.2/modules/elementary_functions/.libs/libscielementary_functions.so: undefined reference to `shrslv_' ./modules/core/.libs/libscicore.so: undefined reference to `setprlev_' ./modules/core/.libs/libscicore.so: undefined reference to `cbool_' ./modules/core/.libs/libscicore.so: undefined reference to `gw_gui' ./modules/core/.libs/libscicore.so: undefined reference to `withfftw_' [...] /home/xxx/scilab/src/scilab-5.2.2/modules/output_stream/.libs/libscioutput_stream.so: undefined reference to `linesmore' collect2: ld returned 1 exit status make: *** [scilab-bin] Error 1 make: Leaving directory `/home/tom/scilab/src/scilab-5.2.2' make: *** [all-recursive] Error 1 Aborting...
Try to remove the argument -Wl,--as-needed which is probably causing this error.
My ATLAS library is installed in a non-standard directory. How do I configure scilab ?
You just need to customize your LDFLAGS variable to add the path to ATLAS. For example, if your ATLAS library is in /usr/lib64/atlas (like under mandriva/fedora 64 bits):
./configure [some options] LDFLAGS="-L/usr/lib64/atlas"
./configure [some options] --with-blas-library=/usr/lib64/atlas --with-lapack-library=/usr/lib64/atlas"
This command will allow configure to detect automatically that you have an ATLAS library.
Building the documentation leads to an error about a valid primitive ?
If the error is
Building the Scilab manual master document for en_US. Building the scilab manual file [javaHelp] !--error 999 Error: Not a valid primitive ID 2. at line 500 of function xmltoformat called by : at line 15 of function xmltojar called by : exec('SCI/etc/scilab.start',-1);;xmltojar(,,'en_US');exit;;
It is likely that Scilab is loading a wrong library.
This occurs if you are build Scilab and there is already a packaged Scilab installed.
Using the dynamic link, I am getting "ignoring unknown tag F77"
Usually, this is because the dynamic link is not able to find a Fortran compiler. Try to install one.
On startup, I get 'Document is empty'
I start Scilab but I am getting:
[user@hostname ~]$ scilab I/O error : No such file or directory /usr/share/scilab//etc/modules.xml:1: parser error : Document is empty ^ /usr/share/scilab//etc/modules.xml:1: parser error : Start tag expected, '<' not found ^ I/O error : No such file or directory /usr/share/scilab//etc/modules.xml:1: parser error : Document is empty ^ /usr/share/scilab//etc/modules.xml:1: parser error : Start tag expected, '<' not found ^ /usr/bin/scilab : ligne 547 : 29714 Erreur de segmentation "$SCILABBIN" "$@"
This problem occurred under Mandriva and Mageia. It was due to a bug of Tcl package. It was shipping it own buggy zlib. This zlib was using by libxml2 creating this issue.
I have been playing with Java 7 and coming back to version 6 fails
If you are getting the following error, that mean that Scilab could not load the jar tree. It can come from many reasons.
Some problems during the loading of the Java libraries occured. This could lead to inconsistent behaviours. Please check SCI/etc/classpath.xml. Could not access to the Main Scilab Class: Exception in thread "main" java.lang.NoClassDefFoundError: org/scilab/modules/core/Scilab Caused by: java.lang.ClassNotFoundException: org.scilab.modules.core.Scilab at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) Scilab cannot create Scilab Java Main-Class (we have not been able to find the main Scilab class. Check if the Scilab and thirdparty packages are available).
If you are editing etc/jvm_options.xml to add $SCILAB/modules/core/jar/org.scilab.modules.core.jar in it, you might get:
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/scilab/modules/core/Scilab : Unsupported major.minor version 51.0
It should be fixed within the Scilab build system by target="6" in the build.incl.xml files.
How can I reproduce Scilab started with stdin closed
exec 0>&- && scilab-adv-cli -e "foo()"
On startup, I get Glib-ERROR on gmem.c
On KDE the qt-gtk2 Oxygen style engine is buggy. Changing the QT-GTK theme engine to another one fix this issue.
$ scilab (scilab-bin:28866): GLib-WARNING **: unknown option bit(s) set (scilab-bin:28866): GLib-CRITICAL **: g_regex_match_full: assertion 'regex != NULL' failed (scilab-bin:28866): GLib-ERROR **: gmem.c:110: failed to allocate 18446744072984846897 bytes
Icons and Mimetypes user installation
# Register Scilab application mkdir -p ~/.local/share/applications/ cp $SCI/desktop/scilab.desktop ~/.local/share/applications/ # Register Scilab mimetypes mkdir -p ~/.local/share/mime/packages/ cp -a $SCI/desktop/scilab.xml ~/.local/share/mime/packages/ update-mime-database ~/.local/share/mime/ # Register Scilab icons (application and mimetypes) mkdir -p ~/.local/share/icons/hicolor/ cp -a $SCI/desktop/images/icons/* ~/.local/share/icons/hicolor/
howto/install/linux for the basic compiling instructions.