[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: libgcc_so.1 - not found, sitting right with other libs that are found
- To: "Jeff Blaine" <jblaine@mitre.org>
- Subject: Re: libgcc_so.1 - not found, sitting right with other libs that are found
- From: "matthew sporleder" <msporleder@gmail.com>
- Date: Tue, 22 Aug 2006 15:38:14 -0400
- Cc: openldap-software@OpenLDAP.org
- Content-disposition: inline
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=YGB483+NzbbnsRab5mOFNVY+JzKbpCnVmxuzbpsuJQPm89zaCZfQGu3phHxQT2kgB4jSw1R819GlW6o5+y3MwYNASnmdN0o77/YaZEEIevzwiTFUTruS9QxYz6LGv1ZBmhPnlz+b3+pJz/LsvByxiWrXak/4/KwSlZQ/wPtVRaE=
- In-reply-to: <44E61A84.4090807@mitre.org>
- References: <44E61A84.4090807@mitre.org>
On 8/18/06, Jeff Blaine <jblaine@mitre.org> wrote:
Solaris 9, GNU C 3.2.3 which has been used to build 20 other
apps on this box with zero problems.
LDFLAGS="-L/export/home/lib -R/export/home/lib -L/export/home/lib/sasl2
-R/export/home/lib/sasl2"
I'll PayPal $2 to anyone who can give me a fix to this without
involving LD_LIBRARY_PATH (which is not a "fix", it's a hack
workaround for an improper build).
:)
openldap-2.3.24 : noodle # ldd /export/home/bin/ldapsearch
libsasl2.so.2 => /export/home/lib/libsasl2.so.2
libdl.so.1 => /usr/lib/libdl.so.1
libssl.so.0.9.7 => /export/home/lib/libssl.so.0.9.7
libcrypto.so.0.9.7 => /export/home/lib/libcrypto.so.0.9.7
libresolv.so.2 => /usr/lib/libresolv.so.2
libgen.so.1 => /usr/lib/libgen.so.1
libnsl.so.1 => /usr/lib/libnsl.so.1
libsocket.so.1 => /usr/lib/libsocket.so.1
libc.so.1 => /usr/lib/libc.so.1
libgcc_s.so.1 => (file not found) !!!!!
libgcc_s.so.1 => (file not found) !!!!!
libmp.so.2 => /usr/lib/libmp.so.2
/usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1
openldap-2.3.24 : noodle #
[ Clearly it found plenty in /export/home/lib ]
openldap-2.3.24 : noodle # ls -ld /export/home/lib/libgcc_s.so.1
-rw-r--r-- 1 bin bin 757932 Apr 29 2003
/export/home/lib/libgcc_s.so.1
[ But refuses to see libgcc_s.so.1 sitting right there? ]
openldap-2.3.24 : noodle # /usr/ccs/bin/elfdump -d
/export/home/bin/ldapsearch | grep PATH
[11] RUNPATH 0x2c1c /export/home/lib:/export/home/lib/sasl2
[12] RPATH 0x2c1c /export/home/lib:/export/home/lib/sasl2
openldap-2.3.24 : noodle #
I think you need -Wl,-R instead of just -R.
I used the following on solaris 10 to build 64-bit openldap/bdb and
link against my specific bdb (which lives in the
/usr/local/openldap64-ol<version>-bdb<version>/lib) and the sfw libgcc
(which lives in /usr/sfw/lib/sparcv9). On the server where I compiled,
ldd shows the gcc binary's libgcc, but including the -R/path/ in
LDFLAGS tells it to look explicitly in that /path/ or libraries when
it doesn't find ones that it may otherwise see.
#Make sure your $PATH has the correct gcc --first--
export LDFLAGS="-L/usr/lib/lwp/64 -L/lib/64 -L/usr/lib/64
-L/usr/sfw/lib/sparcv9 -Wl,-R/usr/lib/lwp/64 -Wl,-R/lib/64
-Wl,-R/usr/lib/64 -Wl,-R/usr/sfw/lib/sparcv9
-L/usr/local/openldap64-ol2.3.23-bdb4.2.52/lib
-Wl,-R/usr/local/openldap64-ol2.3.23-bdb4.2.52/lib -m64"
export CPPFLAGS="-I/usr/local/openldap64-ol2.3.23-bdb4.2.52/include"
export CFLAGS="-m64 -O2"
Then I could just tar up /usr/local/openldap64-etc and, if needed, the
libgcc I wanted to use. Or making a solaris pkg with these same steps
is pretty easy.
Good luck,
_Matt