On Wed, Oct 09, 2013 at 11:52:19PM +0200, Alan McKinnon wrote:
> On 09/10/2013 23:41, José Romildo Malaquias wrote:
> > Hello.
> > 
> > I have installed the *binary distribution of scilab* available form its
> > download page.
> > 
> > About two months ago, I was using it without problems.
> > 
> > Now it does not work anymore. Running the binary gives the following
> > error message:
> > 
> > $ /alt/scilab-5.4.1/bin/scilab
> > scilab-bin: /alt/scilab-5.4.1/lib/thirdparty/libz.so.1: version 
> > `ZLIB_1.2.3.4' not found (required by /usr/lib64/libpng16.so.16)
> > 
> > I need helping understanding this message and fixing this issue on my
> > ~amd64 system.
> 
> libpng16 is a library you already have on your system (not bundled with
> scilab). And strangely, this *system* library is complaining that it
> can't find the correct version of libz. These libs have names (sonames)
> so you can tell different versions apart and use the right one.
> 
> But the system libpng has no business trying to use a third party app
> under any circumstances. And in fact in regular use it doesn't, see mine:
> 
> $ ldd /usr/lib64/libpng16.so.16
>         linux-vdso.so.1 (0x00007fff7d79a000)
>         libz.so.1 => /lib64/libz.so.1 (0x00007ff9ad6ab000)
>         libm.so.6 => /lib64/libm.so.6 (0x00007ff9ad3b5000)
>         libc.so.6 => /lib64/libc.so.6 (0x00007ff9ad00a000)
>         /lib64/ld-linux-x86-64.so.2 (0x00007ff9adb3c000)
> 
> See? system libpng uses system libz.
> 
> How does this happen? Easy. The authors of scilab are probably fiddling
> with LD_LIBRARY_PATH, which just happens to be one of the more dangerous
> things you can do in Unix.
> 
> Go find the startup script for scilab and edit the mods to
> LD_LIBRARY_PATH to put the scilab directory at the end (not the
> beginning where it is now)

In fact the startup script for scilab sets LD_LIBRARY_PATH. Running it
in verbose modes gives this information:

$ SCIVERBOSE=1 /alt/scilab-5.4.1/bin/scilab
SCILABBIN : scilab-bin
DISABLE_JAVA_DETECTION : 0
SCILAB_MODE : gui
OS : Linux
MODEL : x86_64
IS_SCILAB_BINARY : 1
SCI : /alt/scilab-5.4.1/share/scilab
SCIBIN : 
PATH : 
/alt/scilab-5.4.1/bin:/home/romildo/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.1:/usr/games/bin:/opt/vmware/bin:/alt/scilab-5.4.1/share/scilab/modules/scicos/
CLASSPATH : 
/alt/scilab-5.4.1/share/scilab/modules/core/jar/org.scilab.modules.core.jar
LD_LIBRARY_PATH : 
/alt/scilab-5.4.1/thirdparty/java//lib/amd64/:/alt/scilab-5.4.1/thirdparty/java//lib/amd64/server/:/alt/scilab-5.4.1/thirdparty/java//lib/amd64/native_threads/:/alt/scilab-5.4.1/lib/scilab:/alt/scilab-5.4.1/lib/thirdparty:/alt/scilab-5.4.1/share/scilab/bin:/alt/scilab-5.4.1/share/scilab/lib/scilab/:/alt/scilab-5.4.1/share/scilab/lib64/scilab/:.
scilab-bin: /alt/scilab-5.4.1/lib/thirdparty/libz.so.1: version `ZLIB_1.2.3.4' 
not found (required by /usr/lib64/libpng16.so.16)

I will try to modify the script to put the scilab directory at the end.

Romildo

Reply via email to