On Thu, Jul 14, 2011 at 6:54 PM, Philipp Marek <phil...@marek.priv.at>wrote:

> - the ECL binary in build/bin/ecl references a libecl.so.11.1 - but the
> compiled
>  so is named libecl.so.
>  I know that ldconfig would make the symlinks in /usr/lib/; but for testing
> with
>  LD_LIBRARY_PATH=$PWD/build build/bin/ecl a symlink in build/ is needed,
> too.
>  Perhaps that could be added in the Makefile.


I have been testing this. ECL uses rpath to hardcode the location of the
shared library. Even if we make the symlinks, the shared library loader is
_always_ going to look in the hardcoded locations and not respect your
LD_LIBRARY_PATH. After all, this is the whole point of rpath, isn't it?

See below how ldd resolves the library references to the hardcoded path and
not to the current directory, even if there is a libecl.so.11.1 there.

jjgarcia@quinfog:~/build/ecl$ ls -l libecl*so*
lrwxrwxrwx 1 jjgarcia jjgarcia      16 2011-08-03 22:19 libecl.so ->
libecl.so.11.1.1
lrwxrwxrwx 1 jjgarcia jjgarcia      16 2011-08-03 22:19 libecl.so.11 ->
libecl.so.11.1.1
lrwxrwxrwx 1 jjgarcia jjgarcia      16 2011-08-03 22:18 libecl.so.11.1 ->
libecl.so.11.1.1
-rwxr-xr-x 1 jjgarcia jjgarcia 9391342 2011-08-01 00:18 libecl.so.11.1.1
jjgarcia@quinfog:~/build/ecl$ LD_LIBRARY_PATH=`pwd` ldd bin/ecl
linux-vdso.so.1 =>  (0x00007fff8d3a1000)
 libecl.so.11.1 => /home/jjgarcia/lib/libecl.so.11.1 (0x00007faaf99c9000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
(0x00007faaf9785000)
 libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007faaf9580000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007faaf92fb000)
 libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007faaf8f67000)
libgmp.so.3 => /usr/lib/libgmp.so.3 (0x00007faaf8d09000)
 libffi.so.5 => /usr/lib/libffi.so.5 (0x00007faaf8b01000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007faaf88eb000)
 /lib64/ld-linux-x86-64.so.2 (0x00007faaf9f18000)


-- 
Instituto de FĂ­sica Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Ecls-list mailing list
Ecls-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list

Reply via email to