GNU bug report logs - #15646
Multiple bugs related to -no-undefined and -nostdlib

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: Andy Lutomirski <luto@HIDDEN>; dated Fri, 18 Oct 2013 17:27:01 UTC; Maintainer for libtool is bug-libtool@HIDDEN.

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


Received: (at submit) by debbugs.gnu.org; 18 Oct 2013 17:26:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 18 13:26:26 2013
Received: from localhost ([127.0.0.1]:57145 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VXDoe-0004hn-Bz
	for submit <at> debbugs.gnu.org; Fri, 18 Oct 2013 13:26:25 -0400
Received: from eggs.gnu.org ([208.118.235.92]:57685)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <luto@HIDDEN>) id 1VXDRw-00047I-Pj
 for submit <at> debbugs.gnu.org; Fri, 18 Oct 2013 13:02:57 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <luto@HIDDEN>) id 1VXDRm-0006xt-Fs
 for submit <at> debbugs.gnu.org; Fri, 18 Oct 2013 13:02:51 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:38171)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <luto@HIDDEN>) id 1VXDRm-0006xp-Dg
 for submit <at> debbugs.gnu.org; Fri, 18 Oct 2013 13:02:46 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:59375)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <luto@HIDDEN>) id 1VXDRh-0007LH-S3
 for bug-libtool@HIDDEN; Fri, 18 Oct 2013 13:02:46 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <luto@HIDDEN>) id 1VXDRd-0006xE-Fv
 for bug-libtool@HIDDEN; Fri, 18 Oct 2013 13:02:41 -0400
Received: from mail-lb0-f177.google.com ([209.85.217.177]:63507)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <luto@HIDDEN>) id 1VXDRd-0006xA-8f
 for bug-libtool@HIDDEN; Fri, 18 Oct 2013 13:02:37 -0400
Received: by mail-lb0-f177.google.com with SMTP id u14so661299lbd.8
 for <bug-libtool@HIDDEN>; Fri, 18 Oct 2013 10:02:35 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to
 :content-type;
 bh=QcGj9u/giTGT1UrK5GcRvbu7fDamku14s1yR04e5yO4=;
 b=JLFt5DdxC5aasILF7xKWVA38HHLLZW0eDPqS6dnzC6neEFcVyOGert0dDs7vg4ZnE5
 bRu5SykHp+Nm1V1SsEGXmT+gKgQtXTFPxGvyxX4SFAT45wH2fZXwSlizhP5vT2EGfTAp
 EHe1YmkyGpZrT5gbwQdbCK9Z5ifT0z+6vTTxDeApE5lCvAXxwLIN9U7/8DGDoqTNxaDH
 KxTL+osSoVMumJ1EzTDX6+eenP4mkpqk9Y5znKurNG7YpKvR74WOqGVgfKeRNmz/U8rh
 oc61pM4ig06CSa76t1DwNNQXi+Z7ngj2TSwj+62OyML5SVkD5tzVOaGfmKqosaoA5xkg
 S+wg==
X-Gm-Message-State: ALoCoQmDIMyhJU0elwr24A86QM+IFrsQOH6Pn/SnAp5aFiBGPu/7uzSZAr2NjJTtNL2dDdfP0esc
X-Received: by 10.112.138.164 with SMTP id qr4mr1917081lbb.49.1382115755520;
 Fri, 18 Oct 2013 10:02:35 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.112.189.166 with HTTP; Fri, 18 Oct 2013 10:02:15 -0700 (PDT)
From: Andy Lutomirski <luto@HIDDEN>
Date: Fri, 18 Oct 2013 10:02:15 -0700
Message-ID: <CALCETrWe-r42UNiSx=KJMOBYqHBWojoCCfM7sz9yn8MA+6zrhw@HIDDEN>
Subject: Multiple bugs related to -no-undefined and -nostdlib
To: bug-libtool@HIDDEN
Content-Type: text/plain; charset=ISO-8859-1
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Fri, 18 Oct 2013 13:26:21 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
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>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

Hi-

I recently played with the build system for capnproto
(http://kentonv.github.io/capnproto/), and I think I found at least
three bugs in libtool:

1. -no-undefined is completely broken on Linux (and probably almost
every other non-Windows system).  It should pass -Wl,--no-undefined to
gcc for the link stage when building shared libraries.  It doesn't.
(This appears to be 100% consistent and reproducible.)

When I sent in a patch to work around that (by adding
-Wl,--no-undefined explicitly), other things broke.  So far, I've
discovered:

2. When building a c++ shared library with -pthread, g++ gets called
with -nostdlib [1], and libtool forgets to add -lpthread.  This can be
reproduced on Fedora 19 if you build this and remove the -lpthread
addition:

https://github.com/kentonv/capnproto/commit/798ff87b1b7e0a2da96355a34fa6e0aa10aaae85

3. There are reports of -nostdlib getting used without -lc on Solaris.
 This also breaks if --no-undefined is fixed.

[1] I cannot fathom why libtool thinks that -nostdlib is a good idea,
but I have no intention of adding to that argument.  This bug is about
that fact that -nostdlib is used incorrectly.  It could be fixed
either by removing it or by adding the missing libraries that are
supposed to be implied.

--Andy


-- 
Andy Lutomirski
AMA Capital Management, LLC




Acknowledgement sent to Andy Lutomirski <luto@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-libtool@HIDDEN. Full text available.
Report forwarded to bug-libtool@HIDDEN:
bug#15646; 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: Fri, 31 Oct 2014 17:00:04 UTC

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