Thread: Very minor "configure" issue?

Very minor "configure" issue?

From
Stephen Harris
Date:
I didn't see this mentioned in the INSTALL or doc/ directory, so...

I have versions of SSL libraries in my own directories and so used
a command line such as:
   ./configure --prefix=/local/apps/postgres/8.2.rc1.0 \
               --exec-prefix=/local/apps/postgres/8.2.rc1.0/linux \
               --enable-thread-safety \
               --with-openssl \
               --with-pam \
               --with-includes=/opt/mystuff/include \
               --with-libs=/opt/mystuff/lib

This fails at

checking test program... failed
configure: error:
Could not execute a simple test program.  This may be a problem
related to locating shared libraries.  Check the file 'config.log'
for the exact reason.

and the log says:
configure:17444: gcc -o conftest -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement
-Wendif-labels-fno-strict-aliasing -D_GNU_SOURCE  -I/opt/mystuff/include   -L/opt/mystuff/lib conftest.c -lpam -lssl
-lcrypto-lz -lreadline -ltermcap -lcrypt -ldl -lm  >&5 
configure:17447: $? = 0
configure:17449: ./conftest
./conftest: error while loading shared libraries: libssl.so.0.9.7: cannot open shared object file: No such file or
directory

The solution, obviously, is LDFLAGS=-Wl,-R/opt/mystuff/lib ./configure....
and now everything configures and builds cleanly, but it might be nice
for that to be automatic.

*shrug*

--

rgds
Stephen

Re: Very minor "configure" issue?

From
Martijn van Oosterhout
Date:
On Tue, Nov 28, 2006 at 11:11:26AM -0500, Stephen Harris wrote:
> The solution, obviously, is LDFLAGS=-Wl,-R/opt/mystuff/lib ./configure....
> and now everything configures and builds cleanly, but it might be nice
> for that to be automatic.

RPATH is evil. If you're going to install libraries in non-standard
paths, at least include those paths in the system-wide library search
path or add them to LD_LIBRARY_PATH.

You could even symlink the libs into /usr/lib, that would also solve
the problem.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment