GNU bug report logs - #10005
pyexec_... target's dependency (via LIBADD) on lib_... target not recognized

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: libtool; Reported by: Frederik Heber <heber@HIDDEN>; dated Wed, 9 Nov 2011 18:51:02 UTC; Maintainer for libtool is bug-libtool@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 10 Nov 2011 14:52:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 10 09:52:38 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ROVzZ-00013a-PO
	for submit <at> debbugs.gnu.org; Thu, 10 Nov 2011 09:52:38 -0500
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <heber@HIDDEN>) id 1ROVzX-00013P-FT
	for submit <at> debbugs.gnu.org; Thu, 10 Nov 2011 09:52:36 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <heber@HIDDEN>) id 1ROVzF-00060V-Ru
	for submit <at> debbugs.gnu.org; Thu, 10 Nov 2011 09:52:19 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD
	autolearn=unavailable version=3.3.1
Received: from lists.gnu.org ([140.186.70.17]:39452)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <heber@HIDDEN>) id 1ROVzF-00060P-QM
	for submit <at> debbugs.gnu.org; Thu, 10 Nov 2011 09:52:17 -0500
Received: from eggs.gnu.org ([140.186.70.92]:34870)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <heber@HIDDEN>) id 1ROVzE-0003Zv-Nl
	for bug-libtool@HIDDEN; Thu, 10 Nov 2011 09:52:17 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <heber@HIDDEN>) id 1ROVzD-0005zg-CI
	for bug-libtool@HIDDEN; Thu, 10 Nov 2011 09:52:16 -0500
Received: from merkur.ins.uni-bonn.de ([131.220.223.13]:46747)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <heber@HIDDEN>) id 1ROVzC-0005z0-TG
	for bug-libtool@HIDDEN; Thu, 10 Nov 2011 09:52:15 -0500
Received: from localhost (localhost [127.0.0.1])
	by merkur.ins.uni-bonn.de (Postfix) with ESMTP id 5B9F6400BB38E
	for <bug-libtool@HIDDEN>; Thu, 10 Nov 2011 15:52:13 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at merkur.ins.uni-bonn.de
Received: from merkur.ins.uni-bonn.de ([127.0.0.1])
	by localhost (merkur.ins.uni-bonn.de [127.0.0.1]) (amavisd-new,
	port 10024) with ESMTP id 5OWcbM-gQYDW for <bug-libtool@HIDDEN>;
	Thu, 10 Nov 2011 15:52:08 +0100 (CET)
Received: from [192.168.200.63] (gibraltar [192.168.193.254])
	by merkur.ins.uni-bonn.de (Postfix) with ESMTPSA id 584234008C7D0
	for <bug-libtool@HIDDEN>; Thu, 10 Nov 2011 15:52:08 +0100 (CET)
Message-ID: <4EBBE518.7000104@HIDDEN>
Date: Thu, 10 Nov 2011 15:52:08 +0100
From: Frederik Heber <heber@HIDDEN>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.9.2.23) Gecko/20110921 Thunderbird/3.1.15
MIME-Version: 1.0
To: bug-libtool@HIDDEN
Subject: Re: bug#10005: pyexec_... target's dependency (via LIBADD) on lib_...
	target not recognized
References: <4EBAC7DA.2080900@HIDDEN>
In-Reply-To: <4EBAC7DA.2080900@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.186.70.17
X-Spam-Score: -6.6 (------)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.6 (------)

Hey there,

some small (but probably not unimportant) additional information:

This problem only occurs if make is launched with multiple threads (e.g.
-j4). With just a single thread the dependency is resolved correctly
(either by accident, or alphabetical ordering, or ...)

Kind regards,

Frederik

