<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Hello,<br><br>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.<br><br>Things I have tried:<br>LDFLAGS=-R/app/versions/local/3/lib<br>LDFLAGS=-L/app/versions/local/3/lib<br>LDFLAGS=-Wl,--rpath -Wl,/app/versions/local/3/lib<br><br>libtool variables that seem related but I cannot figure out:<br>hardcode_minus_L=yes<br>hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"<br><br><br>I am using stunnel-4.27 and the configure and libtool it contains.<br><br><br>Here is the output of gcc -v:<br>Reading specs from /app/versions/local/3/lib/gcc/i386-pc-solaris2.10/3.4.5/specs<br>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<br>Thread model: posix<br>gcc version 3.4.5<br><br>I am having the same issue with Solaris 10 on i86pc and sparc architectures.<br><br>Here is the last bit of my make output:<br>/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<br>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<br><br><br>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?<br><br>I check the resulting binary using "strings stunnel | grep app" and my library directory never shows up.<br><br>Many thanks in advance.<br><br>-Jay Martel<br><br><br><br /><hr />Windows Live: Make it easier for your friends to see what you�re up to on Facebook. <a href='http://windowslive.com/Campaign/SocialNetworking?ocid=PID23285::T:WLMTAGL:ON:WL:en-US:SI_SB_facebook:082009' target='_new'>Find out more.</a></body>
</html>