automake
[Top][All Lists]
Advanced

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

Re: relinking error


From: Monty Taylor
Subject: Re: relinking error
Date: Fri, 05 Mar 2010 10:01:15 -0800
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) Gecko/20100222 Thunderbird/3.0.1

On 03/05/2010 09:26 AM, Monty Taylor wrote:
Hi!

I've got an install-time re-linking error happening in two different
projects now, and it's confusing me.

ltmain.sh (GNU libtool) 2.2.6b
automake (GNU automake) 1.11.1

The simple case where it's happening is in libcassandra. We have to
lib_LTLIBRARIES defined, libgenthrift.la and libcassandra.la:

lib_LTLIBRARIES+= libcassandra/libcassandra.la
lib_LTLIBRARIES+= libgenthrift/libgenthrft.la

As a follow up, if I reverse the order of the above declaration to:

lib_LTLIBRARIES+= libgenthrift/libgenthrft.la
lib_LTLIBRARIES+= libcassandra/libcassandra.la

It works. So it does seem to be that install doesn't pay attention to dependency information here.

Additionally, libcassandra uses libgenthrift:

libcassandra_libcassandra_la_DEPENDENCIES= libgenthrift/libgenthrift.la
libcassandra_libcassandra_la_LIBADD= libgenthrift/libgenthrift.la

All works fine in tree. When we try to run make install, however, it
doesn't seem to grok dependency order and tries to install and re-link
libcassandra first - but of course libgenthrift.so has not yet been
installed into the install dir, so there is a re-link error.

Here's the output from the simple project.

address@hidden:~/tmp/libcassandra$ make install
make install-recursive
make[1]: Entering directory `/home/posulliv/tmp/libcassandra'
make[2]: Entering directory `/home/posulliv/tmp/libcassandra'
make[3]: Entering directory `/home/posulliv/tmp/libcassandra'
test -z "/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"
/bin/bash ./libtool --mode=install /usr/bin/install -c
libcassandra/libcassandra.la libgenthrift/libgenthrift.la
'/usr/local/lib'
libtool: install: warning: relinking `libcassandra/libcassandra.la'
libtool: install: (cd /home/posulliv/tmp/libcassandra; /bin/bash
/home/posulliv/tmp/libcassandra/libtool --silent --tag CXX
--mode=relink g++ -pipe -std=gnu++0x -O3 -pedantic -Wall -Wundef
-Wshadow -fdiagnostics-show-option -fvisibility=hidden -Wformat
-fno-strict-aliasing -Wno-strict-aliasing -Wextra -Woverloaded-virtual
-Wnon-virtual-dtor -Wctor-dtor-privacy -Wno-long-long
-Wmissing-declarations -Wredundant-decls -I/usr/local/include/thrift
-Wno-conversion -version-info 1:0:0 -o libcassandra/libcassandra.la
-rpath /usr/local/lib
libcassandra/libcassandra_libcassandra_la-cassandra.lo
libcassandra/libcassandra_libcassandra_la-cassandra_factory.lo
libgenthrift/libgenthrift.la -lrt )
/usr/bin/ld: cannot find -lgenthrift
collect2: ld returned 1 exit status
libtool: install: error: relink `libcassandra/libcassandra.la' with
the above command before installing it
make[3]: *** [install-libLTLIBRARIES] Error 1
make[3]: Leaving directory `/home/posulliv/tmp/libcassandra'
make[2]: *** [install-am] Error 2
make[2]: Leaving directory `/home/posulliv/tmp/libcassandra'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/posulliv/tmp/libcassandra'
make: *** [install] Error 2


Is there a declarative something I've missed or some other way around
this? I feel like I've got to be doing something stoopid if I can't get
a tree to install two shared libs with a depend properly. :)

Monty








reply via email to

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