[Top][All Lists]

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

Re: test suite failures with --no-copy-dt-needed-entries

From: Ralf Wildenhues
Subject: Re: test suite failures with --no-copy-dt-needed-entries
Date: Tue, 29 Mar 2011 09:18:12 +0200
User-agent: Mutt/1.5.20 (2010-08-04)

Hi Kurt,

* Kurt Roeckx wrote on Mon, Mar 28, 2011 at 01:08:22AM CEST:
> We're seeing this currently in Debian:
> FAIL: tests/tagdemo-make.test

> /bin/bash ./libtool --tag=CXX   --mode=link g++  -g -O2   -o tagdemo main.o 
> libbaz.la -ldl
> libtool: link: g++ -g -O2 -o .libs/tagdemo main.o  ./.libs/libbaz.so -ldl 
> -Wl,-rpath -Wl,/home/kurt/libtool/libtool-2.4/_inst-tagdemo/lib
> /usr/bin/ld: main.o: undefined reference to symbol 'convenience'
> /usr/bin/ld: note: 'convenience' is defined in DSO 
> //home/kurt/libtool/libtool-2.4/tests/tagdemo/.libs/libfoo.so.0 so try adding 
> it to the linker command line
> //home/kurt/libtool/libtool-2.4/tests/tagdemo/.libs/libfoo.so.0: could not 
> read symbols: Invalid operation
> collect2: ld returned 1 exit status
> I was expecting this to break with the change in toolchain.
> In case you wonder why we get that error now, it's because gcc now
> passes --no-copy-dt-needed-entries to the linker.  I think I've
> mailed the lists with a similar case just like this before.
> The problem is main.o is linking to libbaz (which is not a
> convenience library, and is linked to libfoo), but is using
> symbols from libfoo directly and not linking too it.  This
> is just wrong, but used to work because ld fixed it for you.
> And libtool probably also tries to fix it for you if you don't
> set link_all_deplibs to no.
> I plan to adjust all the tests to add the proper libraries.
> Would you be interested in the patch?

Yes, please.  I'm not quite sure whether the test case was intended to
exercise this, or it was just inadvertent; the latter is more likely.

Presumably one or more of the tests from the Autotest testsuite in
Libtool fail as well due to this?

Thanks for the report,

reply via email to

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