From unknown Sun Aug 17 22:02:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10005: pyexec_... target's dependency (via LIBADD) on lib_... target not recognized Resent-From: Frederik Heber Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-libtool@gnu.org Resent-Date: Wed, 09 Nov 2011 18:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 10005 X-GNU-PR-Package: libtool X-GNU-PR-Keywords: To: 10005@debbugs.gnu.org X-Debbugs-Original-To: bug-libtool@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.132086460425652 (code B ref -1); Wed, 09 Nov 2011 18:51:02 +0000 Received: (at submit) by debbugs.gnu.org; 9 Nov 2011 18:50:04 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RODDn-0006fg-BJ for submit@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 ) id 1ROCze-0006Jx-FP for submit@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 ) id 1ROCzR-0003aw-Uk for submit@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 ) id 1ROCzR-0003ao-S8 for submit@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 ) id 1ROCzQ-0004eA-BJ for bug-libtool@gnu.org; Wed, 09 Nov 2011 13:35:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ROCzP-0003aA-46 for bug-libtool@gnu.org; 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 ) id 1ROCzO-0003ZU-Vp for bug-libtool@gnu.org; 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 ; 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 ; 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 ; Wed, 9 Nov 2011 19:35:06 +0100 (CET) Message-ID: <4EBAC7DA.2080900@ins.uni-bonn.de> Date: Wed, 09 Nov 2011 19:35:06 +0100 From: Frederik Heber 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 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-Mailman-Approved-At: Wed, 09 Nov 2011 13:50:02 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@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) From unknown Sun Aug 17 22:02:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10005: pyexec_... target's dependency (via LIBADD) on lib_... target not recognized Resent-From: Frederik Heber Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-libtool@gnu.org Resent-Date: Thu, 10 Nov 2011 14:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10005 X-GNU-PR-Package: libtool X-GNU-PR-Keywords: To: 10005@debbugs.gnu.org X-Debbugs-Original-To: bug-libtool@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.13209367584071 (code B ref -1); Thu, 10 Nov 2011 14:53:01 +0000 Received: (at submit) by debbugs.gnu.org; 10 Nov 2011 14:52:38 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ROVzZ-00013a-PO for submit@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 ) id 1ROVzX-00013P-FT for submit@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 ) id 1ROVzF-00060V-Ru for submit@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 ) id 1ROVzF-00060P-QM for submit@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 ) id 1ROVzE-0003Zv-Nl for bug-libtool@gnu.org; Thu, 10 Nov 2011 09:52:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ROVzD-0005zg-CI for bug-libtool@gnu.org; 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 ) id 1ROVzC-0005z0-TG for bug-libtool@gnu.org; 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 ; 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 ; 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 ; Thu, 10 Nov 2011 15:52:08 +0100 (CET) Message-ID: <4EBBE518.7000104@ins.uni-bonn.de> Date: Thu, 10 Nov 2011 15:52:08 +0100 From: Frederik Heber 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 References: <4EBAC7DA.2080900@ins.uni-bonn.de> In-Reply-To: <4EBAC7DA.2080900@ins.uni-bonn.de> 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@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)