On 11/09/2011 07:35 PM, Frederik Heber wrote:
> Hey there,
> 
> My problem in short is:
> I have a project where multiple shared libraries among them a python
> module (pybar) (using boost::python) is created. However, the python
> module (pyexec_LT...) depends on one of the other shared libraries
> (lib_LT...) via ..._LIBADD. This dependency is not correctly recognized.
> Linking fails when executing make install.
> 
> It is similar to the problem described here
> (http://osdir.com/ml/automake-gnu/2010-03/msg00037.html), although there
> it occurs for the same target name, not in conjuction with pyexec_....
> 
> first the system info:
> libtool 2.2.6b (according to libtool --version)
> automake 1.11.1 (according to automake --version)
> Ubuntu 10.04, Linux bespin 2.6.32-34-generic ... x86_64 GNU/Linux
> (according to uname)
> 
> m4 macros:
> boost is checked via tsuna's boost.m4 from
> https://github.com/tsuna/boost.m4 (setting all BOOST_...)
> ax_python.m4 checks for python presence (setting PYTHON_...)
> 
> 
> The essential parts from Makefile.am are as follows:
> ....
> lib_LTLIBRARIES += libfooUI.la
> libfoo_la_CPPFLAGS = ${BOOST_CPPFLAGS}
> libfoo_la_LDFLAGS = $(AM_LDFLAGS) $(BOOST_FILESYSTEM_LDFLAGS)
> $(BOOST_PROGRAM_OPTIONS_LDFLAGS) $(BOOST_RANDOM_LDFLAGS)
> $(BOOST_SYSTEM_LDFLAGS) $(BOOST_THREAD_LDFLAGS)
> $(BOOST_FILESYSTEM_LDFLAGS) $(BOOST_PROGRAM_OPTIONS_LDFLAGS)
> $(BOOST_RANDOM_LDFLAGS) $(BOOST_SYSTEM_LDFLAGS) $(BOOST_THREAD_LDFLAGS)
> libfoo_la_LIBADD = \
> 	.. just convenience libraries ...
> ...
> pyexec_LTLIBRARIES += pybar.la
> pybar_la_SOURCES = \
>         bar.cpp \
>         bar.hpp \
> pybar_la_CPPFLAGS = ${BOOST_CPPFLAGS} -I$(PYTHON_INCLUDE_DIR)
> pybar_la_LDFLAGS = -module -avoid-version -shared
> pybar_la_LIBADD = \
>         libfoo.la
>         $(BOOST_PYTHON_LDFLAGS) $(BOOST_PYTHON_LIBS) \
>         -l$(PYTHON_LIB)
> ...
> 
> The problem is then when calling make install:
> /usr/bin/ld: cannot find -lfoo
> collect2: ld returned 1 exit status
> libtool: install: error: relink `pybar.la' with the above command before
> installing it
> make[4]: *** [install-pyexecLTLIBRARIES] Error 1
> make[4]: *** Waiting for unfinished jobs....
> 
> I.e. libtool (automake) does not seem to recognize the dependency of the
> shared libraries pybar on libfoo because of the different prefixes lib_
> and pyexec_: libfoo has not been relinked at this point yet. pybar is
> re-linked too early. The problem disappears if the python module is
> (wrongly) given among the lib_LTLIBRARIES.
> 
> This first rears its head during re-linking with the install target (and
> with the final link dir via -L given to ld), normal 'make all' produces
> both libraries just fine.
> 
> Is this known? Is this a bug? Is there a workaround? Can I do anything
> more to assist?
> 
> 
> Kind regards,
> 
> 
> Frederik


-- 
Dipl.Phys. Frederik Heber
Wegelerstrasse 6/5.011, 53115 Bonn
Tel.: +49 228 73 3866
(Arbeitsgruppe Prof. Dr. M. Griebel)




Information forwarded to bug-libtool@HIDDEN:
bug#10005; Package libtool. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 9 Nov 2011 18:50:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 09 13:50:04 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RODDn-0006fg-BJ
	for submit <at> debbugs.gnu.org; Wed, 09 Nov 2011 13:50:04 -0500
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <heber@HIDDEN>) id 1ROCze-0006Jx-FP
	for submit <at> debbugs.gnu.org; Wed, 09 Nov 2011 13:35:27 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <heber@HIDDEN>) id 1ROCzR-0003aw-Uk
	for submit <at> debbugs.gnu.org; Wed, 09 Nov 2011 13:35:14 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD
	autolearn=unavailable version=3.3.1
Received: from lists.gnu.org ([140.186.70.17]:50909)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <heber@HIDDEN>) id 1ROCzR-0003ao-S8
	for submit <at> debbugs.gnu.org; Wed, 09 Nov 2011 13:35:13 -0500
Received: from eggs.gnu.org ([140.186.70.92]:55318)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <heber@HIDDEN>) id 1ROCzQ-0004eA-BJ
	for bug-libtool@HIDDEN; Wed, 09 Nov 2011 13:35:13 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <heber@HIDDEN>) id 1ROCzP-0003aA-46
	for bug-libtool@HIDDEN; Wed, 09 Nov 2011 13:35:12 -0500
Received: from merkur.ins.uni-bonn.de ([131.220.223.13]:47168)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <heber@HIDDEN>) id 1ROCzO-0003ZU-Vp
	for bug-libtool@HIDDEN; Wed, 09 Nov 2011 13:35:11 -0500
Received: from localhost (localhost [127.0.0.1])
	by merkur.ins.uni-bonn.de (Postfix) with ESMTP id 93CAE400BB3BC
	for <bug-libtool@HIDDEN>; Wed,  9 Nov 2011 19:35:08 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at merkur.ins.uni-bonn.de
Received: from merkur.ins.uni-bonn.de ([127.0.0.1])
	by localhost (merkur.ins.uni-bonn.de [127.0.0.1]) (amavisd-new,
	port 10024) with ESMTP id SemuF3Db3485 for <bug-libtool@HIDDEN>;
	Wed,  9 Nov 2011 19:35:06 +0100 (CET)
Received: from [192.168.200.63] (gibraltar [192.168.193.254])
	by merkur.ins.uni-bonn.de (Postfix) with ESMTPSA id 48304400BB38E
	for <bug-libtool@HIDDEN>; Wed,  9 Nov 2011 19:35:06 +0100 (CET)
Message-ID: <4EBAC7DA.2080900@HIDDEN>
Date: Wed, 09 Nov 2011 19:35:06 +0100
From: Frederik Heber <heber@HIDDEN>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.9.2.23) Gecko/20110921 Thunderbird/3.1.15
MIME-Version: 1.0
To: bug-libtool@HIDDEN
Subject: pyexec_... target's dependency (via LIBADD) on lib_... target not
	recognized
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.186.70.17
X-Spam-Score: -6.6 (------)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Wed, 09 Nov 2011 13:50:02 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.6 (------)

Hey there,

My problem in short is:
I have a project where multiple shared libraries among them a python
module (pybar) (using boost::python) is created. However, the python
module (pyexec_LT...) depends on one of the other shared libraries
(lib_LT...) via ..._LIBADD. This dependency is not correctly recognized.
Linking fails when executing make install.

It is similar to the problem described here
(http://osdir.com/ml/automake-gnu/2010-03/msg00037.html), although there
it occurs for the same target name, not in conjuction with pyexec_....

first the system info:
libtool 2.2.6b (according to libtool --version)
automake 1.11.1 (according to automake --version)
Ubuntu 10.04, Linux bespin 2.6.32-34-generic ... x86_64 GNU/Linux
(according to uname)

m4 macros:
boost is checked via tsuna's boost.m4 from
https://github.com/tsuna/boost.m4 (setting all BOOST_...)
ax_python.m4 checks for python presence (setting PYTHON_...)


The essential parts from Makefile.am are as follows:
....
lib_LTLIBRARIES += libfooUI.la
libfoo_la_CPPFLAGS = ${BOOST_CPPFLAGS}
libfoo_la_LDFLAGS = $(AM_LDFLAGS) $(BOOST_FILESYSTEM_LDFLAGS)
$(BOOST_PROGRAM_OPTIONS_LDFLAGS) $(BOOST_RANDOM_LDFLAGS)
$(BOOST_SYSTEM_LDFLAGS) $(BOOST_THREAD_LDFLAGS)
$(BOOST_FILESYSTEM_LDFLAGS) $(BOOST_PROGRAM_OPTIONS_LDFLAGS)
$(BOOST_RANDOM_LDFLAGS) $(BOOST_SYSTEM_LDFLAGS) $(BOOST_THREAD_LDFLAGS)
libfoo_la_LIBADD = \
	.. just convenience libraries ...
...
pyexec_LTLIBRARIES += pybar.la
pybar_la_SOURCES = \
        bar.cpp \
        bar.hpp \
pybar_la_CPPFLAGS = ${BOOST_CPPFLAGS} -I$(PYTHON_INCLUDE_DIR)
pybar_la_LDFLAGS = -module -avoid-version -shared
pybar_la_LIBADD = \
        libfoo.la
        $(BOOST_PYTHON_LDFLAGS) $(BOOST_PYTHON_LIBS) \
        -l$(PYTHON_LIB)
...

The problem is then when calling make install:
/usr/bin/ld: cannot find -lfoo
collect2: ld returned 1 exit status
libtool: install: error: relink `pybar.la' with the above command before
installing it
make[4]: *** [install-pyexecLTLIBRARIES] Error 1
make[4]: *** Waiting for unfinished jobs....

I.e. libtool (automake) does not seem to recognize the dependency of the
shared libraries pybar on libfoo because of the different prefixes lib_
and pyexec_: libfoo has not been relinked at this point yet. pybar is
re-linked too early. The problem disappears if the python module is
(wrongly) given among the lib_LTLIBRARIES.

This first rears its head during re-linking with the install target (and
with the final link dir via -L given to ld), normal 'make all' produces
both libraries just fine.

Is this known? Is this a bug? Is there a workaround? Can I do anything
more to assist?


Kind regards,


Frederik
-- 
Dipl.Phys. Frederik Heber
Wegelerstrasse 6/5.011, 53115 Bonn
Tel.: +49 228 73 3866
(Arbeitsgruppe Prof. Dr. M. Griebel)




Acknowledgement sent to Frederik Heber <heber@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-libtool@HIDDEN. Full text available.
Report forwarded to bug-libtool@HIDDEN:
bug#10005; Package libtool. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

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