[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with /.libs/.libs/ during link

From: Dan S. Camper
Subject: Problem with /.libs/.libs/ during link
Date: Wed, 28 Apr 2004 11:31:33 -0500
User-agent: Microsoft-Entourage/


I'm running into a link error when trying to build a suite of
libtool-managed libraries.  Google turns up many people complaining of
similar problems, but I didn't find a solution.

Executive summary of the problem:  A single makefile is building seven or
eight libraries, all built via libtool.  The first four libraries build
fine, even though libraries 2-4 all link to the first one.  The problem
comes in with library #5, which needs to link against two of previous four
libraries.  At that point, g++ complains that it can't find the second

Here are some details:

Makefile target definition: \
                            $(LINK_LIB) bti_ssl_cipher.lo \
                            $(LIBS) \
                            -lbti_ssl_cipher \


LINKLIB =   $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) \
            -no-undefined $(VSNFLAG) -rpath $(libdir) \
            $(LDFLAGS) -o $@

LIBS    =   -lssl -lcrypto -lbti_core
Echo of link step:

/bin/sh ./libtool --silent --mode=link g++ -O2 -I/usr/local/include -Wall
-no-undefined -version-info 1:0:1 -rpath /usr/local/lib -s -L/usr/local/lib
-o bti_ssl_pkey.lo -lssl -lcrypto  -lbti_core
-lbti_ssl_cipher -lbti_ssl_util
Resulting error message:

_util.dylib: No such file or directory

(The top of the source tree is
If I reverse the order of -lbti_ssl_util and -lbti_ssl_cipher in the
makefile target then the error changes:

_cipher.dylib: No such file or directory

Basically, the second library is always "lost" due to an incorrect full path
to the local .libs/ directory.  This suggests to me that libtool is failing
to revert the full path to the directory when processing multiple
libtool-built, local libraries.

Oh yes:  The libtool I'm using is:

#: ./libtool --version (GNU libtool) 1.5 (1.1220 2003/04/05 19:32:58)


Dan S. Camper                                         Borrowed Time, Inc.
Software Thaumaturge                         

reply via email to

[Prev in Thread] Current Thread [Next in Thread]