STR-125: Stand-alone strc uses dynamisc linking of statego and stratego-lib, but doesnt include their path
—————————————————————-
martin@logistico:~> strc -i foo.str
compiling foo.str
front-end succeeded: user 3.63 system 0.51
optimization succeeded: user 0.07 system 0.30
back-end succeeded: user 0.08 system 0.15
C compilation succeeded: user 0.08 system 0.04
—–
compilation succeeded: user 3.86 system 1.01martin@logistico:~> ls -l foo
-rwxr-xr-x 1 martin users 99585 2004-06-20 09:38 foomartin@logistico:~> ./foo
./foo: error while loading shared libraries: libstratego-lib.opt.so.0: cannot open shared object file: No such file or directorymartin@logistico:~> ldd foo
libstratego-lib.opt.so.0 => not found
libstratego.opt.so.0 => not found
libm.so.6 => /lib/i686/libm.so.6 (0x4002b000)
libc.so.6 => /lib/i686/libc.so.6 (0x4004e000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
martin@logistico:~>
—————————————————————-strc should use libtool for linking the executable. If libtool is used, all platform specific quirks are handled. For example, libtool will use static linking if dynamic libraries are not supported and libtool registers the path of the dynamic library in the search path of the executable, solving the problem in this issue.
Workaround: set the LD_LIBRARY_PATH or install at a location that is in the search path by default.
Submitted on 20 June 2004 at 09:44
Issue Log
STR-125, martin:
Solved by using libtool.
Log in to post comments