GNU logs - #12880, boring messages


Message sent to bug-libtool@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#12880: Incorrect handling -Wl,--no-as-needed with libtool 2.4.2
Resent-From: Quanah Gibson-Mount <quanah@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-CC: bug-libtool@HIDDEN
Resent-Date: Tue, 13 Nov 2012 21:01:01 +0000
Resent-Message-ID: <handler.12880.B.13528404537954 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 12880
X-GNU-PR-Package: libtool
X-GNU-PR-Keywords: 
To: 12880 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-libtool@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.13528404537954
          (code B ref -1); Tue, 13 Nov 2012 21:01:01 +0000
Received: (at submit) by debbugs.gnu.org; 13 Nov 2012 21:00:53 +0000
Received: from localhost ([127.0.0.1]:39429 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TYNbJ-00024D-3P
	for submit <at> debbugs.gnu.org; Tue, 13 Nov 2012 16:00:53 -0500
Received: from eggs.gnu.org ([208.118.235.92]:55123)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <quanah@HIDDEN>) id 1TYNOv-0001lM-JH
	for submit <at> debbugs.gnu.org; Tue, 13 Nov 2012 15:48:06 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <quanah@HIDDEN>) id 1TYNON-0005eK-5k
	for submit <at> debbugs.gnu.org; Tue, 13 Nov 2012 15:47:34 -0500
Received: from lists.gnu.org ([208.118.235.17]:34928)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <quanah@HIDDEN>) id 1TYNON-0005eG-2i
	for submit <at> debbugs.gnu.org; Tue, 13 Nov 2012 15:47:31 -0500
Received: from eggs.gnu.org ([208.118.235.92]:40808)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <quanah@HIDDEN>) id 1TYNOK-0000Rr-0D
	for bug-libtool@HIDDEN; Tue, 13 Nov 2012 15:47:31 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <quanah@HIDDEN>) id 1TYNOG-0005dU-UD
	for bug-libtool@HIDDEN; Tue, 13 Nov 2012 15:47:27 -0500
Received: from edge02-zcs.vmware.com ([208.91.2.23]:40177)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <quanah@HIDDEN>) id 1TYNOG-0005dA-N7
	for bug-libtool@HIDDEN; Tue, 13 Nov 2012 15:47:24 -0500
Received: from localhost (localhost [127.0.0.1])
	by edge02-zcs.vmware.com (Postfix) with ESMTP id DD2C023F9
	for <bug-libtool@HIDDEN>; Tue, 13 Nov 2012 12:47:21 -0800 (PST)
X-Virus-Scanned: amavisd-new at edge02-zcs.vmware.com
Received: from edge02-zcs.vmware.com ([127.0.0.1])
	by localhost (edge02-zcs.vmware.com [127.0.0.1]) (amavisd-new,
	port 10026) with ESMTP id Go8QGqg0rkZ9 for <bug-libtool@HIDDEN>;
	Tue, 13 Nov 2012 12:47:06 -0800 (PST)
Received: from [192.168.1.43] (unknown [74.196.25.250])
	by edge02-zcs.vmware.com (Postfix) with ESMTPSA id 7E24821D5
	for <bug-libtool@HIDDEN>; Tue, 13 Nov 2012 12:47:06 -0800 (PST)
Date: Tue, 13 Nov 2012 12:47:10 -0800
From: Quanah Gibson-Mount <quanah@HIDDEN>
Message-ID: <E0E9647139CA32806B4D08A5@[192.168.1.43]>
X-Mailer: Mulberry/4.0.8 (Win32)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 208.118.235.17
X-Spam-Score: -4.2 (----)
X-Mailman-Approved-At: Tue, 13 Nov 2012 16:00:51 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
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: -4.2 (----)

I've noticed that libtool re-orders -Wl,-no-as-needed incorrectly.

For example:

 /bin/bash ./libtool --tag=CC   --mode=link gcc  -Wall -Wno-format -pipe 
-O3 -DNDEBUG -Wl,--no-as-needed -lm -avoid-version -shrext .so -L. -o 
libmod_convert.la -rpath /usr/local/lib libmod_convert_la-mod_convert.lo 
libconverter.a -ldl


The purpose of this is to force linking of -lm into the resulting object. 
However, when libtool re-orders this linking command and passes it to gcc, 
the result is:

libtool: link: gcc -shared  -fPIC -DPIC 
.libs/libmod_convert_la-mod_convert.o   -lm -L. libconverter.a -ldl  -O3 
-Wl,--no-as-needed   -Wl,-soname -Wl,libmod_convert.so -o 
.libs/libmod_convert.so

As you can see, the -Wl,--no-as-needed flag is moved *after* the call to 
link in libm.

I could not find any way in which to get libtool to correctly pass the 
linking flags to gcc.  A search via google seems to indicate this is a long 
standing known issue with libtool, as there is an extensive log in the 
debian bug reporter about it.

Since there is no bug reporter for libtool that I could find, I have no 
idea if it was ever reported upstream, although I would have thought so by 
now.

build@zre-ubuntu12-64:~/builds/UBUNTU12_64/main/20121113050101_NETWORK/ZimbraConvertd/src/c$ 
./libtool --version
libtool (GNU libtool) 2.4.2


I finally restored to completely disabling gcc as-needed in my gcc spec 
file so that the library would be built properly.

Thanks,
Quanah

--

Quanah Gibson-Mount
Sr. Member of Technical Staff
Zimbra, Inc
A Division of VMware, Inc.
--------------------
Zimbra ::  the leader in open source messaging and collaboration




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.428 (Entity 5.428)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Quanah Gibson-Mount <quanah@HIDDEN>
Subject: bug#12880: Acknowledgement (Incorrect handling -Wl,--no-as-needed
 with libtool 2.4.2)
Message-ID: <handler.12880.B.13528404537954.ack <at> debbugs.gnu.org>
References: <E0E9647139CA32806B4D08A5@[192.168.1.43]>
X-Gnu-PR-Message: ack 12880
X-Gnu-PR-Package: libtool
Reply-To: 12880 <at> debbugs.gnu.org
Date: Tue, 13 Nov 2012 21:01:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-libtool@HIDDEN

If you wish to submit further information on this problem, please
send it to 12880 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
12880: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D12880
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems



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.