Re: LD_RUN_PATH required? SUNWspro/GCC ld differences?
[email protected] (Jarkko Hietaniemi) Fri, 6 Jun 2003 09:01:23 +0300
| Newsgroups | perl.64bit |
|---|---|
| Message-ID | <[email protected]> |
Here are some comments from a Solaris guru (not me...):
> LD_LIBRARY_PATH does NOT contain the libaceclnt.so (third party .so lib).
> LD_RUN_PATH is empty.
Where exactly is libaceclnt.so on the two machines? I'd guess
/usr/local/lib...
>From the WORKING NON-64-bit machine (an Ultra5 running Solaris8):
:
> Linker and Libraries:
> ld='gcc -B/usr/ccs/bin/', ldflags =' -L/usr/local/lib '
> libpth=/usr/local/lib /usr/lib /usr/ccs/lib
> libs=-lsocket -lnsl -lgdbm -ldl -lm -lc
> perllibs=-lsocket -lnsl -ldl -lm -lc
> libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
> gnulibc_version=''
> Dynamic Linking:
> dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
> cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'
> And from the NON-working 64-bit machine (an E10K running Solaris8):
:
> Linker and Libraries:
> ld='/opt/SUNWspro/bin/cc', ldflags =' -L/opt/SUNWspro/WS6U2/lib -L/opt/SUNWs
> pro/lib -R/opt/SUNWspro/lib '
> libpth=/opt/SUNWspro/WS6U2/lib /usr/lib /usr/ccs/lib /opt/SUNWspro/lib
> libs=-lsocket -lnsl -ldl -lm -lc -lsunmath
> perllibs=-lsocket -lnsl -ldl -lm -lc -lsunmath
> libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so
> gnulibc_version=''
> Dynamic Linking:
> dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -R /usr/local/li
> b/perl5/5.8.0/sun4-solaris-64int/CORE'
> cccdlflags='-KPIC', lddlflags='-G -L/opt/SUNWspro/WS6U2/lib -L/opt/SUNWspro/
> lib -R/opt/SUNWspro/lib'
There are *significant* differences between the two versions - one is built
with shrplib, one without, and the libpths are different - specifically the
working one includes /usr/local/lib, and the broken one doesn't.
He can verify this by using 'ldd' and 'dump -Lv' on the various perl,
libperl.so and module .so files and looking at the dependencies. Another
trick is to do 'LD_DEBUG=libs perl sometestscript' which will display the
library search processing.
As for a fix, he can hack the module Makefile.PL - I'm not sure which would
work best, adding -R<library path> to LIBS, or using
dynamic_lib => { OTHERLDFLAGS => '-R<library path>' }
Whatever, he should use 'dump -Lv' on the resulting .so and check that
libaceclnt.so appears in the NEEDED section, and the directory it is in
appears in RUNPATH/RPATH.
--
Jarkko Hietaniemi <[email protected]> http://www.iki.fi/jhi/ "There is this special
biologist word we use for 'stable'. It is 'dead'." -- Jack Cohen