Received: (at submit) by debbugs.gnu.org; 24 Sep 2011 22:00:24 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 24 18:00:24 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 1R7aGl-0004Na-H2 for submit <at> debbugs.gnu.org; Sat, 24 Sep 2011 18:00:23 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <rrt@HIDDEN>) id 1R7aGi-0004NS-4a for submit <at> debbugs.gnu.org; Sat, 24 Sep 2011 18:00:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <rrt@HIDDEN>) id 1R7aG8-0001Qv-SE for submit <at> debbugs.gnu.org; Sat, 24 Sep 2011 17:59:46 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:42740) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <rrt@HIDDEN>) id 1R7aG8-0001Qr-Qm for submit <at> debbugs.gnu.org; Sat, 24 Sep 2011 17:59:44 -0400 Received: from eggs.gnu.org ([140.186.70.92]:48855) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <rrt@HIDDEN>) id 1R7aG7-0006II-M9 for bug-libtool@HIDDEN; Sat, 24 Sep 2011 17:59:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <rrt@HIDDEN>) id 1R7aG6-0001QV-6J for bug-libtool@HIDDEN; Sat, 24 Sep 2011 17:59:43 -0400 Received: from exprod7og107.obsmtp.com ([64.18.2.167]:41152) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from <rrt@HIDDEN>) id 1R7aG5-0001QL-Of for bug-libtool@HIDDEN; Sat, 24 Sep 2011 17:59:42 -0400 Received: from mail-wy0-f172.google.com ([74.125.82.172]) (using TLSv1) by exprod7ob107.postini.com ([64.18.6.12]) with SMTP ID DSNKTn5Syb3GLNWAz5DCSO2GWnnPfuemOokM@HIDDEN; Sat, 24 Sep 2011 14:59:41 PDT Received: by wyh21 with SMTP id 21so2515908wyh.3 for <bug-libtool@HIDDEN>; Sat, 24 Sep 2011 14:59:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.172.198 with SMTP id t48mr6817404wel.79.1316901575636; Sat, 24 Sep 2011 14:59:35 -0700 (PDT) Received: by 10.180.100.164 with HTTP; Sat, 24 Sep 2011 14:59:35 -0700 (PDT) Date: Sat, 24 Sep 2011 22:59:35 +0100 Message-ID: <CAOnWdojSq2X9+17-RoVmjTz_SdQdqcEnLVF3qERVMBbtZW-OTg@HIDDEN> Subject: -module is not enough to get an .so From: Reuben Thomas <rrt@HIDDEN> To: bug-libtool@HIDDEN Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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.2 (------) 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.2 (------) I want to build a test plugin in an automake project. For installed plugins, I add them to pkglib_LTLIBRARIES, and the relevant .so files are built in foo/.libs, whence I can extract them for testing. However, libraries in check_LTLIBRARIES (or noinst_LTLIBRARIES) do not have their .so files built, so my tests can't find them. I can't just use the .la files, as I'm not linking against the plugin files, but dlopening them (of course, using the appropriate variables to get the .so suffix and .libs directory name). I notice that in the .la file, dlname is empty for libraries in check_LTLIBRARIES, yet the relevant library has -module in its foo_la_LDFLAGS. The library is built, just not the .so file. From looking at the output of make V=1, the difference appears to be that the installed libraries are built with -rpath: /bin/bash ../../libtool --tag=CC --mode=link gcc -g -O2 -module -avoid-version -o struct.la -rpath /home/rrt/local/x86_64/lib/lua/5.1/alien struct.lo libtool: link: gcc -shared .libs/struct.o -Wl,-soname -Wl,struct.so -o .libs/struct.so libtool: link: gcc -shared .libs/core.o -lffi -Wl,-soname -Wl,core.so -o .libs/core.so libtool: link: ( cd ".libs" && rm -f "struct.la" && ln -s "../struct.la" "struct.la" ) libtool: link: ( cd ".libs" && rm -f "core.la" && ln -s "../core.la" "core.la" ) whereas the noinst/check libraries aren't: /bin/bash ../libtool --tag=CC --mode=link gcc -g -O2 -module -avoid-version -o alientest.la alientest.lo libtool: link: ar cru .libs/alientest.a .libs/alientest.o libtool: link: ranlib .libs/alientest.a libtool: link: ( cd ".libs" && rm -f "alientest.la" && ln -s "../alientest.la" "alientest.la" ) I'm using libtool 2.2.6b (and automake 1.11.1). I can't see anything in NEWS in git since 2.2.6b which bears on this issue. However, I can see that the omission of -rpath is intentional, from this commit message: commit f15fa67ff2df0c7c147b7f61062fe6594d75be99 Author: Tom Tromey <tromey@HIDDEN> Date: Sat Jan 13 18:56:19 2001 +0000 2001-01-13 Kevin Ryde <user42@HIDDEN> * automake.in (handle_ltlibraries): Omit -rpath from check_LTLIBRARIES, as per noinst_LTLIBRARIES. -- http://rrt.sc3d.org
Reuben Thomas <rrt@HIDDEN>
:bug-libtool@HIDDEN
.
Full text available.bug-libtool@HIDDEN
:bug#9595
; Package libtool
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.