[stunnel-users] Help compiling - rpath issues
Jay Martel
jsmartel68 at hotmail.com
Tue Aug 18 15:15:51 CEST 2009
Hello,
I am trying to avoid LD_LIBRARY_PATH and thus want to compile in the run time library path. I have tried various options to configure, hacking the LDFLAGS and CC lines in the Makefile, changing libtool varialbes, etc. but my resulting binary never has the library path inside.
Things I have tried:
LDFLAGS=-R/app/versions/local/3/lib
LDFLAGS=-L/app/versions/local/3/lib
LDFLAGS=-Wl,--rpath -Wl,/app/versions/local/3/lib
libtool variables that seem related but I cannot figure out:
hardcode_minus_L=yes
hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
I am using stunnel-4.27 and the configure and libtool it contains.
Here is the output of gcc -v:
Reading specs from /app/versions/local/3/lib/gcc/i386-pc-solaris2.10/3.4.5/specs
Configured with: /opt/autobuild/workdir/gcc-3.4.5/configure --prefix=/app/versions/devtools/3 --with-gnu-ld --with-ld=/app/versions/devtools/3/bin/ld --with-gnu-as --with-as=/app/versions/devtools/3/bin/as --libdir=/app/versions/local/3/lib --with-local-prefix=/app/versions/local/3 --with-gxx-include-dir=/app/versions/local/3/include/c++ --enable-languages=c,c++,objc
Thread model: posix
gcc version 3.4.5
I am having the same issue with Solaris 10 on i86pc and sparc architectures.
Here is the last bit of my make output:
/bin/bash ../libtool --tag=CC --mode=link gcc -g -O2 -Wall -Wshadow -Wcast-align -Wpointer-arith -I/app/versions/local/3/include -o stunnel file.o client.o log.o options.o protocol.o network.o resolver.o ssl.o ctx.o verify.o sthreads.o stunnel.o pty.o libwrap.o -lz -ldl -lsocket -lnsl -lpthread -L/app/versions/local/3/lib -lssl -lcrypto
gcc -g -O2 -Wall -Wshadow -Wcast-align -Wpointer-arith -I/app/versions/local/3/include -o stunnel file.o client.o log.o options.o protocol.o network.o resolver.o ssl.o ctx.o verify.o sthreads.o stunnel.o pty.o libwrap.o -lz -ldl -lsocket -lnsl -lpthread -L/app/versions/local/3/lib -lssl -lcrypto
The libtool line should show my rpath setting, I think. How do I get libtool to honor the rpath settings? Should I be asking the libtool maintainers?
I check the resulting binary using "strings stunnel | grep app" and my library directory never shows up.
Many thanks in advance.
-Jay Martel
_________________________________________________________________
Windows Live: Make it easier for your friends to see what you’re up to on Facebook.
http://windowslive.com/Campaign/SocialNetworking?ocid=PID23285::T:WLMTAGL:ON:WL:en-US:SI_SB_facebook:082009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stunnel.org/pipermail/stunnel-users/attachments/20090818/e0f06b07/attachment.html>
More information about the stunnel-users
mailing list