[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/10.1.4.030702.0 |
Greetings!
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
library.
Here are some details:
================================
Makefile target definition:
libbti_ssl_pkey.la: libbti_ssl_util.la \
libbti_ssl_cipher.la \
bti_ssl_cipher.lo
$(LINK_LIB) bti_ssl_cipher.lo \
$(LIBS) \
-lbti_ssl_cipher \
-lbti_ssl_util
Where:
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 libbti_ssl_pkey.la bti_ssl_pkey.lo -lssl -lcrypto -lbti_core
-lbti_ssl_cipher -lbti_ssl_util
================================
Resulting error message:
g++:
/Users/lordgrey/Projects/cvs_projects/bti/bti_ssl_lib/.libs/.libs/libbti_ssl
_util.dylib: No such file or directory
(The top of the source tree is
/Users/lordgrey/Projects/cvs_projects/bti/bti_ssl_lib/.)
================================
If I reverse the order of -lbti_ssl_util and -lbti_ssl_cipher in the
makefile target then the error changes:
g++:
/Users/lordgrey/Projects/cvs_projects/bti/bti_ssl_lib/.libs/.libs/libbti_ssl
_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
ltmain.sh (GNU libtool) 1.5 (1.1220 2003/04/05 19:32:58)
Thoughts?
DSC
_________________________________________________________________________
Dan S. Camper Borrowed Time, Inc.
Software Thaumaturge http://www.bti.net
- Problem with /.libs/.libs/ during link,
Dan S. Camper <=