GNU bug report logs - #11921
libtool --mode=link with indirectly involved libraries

Previous Next

Package: libtool;

Reported by: Дилян Палаузов <dilyan.palauzov <at> aegee.org>

Date: Thu, 12 Jul 2012 11:27:02 UTC

Severity: normal

To reply to this bug, email your comments to 11921 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-libtool <at> gnu.org:
bug#11921; Package libtool. (Thu, 12 Jul 2012 11:27:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Дилян Палаузов <dilyan.palauzov <at> aegee.org>:
New bug report received and forwarded. Copy sent to bug-libtool <at> gnu.org. (Thu, 12 Jul 2012 11:27:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Дилян Палаузов
	<dilyan.palauzov <at> aegee.org>
To: bug-libtool <at> gnu.org
Subject: libtool --mode=link with indirectly involved libraries
Date: Thu, 12 Jul 2012 13:20:08 +0200
[Message part 1 (text/plain, inline)]
Hello,

I use libtool-2.4.2.  In the Makefile.am I have

lib_LTLIBRARIES = libA.a libB.la
libA_la_SOURCES = ...
libB_la_SOURCES = ...
libB_la_LIBADD = libA.la
bin_PROGRAMS = c
c_SOURCES = ...
c_LDADD = libB.la

This creates a file libB.la which lists libA.la (with its full path) 
under dependency_libs .

Executing "make" leads to

libtool --tag=CC --mode=link gcc -o c libB.la

And now, on my system this expands (correctly) to
libtool: link: gcc -o c /.libs/libB.so /.libs/libA.so

but on another system it resolves to
libtool: link: gcc -o c /.libs/libB.so
-> ERROR
ld: c.o: undefined reference to symbol 'A'
ld: note: 'A' is defined in DSO libA.so.0 so try adding it to the linker 
command line
libA.so.0: could not read symbols: Invalid operation
collect2: ld returned 1 exit status

My question is:

Why is libB.la sometimes expanded by libtool --mode=link v2.4.2 to 
"libB.so libA.so" and sometimes only to "libB.so"?

Thanks very much in advance for your answer
  Дилян

[dilyan_palauzov.vcf (text/x-vcard, attachment)]

Information forwarded to bug-libtool <at> gnu.org:
bug#11921; Package libtool. (Sun, 15 Jul 2012 10:25:01 GMT) Full text and rfc822 format available.

Message #8 received at 11921 <at> debbugs.gnu.org (full text, mbox):

From: Дилян Палаузов
	<dilyan.palauzov <at> aegee.org>
To: 11921 <at> debbugs.gnu.org
Subject: link_all_deplibs=no
Date: Sun, 15 Jul 2012 12:18:39 +0200
[Message part 1 (text/plain, inline)]
Hello,

the problem is caused by link_all_deplibs=no and the attached package 
demonstrates the configuration causing the problem.

Any idea how to compile src/c.c , when link_all_deplibs is for some 
reason set by the system to no?

Със здраве
  Дилян
[pack-0.2.tar.bz2 (application/octet-stream, attachment)]
[dilyan_palauzov.vcf (text/x-vcard, attachment)]

Information forwarded to bug-libtool <at> gnu.org:
bug#11921; Package libtool. (Mon, 23 Jul 2012 19:09:02 GMT) Full text and rfc822 format available.

Message #11 received at 11921 <at> debbugs.gnu.org (full text, mbox):

From: Roumen Petrov <bugtrack <at> roumenpetrov.info>
To: Дилян Палаузов
	<dilyan.palauzov <at> aegee.org>
Cc: 11921 <at> debbugs.gnu.org
Subject: Re: bug#11921: libtool --mode=link with indirectly involved libraries
Date: Mon, 23 Jul 2012 22:01:22 +0300
Дилян Палаузов wrote:
> Hello,
>
> I use libtool-2.4.2.  In the Makefile.am I have
>
> lib_LTLIBRARIES = libA.a libB.la
> libA_la_SOURCES = ...
> libB_la_SOURCES = ...
> libB_la_LIBADD = libA.la
> bin_PROGRAMS = c
> c_SOURCES = ...
> c_LDADD = libB.la
>
> This creates a file libB.la which lists libA.la (with its full path) 
> under dependency_libs .
>
> Executing "make" leads to
>
> libtool --tag=CC --mode=link gcc -o c libB.la
>
> And now, on my system this expands (correctly) to
> libtool: link: gcc -o c /.libs/libB.so /.libs/libA.so
>
> but on another system it resolves to
> libtool: link: gcc -o c /.libs/libB.so
> -> ERROR
> ld: c.o: undefined reference to symbol 'A'
> ld: note: 'A' is defined in DSO libA.so.0 so try adding it to the 
> linker command line
> libA.so.0: could not read symbols: Invalid operation
> collect2: ld returned 1 exit status
>
Look like debian based distribution.


> My question is:
>
> Why is libB.la sometimes expanded by libtool --mode=link v2.4.2 to 
> "libB.so libA.so" and sometimes only to "libB.so"?

https://bugs.launchpad.net/ubuntu/+source/libtool/+bug/258491 ?

>
> Thanks very much in advance for your answer
>   Дилян

Roumen





This bug report was last modified 12 years and 328 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.