GNU logs - #13414, boring messages


Message sent to bug-libtool@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#13414: Valid DLL def file mangled by libtool
Resent-From: Martin Doucha <doucha@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-CC: bug-libtool@HIDDEN
Resent-Date: Fri, 11 Jan 2013 15:54:02 +0000
Resent-Message-ID: <handler.13414.B.135791959228421 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 13414
X-GNU-PR-Package: libtool
X-GNU-PR-Keywords: 
To: 13414 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-libtool@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.135791959228421
          (code B ref -1); Fri, 11 Jan 2013 15:54:02 +0000
Received: (at submit) by debbugs.gnu.org; 11 Jan 2013 15:53:12 +0000
Received: from localhost ([127.0.0.1]:55678 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Ttgut-0007OL-9B
	for submit <at> debbugs.gnu.org; Fri, 11 Jan 2013 10:53:11 -0500
Received: from eggs.gnu.org ([208.118.235.92]:33172)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <doucha@HIDDEN>) id 1TtdDI-0000ow-2H
	for submit <at> debbugs.gnu.org; Fri, 11 Jan 2013 06:55:56 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <doucha@HIDDEN>) id 1TtdD1-0000tF-G0
	for submit <at> debbugs.gnu.org; Fri, 11 Jan 2013 06:55:44 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00,
	RECEIVED_FROM_WINDOWS_HOST autolearn=no version=3.3.2
Received: from lists.gnu.org ([208.118.235.17]:43862)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <doucha@HIDDEN>) id 1TtdD1-0000t9-De
	for submit <at> debbugs.gnu.org; Fri, 11 Jan 2013 06:55:39 -0500
Received: from eggs.gnu.org ([208.118.235.92]:44506)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <doucha@HIDDEN>) id 1TtdCy-00068r-DF
	for bug-libtool@HIDDEN; Fri, 11 Jan 2013 06:55:39 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <doucha@HIDDEN>) id 1TtdCq-0000rP-Sj
	for bug-libtool@HIDDEN; Fri, 11 Jan 2013 06:55:36 -0500
Received: from u121-99.static.grapesc.cz ([78.111.121.99]:59721
	helo=integri.cz) by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <doucha@HIDDEN>) id 1TtdCq-0000qs-Lr
	for bug-libtool@HIDDEN; Fri, 11 Jan 2013 06:55:28 -0500
X-Footer: aW50ZWdyaS5jeg==
Received: from localhost ([127.0.0.1]) by integri.cz (Kerio Connect 7.4.1)
	(using TLSv1/SSLv3 with cipher AES256-SHA (256 bits))
	for bug-libtool@HIDDEN; Fri, 11 Jan 2013 12:41:40 +0100
Message-ID: <50EFF8C2.2050505@HIDDEN>
Date: Fri, 11 Jan 2013 12:34:26 +0100
From: Martin Doucha <doucha@HIDDEN>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64;
	rv:16.0) Gecko/20121026 Thunderbird/16.0.2
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-2; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8
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: Fri, 11 Jan 2013 10:53:10 -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 (----)

Hi,
I'd like to report a bug in libtool 2.4 (including the latest git 
revision) which mangles valid DLL def files under MinGW and makes the 
linker barf.

The bug is caused by incorect check for "EXPORTS" keyword in the def 
file which libtool does this way:
if test "x`$SED 1q $export_symbols`" != xEXPORTS; then ... [add another 
"EXPORTS" line at the beginning of file]

This test is incorrect because the "EXPORTS" keyword does not have to 
appear on the very first line. You should replace the test with this:
if test "x`$GREP EXPORTS $export_symbols`" != xEXPORTS; then ...

Also note that this test appears on several places throughout libtool 
sources (both as "xEXPORTS" and just "EXPORTS") so you need to fix all 
of them.

Regards,
Martin Doucha





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: Martin Doucha <doucha@HIDDEN>
Subject: bug#13414: Acknowledgement (Valid DLL def file mangled by libtool)
Message-ID: <handler.13414.B.135791959228421.ack <at> debbugs.gnu.org>
References: <50EFF8C2.2050505@HIDDEN>
X-Gnu-PR-Message: ack 13414
X-Gnu-PR-Package: libtool
Reply-To: 13414 <at> debbugs.gnu.org
Date: Fri, 11 Jan 2013 15:54: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 13414 <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
13414: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D13414
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-libtool@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#13414: Valid DLL def file mangled by libtool
Resent-From: Peter Rosin <peda@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-CC: bug-libtool@HIDDEN
Resent-Date: Sat, 12 Jan 2013 00:27:02 +0000
Resent-Message-ID: <handler.13414.B13414.135795038710653 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 13414
X-GNU-PR-Package: libtool
X-GNU-PR-Keywords: 
To: Martin Doucha <doucha@HIDDEN>
Cc: 13414 <at> debbugs.gnu.org
Received: via spool by 13414-submit <at> debbugs.gnu.org id=B13414.135795038710653
          (code B ref 13414); Sat, 12 Jan 2013 00:27:02 +0000
Received: (at 13414) by debbugs.gnu.org; 12 Jan 2013 00:26:27 +0000
Received: from localhost ([127.0.0.1]:55913 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Ttova-0002ll-Iy
	for submit <at> debbugs.gnu.org; Fri, 11 Jan 2013 19:26:27 -0500
Received: from mail.lysator.liu.se ([130.236.254.3]:48811)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <peda@HIDDEN>) id 1TtovW-0002lZ-Us
	for 13414 <at> debbugs.gnu.org; Fri, 11 Jan 2013 19:26:24 -0500
Received: from mail.lysator.liu.se (localhost [127.0.0.1])
	by mail.lysator.liu.se (Postfix) with ESMTP id EF56340006;
	Sat, 12 Jan 2013 01:26:11 +0100 (CET)
Received: from [192.168.0.64] (90-227-119-137-no95.business.telia.com
	[90.227.119.137])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.lysator.liu.se (Postfix) with ESMTPSA id 9904F40005;
	Sat, 12 Jan 2013 01:26:11 +0100 (CET)
Message-ID: <50F0ADA2.5090102@HIDDEN>
Date: Sat, 12 Jan 2013 01:26:10 +0100
From: Peter Rosin <peda@HIDDEN>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64;
	rv:17.0) Gecko/17.0 Thunderbird/17.0
MIME-Version: 1.0
References: <50EFF8C2.2050505@HIDDEN>
In-Reply-To: <50EFF8C2.2050505@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-Spam-Score: 0.8 (/)
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: 0.8 (/)

Hi Martin,

Thanks for the report.

On 2013-01-11 12:34, Martin Doucha wrote:
> Hi,
> I'd like to report a bug in libtool 2.4 (including the latest git revision) which mangles valid DLL def files under MinGW and makes the linker barf.
> 
> The bug is caused by incorect check for "EXPORTS" keyword in the def file which libtool does this way:
> if test "x`$SED 1q $export_symbols`" != xEXPORTS; then ... [add another "EXPORTS" line at the beginning of file]
> 
> This test is incorrect because the "EXPORTS" keyword does not have to appear on the very first line. You should replace the test with this:
> if test "x`$GREP EXPORTS $export_symbols`" != xEXPORTS; then ...
> 
> Also note that this test appears on several places throughout libtool sources (both as "xEXPORTS" and just "EXPORTS") so you need to fix all of them.

This issue has been reported before [1].

It's been on my back burner for a while, but I've been held up by
build system issues. At least, that's my excuse :-)

Anyway, I think your suggested alternative with grep is a bit too
relaxed, as any symbol involving the substring "EXPORTS" would
trigger it. Also, it scans the whole file, which is suboptimal.

I'm looking into a patch that uses

	$SED -n \
	    -e '/^[ 	]*//' \
	    -e '/^;/D' \
	    -e '/^$/D' \
	    -e 's/^EXPORTS.*/DEF/p' \
	    -e 's/^LIBRARY.*/DEF/p' \
	    -e q \
	    $export_symbols

instead (coupled with a test for "DEF" instead, naturally). Does
anybody have any issues with such a beast? Yes, I know that it
will not catch any valid .def file, but I don't fancy writing a
full .def file parser for this [2].

The above steps past initial comment and whitespace lines waiting
for the first "real" line, and triggers if it starts with EXPORTS
or LIBRARY (at least, that's the intention...)

[1] http://lists.gnu.org/archive/html/libtool/2012-02/msg00023.html
[2] http://msdn.microsoft.com/en-us/library/h41zhe21(v=vs.110).aspx

Cheers,
Peter





Message sent to bug-libtool@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#13414: Valid DLL def file mangled by libtool
Resent-From: Peter Rosin <peda@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-CC: bug-libtool@HIDDEN
Resent-Date: Mon, 14 Jan 2013 14:15:02 +0000
Resent-Message-ID: <handler.13414.B13414.135817284731853 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 13414
X-GNU-PR-Package: libtool
X-GNU-PR-Keywords: 
To: Earnie Boyd <earnie@HIDDEN>
Cc: 13414 <at> debbugs.gnu.org
Received: via spool by 13414-submit <at> debbugs.gnu.org id=B13414.135817284731853
          (code B ref 13414); Mon, 14 Jan 2013 14:15:02 +0000
Received: (at 13414) by debbugs.gnu.org; 14 Jan 2013 14:14:07 +0000
Received: from localhost ([127.0.0.1]:59481 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Tukne-0008Hi-FE
	for submit <at> debbugs.gnu.org; Mon, 14 Jan 2013 09:14:06 -0500
Received: from mail.lysator.liu.se ([130.236.254.3]:55562)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <peda@HIDDEN>) id 1Tuknc-0008HZ-42
	for 13414 <at> debbugs.gnu.org; Mon, 14 Jan 2013 09:14:05 -0500
Received: from mail.lysator.liu.se (localhost [127.0.0.1])
	by mail.lysator.liu.se (Postfix) with ESMTP id D107640022;
	Mon, 14 Jan 2013 15:13:38 +0100 (CET)
Received: from [192.168.0.64] (90-227-119-137-no95.business.telia.com
	[90.227.119.137])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.lysator.liu.se (Postfix) with ESMTPSA id 659EA4001E;
	Mon, 14 Jan 2013 15:13:38 +0100 (CET)
Message-ID: <50F41291.8080509@HIDDEN>
Date: Mon, 14 Jan 2013 15:13:37 +0100
From: Peter Rosin <peda@HIDDEN>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64;
	rv:17.0) Gecko/17.0 Thunderbird/17.0
MIME-Version: 1.0
References: <50EFF8C2.2050505@HIDDEN> <50F0ADA2.5090102@HIDDEN>
	<CA+sc5m=J18w9vFL53HKc01+bdnGSHtXK3Wz5PXO1pSid=s7MMQ@HIDDEN>
In-Reply-To: <CA+sc5m=J18w9vFL53HKc01+bdnGSHtXK3Wz5PXO1pSid=s7MMQ@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-Spam-Score: 0.8 (/)
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: 0.8 (/)

On 2013-01-13 16:56, Earnie Boyd wrote:
> On Fri, Jan 11, 2013 at 7:26 PM, Peter Rosin wrote:
>>         $SED -n \
>>             -e '/^[     ]*//' \
>>             -e '/^;/D' \
>>             -e '/^$/D' \
>>             -e 's/^EXPORTS.*/DEF/p' \
>>             -e 's/^LIBRARY.*/DEF/p' \
>>             -e q \
>>             $export_symbols
>>
>> instead (coupled with a test for "DEF" instead, naturally). Does
>> anybody have any issues with such a beast? Yes, I know that it
>> will not catch any valid .def file, but I don't fancy writing a
>> full .def file parser for this [2].
>>
>> The above steps past initial comment and whitespace lines waiting
>> for the first "real" line, and triggers if it starts with EXPORTS
>> or LIBRARY (at least, that's the intention...)
> 
> Does GCC DTRT with LIBRARY?  Or is anyone using libtool with MSVC?

A short while binutils required "LIBRARY", if present, to be the first
statement in the .def file (which is a requirement consistent with
MSDN). I believe this requirement has been lifted from binutils.

I'm using libtool with MSVC, but I have never used a LIBRARY statement
myself.

> I.E.: The file containing LIBRARY tells the link command to create a
> DLL and the import library file (unless a .exp file is also used) but
> only if the /DLL switch is used.

I don't understand this, I thought the /DLL switch accomplished most of
that by itself? I thought LIBRARY only provided the library name, which
can also be specified on the command line (using the -Fe option to cl.exe
or the -OUT option to link.exe). Since the command line overrides the
LIBRARY statement, it seems a bit useless from the libtool p.o.v. as
libtool is always providing the library name on the command line. No?

To me, this is only about libtool recognizing preexisting .def files
that are written without libtool in mind (or at least, not with only
libtool in mind), and not about supporting constructs in .def that are
actually needed by libtool. From the libtool side, the .def file needs
to (currently) start with EXPORTS, and since LIBRARY (and NAME)
statements are of no use to libtool they might just as well be zapped
so that EXPORTS actually is first. But if you want to use the same .def
file from a non-libtool setting, you might have some very good reason
to include LIBRARY (or NAME) in it, and then you'd want to have that
as the first statement (according to MSDN). But that kills things in
libtool, since it then prepends a faulty EXPORTS to the .def file (it's
wrongly assuming that the perfectly fine .def file is a plain symbol
list when the file doesn't start with EXPORTS).

I might easily be missing something...

Cheers,
Peter





Message sent to bug-libtool@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#13414: Valid DLL def file mangled by libtool
Resent-From: Earnie Boyd <earnie@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-CC: bug-libtool@HIDDEN
Resent-Date: Wed, 16 Jan 2013 15:05:02 +0000
Resent-Message-ID: <handler.13414.B13414.135834864215861 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 13414
X-GNU-PR-Package: libtool
X-GNU-PR-Keywords: 
To: Peter Rosin <peda@HIDDEN>
Cc: 13414 <at> debbugs.gnu.org
Received: via spool by 13414-submit <at> debbugs.gnu.org id=B13414.135834864215861
          (code B ref 13414); Wed, 16 Jan 2013 15:05:02 +0000
Received: (at 13414) by debbugs.gnu.org; 16 Jan 2013 15:04:02 +0000
Received: from localhost ([127.0.0.1]:35412 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TvUX3-00047V-Q7
	for submit <at> debbugs.gnu.org; Wed, 16 Jan 2013 10:04:02 -0500
Received: from mail-qc0-f178.google.com ([209.85.216.178]:56978)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <eboyd53sf@HIDDEN>) id 1TvUX1-00047M-Er
	for 13414 <at> debbugs.gnu.org; Wed, 16 Jan 2013 10:04:00 -0500
Received: by mail-qc0-f178.google.com with SMTP id j34so949183qco.9
	for <13414 <at> debbugs.gnu.org>; Wed, 16 Jan 2013 07:03:23 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:x-received:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type;
	bh=vpiKllQ19zHcDiIC60BG6fSFQg03hyp4JMD0LpyGoKc=;
	b=EVtNbBMDjSYfPsrQ1sjiImkTBN8rABXjItOiFugJAnG3FJGEMQ6noNzKX9XetZBJww
	82BNG6W1l36ILR+IMbhN4yyKwnCV5hC6ScwYWX98P/JrLNwMrsaVeWO1yxawFwAOaCzx
	1ESJyMreYlIhNE9GIj8Z7pxQizhrKQVIFGE3twIOuwb7vuuXGWCuLs0RFARVqItO3Wnf
	OVWg2h3jiPisuBRp6nniu+WjAgfkahkjPKzV98N+hBU5Qd9nKRLQFpuzXWQej5Sdx9/X
	wTUwKRx272kSGzQOao3QtaUDvns0wBnnp/Q7HpUrYq5SUhO1urhpLrmvOSwIuUdtH+yH
	m2NA==
MIME-Version: 1.0
X-Received: by 10.229.195.81 with SMTP id eb17mr353530qcb.93.1358348603379;
	Wed, 16 Jan 2013 07:03:23 -0800 (PST)
Received: by 10.49.116.5 with HTTP; Wed, 16 Jan 2013 07:03:23 -0800 (PST)
In-Reply-To: <50F41291.8080509@HIDDEN>
References: <50EFF8C2.2050505@HIDDEN> <50F0ADA2.5090102@HIDDEN>
	<CA+sc5m=J18w9vFL53HKc01+bdnGSHtXK3Wz5PXO1pSid=s7MMQ@HIDDEN>
	<50F41291.8080509@HIDDEN>
Date: Wed, 16 Jan 2013 10:03:23 -0500
X-Google-Sender-Auth: nfX9XMkyNgIU17gj4RcS22r5O2A
Message-ID: <CA+sc5mm2j1v3OnFRK_MXaBx0vvKFX0xZMswBkfurAfDEYzCsAg@HIDDEN>
From: Earnie Boyd <earnie@HIDDEN>
Content-Type: text/plain; charset=UTF-8
X-Spam-Score: 0.1 (/)
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: -2.6 (--)

On Mon, Jan 14, 2013 at 9:13 AM, Peter Rosin wrote:
> On 2013-01-13 16:56, Earnie Boyd wrote:
>> On Fri, Jan 11, 2013 at 7:26 PM, Peter Rosin wrote:
>>>         $SED -n \
>>>             -e '/^[     ]*//' \
>>>             -e '/^;/D' \
>>>             -e '/^$/D' \
>>>             -e 's/^EXPORTS.*/DEF/p' \
>>>             -e 's/^LIBRARY.*/DEF/p' \
>>>             -e q \
>>>             $export_symbols
>>>
>>> instead (coupled with a test for "DEF" instead, naturally). Does
>>> anybody have any issues with such a beast? Yes, I know that it
>>> will not catch any valid .def file, but I don't fancy writing a
>>> full .def file parser for this [2].
>>>
>>> The above steps past initial comment and whitespace lines waiting
>>> for the first "real" line, and triggers if it starts with EXPORTS
>>> or LIBRARY (at least, that's the intention...)
>>
>> Does GCC DTRT with LIBRARY?  Or is anyone using libtool with MSVC?
>
> A short while binutils required "LIBRARY", if present, to be the first
> statement in the .def file (which is a requirement consistent with
> MSDN). I believe this requirement has been lifted from binutils.
>

Yes, based on the documentation LIBRARY should be the first line of
the file and the name is optional.

> I'm using libtool with MSVC, but I have never used a LIBRARY statement
> myself.
>

This alone is enough for libtool to consider it.

>> I.E.: The file containing LIBRARY tells the link command to create a
>> DLL and the import library file (unless a .exp file is also used) but
>> only if the /DLL switch is used.
>
> I don't understand this, I thought the /DLL switch accomplished most of
> that by itself? I thought LIBRARY only provided the library name, which
> can also be specified on the command line (using the -Fe option to cl.exe
> or the -OUT option to link.exe). Since the command line overrides the
> LIBRARY statement, it seems a bit useless from the libtool p.o.v. as
> libtool is always providing the library name on the command line. No?
>

So even though it exists it should be pretty much meaningless to libtool.

> To me, this is only about libtool recognizing preexisting .def files
> that are written without libtool in mind (or at least, not with only
> libtool in mind), and not about supporting constructs in .def that are
> actually needed by libtool. From the libtool side, the .def file needs
> to (currently) start with EXPORTS, and since LIBRARY (and NAME)
> statements are of no use to libtool they might just as well be zapped
> so that EXPORTS actually is first. But if you want to use the same .def
> file from a non-libtool setting, you might have some very good reason
> to include LIBRARY (or NAME) in it, and then you'd want to have that
> as the first statement (according to MSDN). But that kills things in
> libtool, since it then prepends a faulty EXPORTS to the .def file (it's
> wrongly assuming that the perfectly fine .def file is a plain symbol
> list when the file doesn't start with EXPORTS).

There can be only one LIBRARY statement and it must be on the first
non-empty line of the file.

However from http://msdn.microsoft.com/en-us/library/hyx1zcd3(v=vs.71).aspx
we see:

The EXPORTS statement introduces a section of one or more definitions
that are exported functions or data. Each definition must be on a
separate line. The EXPORTS keyword can be on the same line as the
first definition or on a preceding line. The .def file can contain one
or more EXPORTS statements.

Notice the last sentence of the quote.  Also notice that the first
definition can be on the same line as the EXPORTS keyword.

-- 
Earnie
-- https://sites.google.com/site/earnieboyd




Message sent to bug-libtool@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#13414: Valid DLL def file mangled by libtool
Resent-From: Peter Rosin <peda@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-CC: bug-libtool@HIDDEN
Resent-Date: Fri, 18 Jan 2013 10:31:02 +0000
Resent-Message-ID: <handler.13414.B13414.135850503623068 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 13414
X-GNU-PR-Package: libtool
X-GNU-PR-Keywords: 
To: Earnie Boyd <earnie@HIDDEN>
Cc: 13414 <at> debbugs.gnu.org
Received: via spool by 13414-submit <at> debbugs.gnu.org id=B13414.135850503623068
          (code B ref 13414); Fri, 18 Jan 2013 10:31:02 +0000
Received: (at 13414) by debbugs.gnu.org; 18 Jan 2013 10:30:36 +0000
Received: from localhost ([127.0.0.1]:37990 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Tw9DY-000601-3e
	for submit <at> debbugs.gnu.org; Fri, 18 Jan 2013 05:30:36 -0500
Received: from mail.lysator.liu.se ([130.236.254.3]:49051)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <peda@HIDDEN>) id 1Tw9DU-0005zr-GO
	for 13414 <at> debbugs.gnu.org; Fri, 18 Jan 2013 05:30:34 -0500
Received: from mail.lysator.liu.se (localhost [127.0.0.1])
	by mail.lysator.liu.se (Postfix) with ESMTP id D7E1540006;
	Fri, 18 Jan 2013 11:29:44 +0100 (CET)
Received: from [192.168.0.64] (90-227-119-137-no95.business.telia.com
	[90.227.119.137])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.lysator.liu.se (Postfix) with ESMTPSA id 9051040005;
	Fri, 18 Jan 2013 11:29:44 +0100 (CET)
Message-ID: <50F92417.9080809@HIDDEN>
Date: Fri, 18 Jan 2013 11:29:43 +0100
From: Peter Rosin <peda@HIDDEN>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64;
	rv:17.0) Gecko/17.0 Thunderbird/17.0
MIME-Version: 1.0
References: <50EFF8C2.2050505@HIDDEN> <50F0ADA2.5090102@HIDDEN>
	<CA+sc5m=J18w9vFL53HKc01+bdnGSHtXK3Wz5PXO1pSid=s7MMQ@HIDDEN>
	<50F41291.8080509@HIDDEN>
	<CA+sc5mm2j1v3OnFRK_MXaBx0vvKFX0xZMswBkfurAfDEYzCsAg@HIDDEN>
In-Reply-To: <CA+sc5mm2j1v3OnFRK_MXaBx0vvKFX0xZMswBkfurAfDEYzCsAg@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-Spam-Score: -1.9 (-)
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: -1.9 (-)

On 2013-01-16 16:03, Earnie Boyd wrote:
> On Mon, Jan 14, 2013 at 9:13 AM, Peter Rosin wrote:
>> On 2013-01-13 16:56, Earnie Boyd wrote:
>>> On Fri, Jan 11, 2013 at 7:26 PM, Peter Rosin wrote:
>>>>         $SED -n \
>>>>             -e '/^[     ]*//' \
>>>>             -e '/^;/D' \
>>>>             -e '/^$/D' \
>>>>             -e 's/^EXPORTS.*/DEF/p' \
>>>>             -e 's/^LIBRARY.*/DEF/p' \
>>>>             -e q \
>>>>             $export_symbols

After some experimenting, I now have:

	$SED -n \
	    -e 's/^[ 	]*//' \
	    -e '/^\(;.*\)*$/d' \
	    -e 's/^\(EXPORTS\|LIBRARY\)\([ 	].*\)*$/DEF/p' \
	    -e q \
	    $export_symbols


>> I'm using libtool with MSVC, but I have never used a LIBRARY statement
>> myself.
>>
> 
> This alone is enough for libtool to consider it.

Consider what? Did you forget a negation?

>>> I.E.: The file containing LIBRARY tells the link command to create a
>>> DLL and the import library file (unless a .exp file is also used) but
>>> only if the /DLL switch is used.
>>
>> I don't understand this, I thought the /DLL switch accomplished most of
>> that by itself? I thought LIBRARY only provided the library name, which
>> can also be specified on the command line (using the -Fe option to cl.exe
>> or the -OUT option to link.exe). Since the command line overrides the
>> LIBRARY statement, it seems a bit useless from the libtool p.o.v. as
>> libtool is always providing the library name on the command line. No?
>>
> 
> So even though it exists it should be pretty much meaningless to libtool.

I did some tests to see how LIBRARY affects things and it turns out it
is not meaningless. What the MSDN documentation appears to mean is that
if you do not specify any library name on the command line, the LIBRARY
statements set the name of the DLL file. But the name referred to inside
the import library will always be the name provided with the LIBRARY
statement, regardless of any command line options.

I.e., when libtool is called like this:

	./libtool --mode=link ./compile cl foo.lo -o foo.la \
	-no-undefined -rpath /nowhere

the relevant parts (after going through a bunch of layers) with a
libtool configured for MSVC is:

	cl .libs/foo.obj -Fe.libs/foo-0.dll \
	-link -dll -implib:.libs/foo.dll.lib

(which means, link foo.obj into a -dll named foo-0.dll and also generate
an import library named foo.dll.lib)

If you then mix in a .def file starting with

	LIBRARY bar

you will get the same names of the files (foo-0.dll and foo.dll.lib), but
executables linked with foo.dll.lib will require the non-existing bar.dll
at runtime.

Similarly, the relevant parts with a libtool configured for GNU is:

	gcc -shared .libs/a.o -o .libs/cyga-0.dll \
	-Xlinker --out-implib -Xlinker .libs/liba.dll.a

and mixing in a .def file starting with

	LIBRARY bar

seems to have the same effect here, namely still create a cyga-0.dll
and an import lib liba.dll.a, but executables linked with liba.dll.a
will request bar.dll at runtime.

So, the LIBRARY statement does have an effect (not that you can currently
use it with libtool, I had to patch things to make it work for the
above tests) but I'm not sure how you can make any sane use of the
feature. I mean, whats the point of referring to a non-existant dll?
I guess you can rename the .dll file manually as a post-processing
step so that the import library is pointing to something that exists,
but that seems a bit convoluted.

>> To me, this is only about libtool recognizing preexisting .def files
>> that are written without libtool in mind (or at least, not with only
>> libtool in mind), and not about supporting constructs in .def that are
>> actually needed by libtool. From the libtool side, the .def file needs
>> to (currently) start with EXPORTS, and since LIBRARY (and NAME)
>> statements are of no use to libtool they might just as well be zapped
>> so that EXPORTS actually is first. But if you want to use the same .def
>> file from a non-libtool setting, you might have some very good reason
>> to include LIBRARY (or NAME) in it, and then you'd want to have that
>> as the first statement (according to MSDN). But that kills things in
>> libtool, since it then prepends a faulty EXPORTS to the .def file (it's
>> wrongly assuming that the perfectly fine .def file is a plain symbol
>> list when the file doesn't start with EXPORTS).
> 
> There can be only one LIBRARY statement and it must be on the first
> non-empty line of the file.
> 
> However from http://msdn.microsoft.com/en-us/library/hyx1zcd3(v=vs.71).aspx
> we see:
> 
> The EXPORTS statement introduces a section of one or more definitions
> that are exported functions or data. Each definition must be on a
> separate line. The EXPORTS keyword can be on the same line as the
> first definition or on a preceding line. The .def file can contain one
> or more EXPORTS statements.

This .def file seems to work just fine to export a "v1" data item and
a "v2" function using GNU tools:

	EXPORT v1 DATA v2

But the MSVC linker barf and wants one symbol per line, e.g. like this

	EXPORT v1 DATA
	v2

When reading the MSDN about .def files, I agree with the GNU interpretation,
but I have found MSDN to be lacking in a great many places, so one should
never put more than one symbol on one line I suppose...

> Notice the last sentence of the quote.  Also notice that the first
> definition can be on the same line as the EXPORTS keyword.

Yes, I saw that.

Cheers,
Peter





Message sent to bug-libtool@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#13414: Valid DLL def file mangled by libtool
Resent-From: Peter Rosin <peda@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-CC: bug-libtool@HIDDEN
Resent-Date: Fri, 18 Jan 2013 22:57:01 +0000
Resent-Message-ID: <handler.13414.B13414.13585497883105 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 13414
X-GNU-PR-Package: libtool
X-GNU-PR-Keywords: 
To: Martin Doucha <doucha@HIDDEN>
Cc: erik-gnu@HIDDEN, 13414 <at> debbugs.gnu.org, Libtool Patches List <libtool-patches@HIDDEN>
Received: via spool by 13414-submit <at> debbugs.gnu.org id=B13414.13585497883105
          (code B ref 13414); Fri, 18 Jan 2013 22:57:01 +0000
Received: (at 13414) by debbugs.gnu.org; 18 Jan 2013 22:56:28 +0000
Received: from localhost ([127.0.0.1]:39223 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TwKrL-0000o1-Ap
	for submit <at> debbugs.gnu.org; Fri, 18 Jan 2013 17:56:27 -0500
Received: from mail.lysator.liu.se ([130.236.254.3]:39781)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <peda@HIDDEN>) id 1TwKrF-0000nm-RR
	for 13414 <at> debbugs.gnu.org; Fri, 18 Jan 2013 17:56:24 -0500
Received: from mail.lysator.liu.se (localhost [127.0.0.1])
	by mail.lysator.liu.se (Postfix) with ESMTP id 81F594000A;
	Fri, 18 Jan 2013 23:55:31 +0100 (CET)
Received: from [192.168.0.64] (90-227-119-137-no95.business.telia.com
	[90.227.119.137])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.lysator.liu.se (Postfix) with ESMTPSA id 0301540008;
	Fri, 18 Jan 2013 23:55:29 +0100 (CET)
Message-ID: <50F9D2E1.9040403@HIDDEN>
Date: Fri, 18 Jan 2013 23:55:29 +0100
From: Peter Rosin <peda@HIDDEN>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64;
	rv:17.0) Gecko/17.0 Thunderbird/17.0
MIME-Version: 1.0
References: <50EFF8C2.2050505@HIDDEN> <50F0ADA2.5090102@HIDDEN>
In-Reply-To: <50F0ADA2.5090102@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-Spam-Score: -1.9 (-)
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: -1.9 (-)

Hi Martin, Erik,

On 2013-01-12 01:26, Peter Rosin wrote:
> Hi Martin,
> 
> Thanks for the report.
> 
> On 2013-01-11 12:34, Martin Doucha wrote:
>> Hi,
>> I'd like to report a bug in libtool 2.4 (including the latest git revision) which mangles valid DLL def files under MinGW and makes the linker barf.
>>
>> The bug is caused by incorect check for "EXPORTS" keyword in the def file which libtool does this way:
>> if test "x`$SED 1q $export_symbols`" != xEXPORTS; then ... [add another "EXPORTS" line at the beginning of file]
>>
>> This test is incorrect because the "EXPORTS" keyword does not have to appear on the very first line. You should replace the test with this:
>> if test "x`$GREP EXPORTS $export_symbols`" != xEXPORTS; then ...
>>
>> Also note that this test appears on several places throughout libtool sources (both as "xEXPORTS" and just "EXPORTS") so you need to fix all of them.
> 
> This issue has been reported before [1].
> 
> It's been on my back burner for a while, but I've been held up by
> build system issues. At least, that's my excuse :-)
> 
> Anyway, I think your suggested alternative with grep is a bit too
> relaxed, as any symbol involving the substring "EXPORTS" would
> trigger it. Also, it scans the whole file, which is suboptimal.
> 
> I'm looking into a patch that uses
> 
> 	$SED -n \
> 	    -e '/^[ 	]*//' \
> 	    -e '/^;/D' \
> 	    -e '/^$/D' \
> 	    -e 's/^EXPORTS.*/DEF/p' \
> 	    -e 's/^LIBRARY.*/DEF/p' \
> 	    -e q \
> 	    $export_symbols
> 
> instead (coupled with a test for "DEF" instead, naturally). Does
> anybody have any issues with such a beast? Yes, I know that it
> will not catch any valid .def file, but I don't fancy writing a
> full .def file parser for this [2].
> 
> The above steps past initial comment and whitespace lines waiting
> for the first "real" line, and triggers if it starts with EXPORTS
> or LIBRARY (at least, that's the intention...)
> 
> [1] http://lists.gnu.org/archive/html/libtool/2012-02/msg00023.html
> [2] http://msdn.microsoft.com/en-us/library/h41zhe21(v=vs.110).aspx

I'm back, with suggested changes against latest git, and I'm curious
if it is enough to solve your problem?

If you are not able to check for some reason, it might be possible for
you to provide the .def file you had the problem with? (this question
was mainly for Martin, Erik had enough specifics in his report)

Also, while I recognize that my evaluation of Martin's patch was
flawed in that his grep-based patch doesn't trigger on any symbol
with EXPORTS as a substring (which I stated, I was using the
mental model of my patch on his code, and stumbled), it still
reads the whole .def file and doesn't catch .def files with a
symbol on the same line as the EXPORTS keyword...

So, as hinted above, I'm following up with a pair of patches that
appear to mend this.

Ok to push?

Or are the white-space changes in the first patch too intrusive?

Cheers,
Peter





Message sent to bug-libtool@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#13414: [PATCH 1/2] libtool: allow tabs in $cmds variables
Resent-From: Peter Rosin <peda@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-CC: bug-libtool@HIDDEN
Resent-Date: Fri, 18 Jan 2013 22:59:02 +0000
Resent-Message-ID: <handler.13414.B13414.13585499013296 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 13414
X-GNU-PR-Package: libtool
X-GNU-PR-Keywords: 
To: Martin Doucha <doucha@HIDDEN>
Cc: 13414 <at> debbugs.gnu.org, erik-gnu@HIDDEN, Libtool Patches List <libtool-patches@HIDDEN>
Received: via spool by 13414-submit <at> debbugs.gnu.org id=B13414.13585499013296
          (code B ref 13414); Fri, 18 Jan 2013 22:59:02 +0000
Received: (at 13414) by debbugs.gnu.org; 18 Jan 2013 22:58:21 +0000
Received: from localhost ([127.0.0.1]:39227 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TwKtA-0000r4-8i
	for submit <at> debbugs.gnu.org; Fri, 18 Jan 2013 17:58:21 -0500
Received: from mail.lysator.liu.se ([130.236.254.3]:33560)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <peda@HIDDEN>) id 1TwKt6-0000qw-H6
	for 13414 <at> debbugs.gnu.org; Fri, 18 Jan 2013 17:58:19 -0500
Received: from mail.lysator.liu.se (localhost [127.0.0.1])
	by mail.lysator.liu.se (Postfix) with ESMTP id 4085F4000A;
	Fri, 18 Jan 2013 23:57:27 +0100 (CET)
Received: from [192.168.0.64] (90-227-119-137-no95.business.telia.com
	[90.227.119.137])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.lysator.liu.se (Postfix) with ESMTPSA id DD41E40008;
	Fri, 18 Jan 2013 23:57:26 +0100 (CET)
Message-ID: <50F9D356.4070804@HIDDEN>
Date: Fri, 18 Jan 2013 23:57:26 +0100
From: Peter Rosin <peda@HIDDEN>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64;
	rv:17.0) Gecko/17.0 Thunderbird/17.0
MIME-Version: 1.0
References: <50EFF8C2.2050505@HIDDEN> <50F0ADA2.5090102@HIDDEN>
	<50F9D2E1.9040403@HIDDEN>
In-Reply-To: <50F9D2E1.9040403@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-Spam-Score: -1.9 (-)
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: -1.9 (-)

build-aux/ltmain.in (func_execute_cmds, func_mode_link): Don't collapse
tabs and surrounding whitespace into a single space when executing a
tilde-separated cmds construct, instead keep any tabs intact.
m4/libtool.m4: Convert indenting tabs to spaces for all *_cmds
variables affected by the above.

Signed-off-by: Peter Rosin <peda@HIDDEN>
---
 build-aux/ltmain.in |    8 ++-
 m4/libtool.m4       |  170 +++++++++++++++++++++++++-------------------------
 2 files changed, 91 insertions(+), 87 deletions(-)

diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index c8cdb9c..eb224e3 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -656,8 +656,10 @@ func_execute_cmds ()
 
     save_ifs=$IFS; IFS='~'
     for cmd in $1; do
-      IFS=$save_ifs
+      IFS=' ''
+'
       eval cmd=\"$cmd\"
+      IFS=$save_ifs
       func_show_eval "$cmd" "${2-:}"
     done
     IFS=$save_ifs
@@ -7964,8 +7966,10 @@ EOF
 
 	save_ifs=$IFS; IFS='~'
 	for cmd in $cmds; do
-	  IFS=$save_ifs
+	  IFS=' ''
+'
 	  eval cmd=\"$cmd\"
+	  IFS=$save_ifs
 	  $opt_quiet || {
 	    func_quote_for_expand "$cmd"
 	    eval "func_echo $func_quote_for_expand_result"
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index eb44de6..4bc9e98 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -4785,12 +4785,12 @@ _LT_EOF
 	# If the export-symbols file already is a .def file (1st line
 	# is EXPORTS), use it as is; otherwise, prepend...
 	_LT_TAGVAR(archive_expsym_cmds, $1)='if test EXPORTS = "`$SED 1q $export_symbols`"; then
-	  cp $export_symbols $output_objdir/$soname.def;
-	else
-	  echo EXPORTS > $output_objdir/$soname.def;
-	  cat $export_symbols >> $output_objdir/$soname.def;
-	fi~
-	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+          cp $export_symbols $output_objdir/$soname.def;
+        else
+          echo EXPORTS > $output_objdir/$soname.def;
+          cat $export_symbols >> $output_objdir/$soname.def;
+        fi~
+        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
       else
 	_LT_TAGVAR(ld_shlibs, $1)=no
       fi
@@ -4868,9 +4868,9 @@ _LT_EOF
 
         if test yes = "$supports_anon_versioning"; then
           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-	    echo "local: *; };" >> $output_objdir/$libname.ver~
-	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
+            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+            echo "local: *; };" >> $output_objdir/$libname.ver~
+            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
         fi
 
 	case $cc_basename in
@@ -4881,9 +4881,9 @@ _LT_EOF
 	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
 	  if test yes = "$supports_anon_versioning"; then
 	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-	      echo "local: *; };" >> $output_objdir/$libname.ver~
-	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+              echo "local: *; };" >> $output_objdir/$libname.ver~
+              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
 	  fi
 	  ;;
 	esac
@@ -5163,13 +5163,13 @@ _LT_EOF
 	# FIXME: Setting linknames here is a bad hack.
 	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
 	_LT_TAGVAR(archive_expsym_cmds, $1)='if test EXPORTS = "`$SED 1q $export_symbols`"; then
-	    cp "$export_symbols" "$output_objdir/$soname.def";
-	    echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
-	  else
-	    $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
-	  fi~
-	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
-	  linknames='
+            cp "$export_symbols" "$output_objdir/$soname.def";
+            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+          else
+            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+          fi~
+          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+          linknames='
 	# The linker will not automatically build a static lib if we build a DLL.
 	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
 	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
@@ -5178,18 +5178,18 @@ _LT_EOF
 	# Don't use ranlib
 	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
 	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
-	  lt_tool_outputfile="@TOOL_OUTPUT@"~
-	  case $lt_outputfile in
-	    *.exe|*.EXE) ;;
-	    *)
-	      lt_outputfile=$lt_outputfile.exe
-	      lt_tool_outputfile=$lt_tool_outputfile.exe
-	      ;;
-	  esac~
-	  if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
-	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
-	    $RM "$lt_outputfile.manifest";
-	  fi'
+          lt_tool_outputfile="@TOOL_OUTPUT@"~
+          case $lt_outputfile in
+            *.exe|*.EXE) ;;
+            *)
+              lt_outputfile=$lt_outputfile.exe
+              lt_tool_outputfile=$lt_tool_outputfile.exe
+              ;;
+          esac~
+          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+            $RM "$lt_outputfile.manifest";
+          fi'
 	;;
       *)
 	# Assume MSVC wrapper
@@ -5445,7 +5445,7 @@ _LT_EOF
 	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
 	_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
-	$CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
+          $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
 
 	# Both c and cxx compiler support -rpath directly
 	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
@@ -5460,20 +5460,20 @@ _LT_EOF
 	wlarc='$wl'
 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
 	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+          $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
       else
 	case `$CC -V 2>&1` in
 	*"Compilers 5.0"*)
 	  wlarc=''
 	  _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
 	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
 	  ;;
 	*)
 	  wlarc='$wl'
 	  _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
 	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
 	  ;;
 	esac
       fi
@@ -6155,32 +6155,32 @@ if test yes != "$_lt_caught_CXX_error"; then
 	  # FIXME: Setting linknames here is a bad hack.
 	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
 	  _LT_TAGVAR(archive_expsym_cmds, $1)='if test EXPORTS = "`$SED 1q $export_symbols`"; then
-	      cp "$export_symbols" "$output_objdir/$soname.def";
-	      echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
-	    else
-	      $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
-	    fi~
-	    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
-	    linknames='
+              cp "$export_symbols" "$output_objdir/$soname.def";
+              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+            else
+              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+            fi~
+            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+            linknames='
 	  # The linker will not automatically build a static lib if we build a DLL.
 	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
 	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 	  # Don't use ranlib
 	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
 	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
-	    lt_tool_outputfile="@TOOL_OUTPUT@"~
-	    case $lt_outputfile in
-	      *.exe|*.EXE) ;;
-	      *)
-		lt_outputfile=$lt_outputfile.exe
-		lt_tool_outputfile=$lt_tool_outputfile.exe
-		;;
-	    esac~
-	    func_to_tool_file "$lt_outputfile"~
-	    if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
-	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
-	      $RM "$lt_outputfile.manifest";
-	    fi'
+            lt_tool_outputfile="@TOOL_OUTPUT@"~
+            case $lt_outputfile in
+              *.exe|*.EXE) ;;
+              *)
+                lt_outputfile=$lt_outputfile.exe
+                lt_tool_outputfile=$lt_tool_outputfile.exe
+                ;;
+            esac~
+            func_to_tool_file "$lt_outputfile"~
+            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+              $RM "$lt_outputfile.manifest";
+            fi'
 	  ;;
 	*)
 	  # g++
@@ -6197,12 +6197,12 @@ if test yes != "$_lt_caught_CXX_error"; then
 	    # If the export-symbols file already is a .def file (1st line
 	    # is EXPORTS), use it as is; otherwise, prepend...
 	    _LT_TAGVAR(archive_expsym_cmds, $1)='if test EXPORTS = "`$SED 1q $export_symbols`"; then
-	      cp $export_symbols $output_objdir/$soname.def;
-	    else
-	      echo EXPORTS > $output_objdir/$soname.def;
-	      cat $export_symbols >> $output_objdir/$soname.def;
-	    fi~
-	    $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+              cp $export_symbols $output_objdir/$soname.def;
+            else
+              echo EXPORTS > $output_objdir/$soname.def;
+              cat $export_symbols >> $output_objdir/$soname.def;
+            fi~
+            $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
 	  else
 	    _LT_TAGVAR(ld_shlibs, $1)=no
 	  fi
@@ -6465,22 +6465,22 @@ if test yes != "$_lt_caught_CXX_error"; then
 	    case `$CC -V` in
 	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
 	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
-		rm -rf $tpldir~
-		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
-		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
+               rm -rf $tpldir~
+               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
 	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
-		rm -rf $tpldir~
-		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
-		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
-		$RANLIB $oldlib'
+                rm -rf $tpldir~
+                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
+                $RANLIB $oldlib'
 	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
-		rm -rf $tpldir~
-		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
-		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+                rm -rf $tpldir~
+                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
 	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
-		rm -rf $tpldir~
-		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
-		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+                rm -rf $tpldir~
+                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
 	      ;;
 	    *) # Version 6 and above use weak symbols
 	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
@@ -6518,9 +6518,9 @@ if test yes != "$_lt_caught_CXX_error"; then
 	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
 	    if test yes = "$supports_anon_versioning"; then
 	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-		echo "local: *; };" >> $output_objdir/$libname.ver~
-		$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
+                cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+                echo "local: *; };" >> $output_objdir/$libname.ver~
+                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
 	    fi
 	    ;;
 	  *)
@@ -6643,9 +6643,9 @@ if test yes != "$_lt_caught_CXX_error"; then
 	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
 	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
-	          echo "-hidden">> $lib.exp~
-	          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
-	          $RM $lib.exp'
+                  echo "-hidden">> $lib.exp~
+                  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
+                  $RM $lib.exp'
 	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 		;;
 	    esac
@@ -6722,7 +6722,7 @@ if test yes != "$_lt_caught_CXX_error"; then
 	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
 	    _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	      $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+              $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
@@ -6759,7 +6759,7 @@ if test yes != "$_lt_caught_CXX_error"; then
 	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
 	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
 	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-		  $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+                  $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
 	        # Commands to make compiler produce verbose output that lists
 	        # what "hidden" libraries, object files and flags are used when
@@ -6770,7 +6770,7 @@ if test yes != "$_lt_caught_CXX_error"; then
 	        # platform.
 	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
 	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-		  $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+                  $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
 	        # Commands to make compiler produce verbose output that lists
 	        # what "hidden" libraries, object files and flags are used when
@@ -6830,9 +6830,9 @@ if test yes != "$_lt_caught_CXX_error"; then
 	    _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
-	      '"$_LT_TAGVAR(old_archive_cmds, $1)"
+              '"$_LT_TAGVAR(old_archive_cmds, $1)"
 	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
-	      '"$_LT_TAGVAR(reload_cmds, $1)"
+              '"$_LT_TAGVAR(reload_cmds, $1)"
 	    ;;
 	  *)
 	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-- 
1.7.9






Message sent to bug-libtool@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#13414: [PATCH 2/2] libtool: factor out the dll .def file test and improve it
Resent-From: Peter Rosin <peda@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-CC: bug-libtool@HIDDEN
Resent-Date: Fri, 18 Jan 2013 23:00:02 +0000
Resent-Message-ID: <handler.13414.B13414.13585499653401 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 13414
X-GNU-PR-Package: libtool
X-GNU-PR-Keywords: 
To: Martin Doucha <doucha@HIDDEN>
Cc: 13414 <at> debbugs.gnu.org, erik-gnu@HIDDEN, Libtool Patches List <libtool-patches@HIDDEN>
Received: via spool by 13414-submit <at> debbugs.gnu.org id=B13414.13585499653401
          (code B ref 13414); Fri, 18 Jan 2013 23:00:02 +0000
Received: (at 13414) by debbugs.gnu.org; 18 Jan 2013 22:59:25 +0000
Received: from localhost ([127.0.0.1]:39232 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TwKuC-0000sm-Q2
	for submit <at> debbugs.gnu.org; Fri, 18 Jan 2013 17:59:25 -0500
Received: from mail.lysator.liu.se ([130.236.254.3]:40218)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <peda@HIDDEN>) id 1TwKu8-0000sc-9f
	for 13414 <at> debbugs.gnu.org; Fri, 18 Jan 2013 17:59:23 -0500
Received: from mail.lysator.liu.se (localhost [127.0.0.1])
	by mail.lysator.liu.se (Postfix) with ESMTP id 07CEB4000A;
	Fri, 18 Jan 2013 23:58:31 +0100 (CET)
Received: from [192.168.0.64] (90-227-119-137-no95.business.telia.com
	[90.227.119.137])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.lysator.liu.se (Postfix) with ESMTPSA id A946240008;
	Fri, 18 Jan 2013 23:58:30 +0100 (CET)
Message-ID: <50F9D396.40900@HIDDEN>
Date: Fri, 18 Jan 2013 23:58:30 +0100
From: Peter Rosin <peda@HIDDEN>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64;
	rv:17.0) Gecko/17.0 Thunderbird/17.0
MIME-Version: 1.0
References: <50EFF8C2.2050505@HIDDEN> <50F0ADA2.5090102@HIDDEN>
	<50F9D2E1.9040403@HIDDEN>
In-Reply-To: <50F9D2E1.9040403@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-Spam-Score: -1.9 (-)
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: -1.9 (-)

Resolves bug#13414. Problem reported by Erik van Pienbroek
and Martin Doucha.

build-aux/ltmain.in (func_mode_link): Factor out the test if a
given symbol file is a module-definition (.def) file into...
(func_dll_def_p): ...this function, which also improves the check.
m4/libtool.m4 (_LT_LINKER_SHLIBS, _LT_LANG_CXX_CONFIG)
<cygwin, mingw, pw32, cegcc>: Similarly, factor out the test if
a given symbol file is a module-definition (.def) file into...
(_LT_DLL_DEF_P): ...this macro, which also improves the check.
tests/export-def.at: New test.
Makefile.am (TESTSUITE_AT): Add above test.
NEWS: Update.
THANKS: Update.

Signed-off-by: Peter Rosin <peda@HIDDEN>

# Conflicts:
#
# 	m4/libtool.m4
---
 Makefile.am         |    1 +
 NEWS                |    3 +
 THANKS              |    2 +
 build-aux/ltmain.in |   19 +++++++-
 m4/libtool.m4       |   31 ++++++++---
 tests/export-def.at |  139 +++++++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 186 insertions(+), 9 deletions(-)
 create mode 100755 tests/export-def.at

diff --git a/Makefile.am b/Makefile.am
index a3e3c7d..e5f3805 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -627,6 +627,7 @@ TESTSUITE_AT	= tests/testsuite.at \
 		  tests/runpath-in-lalib.at \
 		  tests/static.at \
 		  tests/export.at \
+		  tests/export-def.at \
 		  tests/search-path.at \
 		  tests/indirect_deps.at \
 		  tests/archive-in-archive.at \
diff --git a/NEWS b/NEWS
index c202c43..514768b 100644
--- a/NEWS
+++ b/NEWS
@@ -66,6 +66,9 @@ NEWS - list of user-visible changes between releases of GNU Libtool
     the Microsoft Visual C/C++ linker via the -export-symbols argument to
     the libtool script, thus matching how .def files are handled when
     using GNU tools.
+  - Recognize more variants (e.g. those starting with a LIBRARY statement)
+    of module-definitions (.def) files when using them instead of a raw
+    list of symbols to export.
 
 ** Important incompatible changes:
 
diff --git a/THANKS b/THANKS
index d4c1f1b..92e6dff 100644
--- a/THANKS
+++ b/THANKS
@@ -98,6 +98,7 @@
   Edouard G. Parmelan		Edouard.Parmelan@HIDDEN
   Erez Zadok			ezk@HIDDEN
   Eric Estievenart		eric@HIDDEN
+  Erik van Pienbroek		erik-gnu@HIDDEN
   Ethan Mallove			ethan.mallove@HIDDEN
   Frank Ch. Eigler		fche@HIDDEN
   Fred Cox			sailorfred@HIDDEN
@@ -140,6 +141,7 @@
   Marcel Loose			loose@HIDDEN
   Mark Kettenis			kettenis@HIDDEN
   Markus Duft			markus.duft@HIDDEN
+  Martin Doucha			doucha@HIDDEN
   Matthijs Kooijman		matthijs@HIDDEN
   Micheal E. Faenza		mfaenza@HIDDEN
   Michael Haubenwallner		michael.haubenwallner@HIDDEN
diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index eb224e3..f0168da 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -1316,6 +1316,23 @@ func_convert_path_nix_to_cygwin ()
 # end func_convert_path_nix_to_cygwin
 
 
+# func_dll_def_p FILE
+# True iff FILE is a Windows DLL '.def' file.
+# Keep in sync with _LT_DLL_DEF_P in libtool.m4
+func_dll_def_p ()
+{
+  $debug_cmd
+
+  func_dll_def_p_tmp=`$SED -n \
+    -e 's/^[ 	]*//' \
+    -e '/^\(;.*\)*$/d' \
+    -e 's/^\(EXPORTS\|LIBRARY\)\([ 	].*\)*$/DEF/p' \
+    -e q \
+    "$1"`
+  test DEF = "$func_dll_def_p_tmp"
+}
+
+
 # func_mode_compile arg...
 func_mode_compile ()
 {
@@ -7572,7 +7589,7 @@ EOF
 	cygwin* | mingw* | cegcc*)
 	  if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
 	    # exporting using user supplied symfile
-	    if test EXPORTS != "`$SED 1q $export_symbols`"; then
+	    if ! func_dll_def_p "$export_symbols"; then
 	      # and it's NOT already a .def file. Must figure out
 	      # which of the given symbols are data symbols and tag
 	      # them as such. So, trigger use of export_symbols_cmds.
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index 4bc9e98..0a6c334 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -3530,6 +3530,21 @@ _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
 ])# _LT_PATH_MANIFEST_TOOL
 
 
+# _LT_DLL_DEF_P([FILE])
+# ---------------------
+# True iff FILE is a Windows DLL '.def' file.
+# Keep in sync with func_dll_def_p in the libtool script
+AC_DEFUN([_LT_DLL_DEF_P],
+[dnl
+  test DEF = "`$SED -n dnl
+    -e '\''s/^[[ 	]]*//'\'' dnl Strip leading whitespace
+    -e '\''/^\(;.*\)*$/d'\'' dnl      Delete empty lines and comments
+    -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ 	]].*\)*$/DEF/p'\'' dnl
+    -e q dnl                          Only consider the first "real" line
+    $1`" dnl
+])# _LT_DLL_DEF_P
+
+
 # LT_LIB_M
 # --------
 # check for math library
@@ -4782,9 +4797,9 @@ _LT_EOF
 
       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-	# If the export-symbols file already is a .def file (1st line
-	# is EXPORTS), use it as is; otherwise, prepend...
-	_LT_TAGVAR(archive_expsym_cmds, $1)='if test EXPORTS = "`$SED 1q $export_symbols`"; then
+	# If the export-symbols file already is a .def file, use it as
+	# is; otherwise, prepend EXPORTS...
+	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
           cp $export_symbols $output_objdir/$soname.def;
         else
           echo EXPORTS > $output_objdir/$soname.def;
@@ -5162,7 +5177,7 @@ _LT_EOF
 	shrext_cmds=.dll
 	# FIXME: Setting linknames here is a bad hack.
 	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
-	_LT_TAGVAR(archive_expsym_cmds, $1)='if test EXPORTS = "`$SED 1q $export_symbols`"; then
+	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
             cp "$export_symbols" "$output_objdir/$soname.def";
             echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
           else
@@ -6154,7 +6169,7 @@ if test yes != "$_lt_caught_CXX_error"; then
 	  shrext_cmds=.dll
 	  # FIXME: Setting linknames here is a bad hack.
 	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
-	  _LT_TAGVAR(archive_expsym_cmds, $1)='if test EXPORTS = "`$SED 1q $export_symbols`"; then
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
               cp "$export_symbols" "$output_objdir/$soname.def";
               echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
             else
@@ -6194,9 +6209,9 @@ if test yes != "$_lt_caught_CXX_error"; then
 
 	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
 	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-	    # If the export-symbols file already is a .def file (1st line
-	    # is EXPORTS), use it as is; otherwise, prepend...
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='if test EXPORTS = "`$SED 1q $export_symbols`"; then
+	    # If the export-symbols file already is a .def file, use it as
+	    # is; otherwise, prepend EXPORTS...
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
               cp $export_symbols $output_objdir/$soname.def;
             else
               echo EXPORTS > $output_objdir/$soname.def;
diff --git a/tests/export-def.at b/tests/export-def.at
new file mode 100755
index 0000000..b8dfa55
--- /dev/null
+++ b/tests/export-def.at
@@ -0,0 +1,139 @@
+# export-def.at -- test module-definition files              -*- Autotest -*-
+
+#   Copyright (C) 2007-2008, 2011-2013 Free Software Foundation, Inc.
+#   Written by Peter Rosin, 2013
+#
+#   This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# GNU Libtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING.  If not, a copy
+# can be downloaded from  http://www.gnu.org/licenses/gpl.html,
+# or obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+####
+
+AT_SETUP([export from a DLL with a .def file])
+AT_KEYWORDS([libtool])
+
+AT_CHECK([$LIBTOOL --features | grep 'disable shared libraries' && (exit 77)],
+	 [1], [ignore])
+eval `$LIBTOOL --config | $EGREP '^(shrext_cmds|libname_spec|soname_spec)='`
+
+eval shared_ext=\"$shrext_cmds\"
+
+# skip if not building a .dll
+AT_CHECK([test .dll = "$shared_ext" || (exit 77)])
+
+LDFLAGS="$LDFLAGS -no-undefined"
+libdir=`pwd`/inst/lib
+mkdir inst inst/lib
+
+AT_DATA([a.c],
+[[/* a */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int v1 = -1;
+int v2 (void) { return -2; }
+
+#ifdef __cplusplus
+}
+#endif
+]])
+
+AT_DATA([syms],
+[[v1
+v2
+]])
+
+AT_DATA([def1],
+[[EXPORTS
+v1 DATA
+v2
+]])
+
+AT_DATA([def2],
+[[; Def file
+    ; with some very important comments
+EXPORTS
+v1 DATA
+v2
+]])
+
+AT_DATA([def3],
+[[
+   EXPORTS v1 DATA
+   v2
+]])
+
+AT_DATA([def4],
+[[	LIBRARY %soname%
+EXPORTS
+v1 DATA
+v2
+]])
+
+AT_DATA([main.c],
+[[
+/* w32 fun.  With GCC, you can have auto-import, which will work for
+ * functions and non-const variables.  With MSVC, you have to explicitly
+ * import all variables.
+ *
+ * For users, it's best to realize that they should not provide any
+ * non-function API at all.
+ */
+#if defined LIBA_DLL_IMPORT
+#  if defined _WIN32 && defined _MSC_VER
+#    define LIBA_SCOPE_VAR extern __declspec(dllimport)
+#  endif
+#endif
+#if !defined LIBA_SCOPE_VAR
+#  define LIBA_SCOPE_VAR extern
+#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+LIBA_SCOPE_VAR int v1;
+extern int v2(void);
+#ifdef __cplusplus
+}
+#endif
+
+int main (void)
+{
+  return v1 + v2() + 3;
+}
+]])
+
+name=a
+eval libname=\"$libname_spec\"
+major=0
+versuffix=-$major
+eval soname=\"$soname_spec\"
+
+AT_CHECK([$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c],[0],[ignore],[ignore])
+AT_CHECK([$CC $CPPFLAGS -DLIBA_DLL_IMPORT $CFLAGS -c main.c],[0],[ignore],[ignore])
+
+for exportsyms in syms def1 def2 def3 def4
+do
+  $SED "s/%soname%/$soname/" -i $exportsyms
+
+  LT_AT_CHECK([eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo \
+	       -rpath $libdir' -export-symbols $exportsyms], [], [ignore], [ignore])
+  AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la],
+	   [], [ignore], [ignore])
+  LT_AT_EXEC_CHECK([./main])
+done
+
+AT_CLEANUP
-- 
1.7.9






Message sent to bug-libtool@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#13414: Valid DLL def file mangled by libtool
Resent-From: "Gary V. Vaughan" <gary@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-CC: bug-libtool@HIDDEN
Resent-Date: Sat, 19 Jan 2013 05:14:02 +0000
Resent-Message-ID: <handler.13414.B13414.13585724035121 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 13414
X-GNU-PR-Package: libtool
X-GNU-PR-Keywords: 
To: Peter Rosin <peda@HIDDEN>
Cc: "erik-gnu@HIDDEN" <erik-gnu@HIDDEN>, Martin Doucha <doucha@HIDDEN>, "13414 <at> debbugs.gnu.org" <13414 <at> debbugs.gnu.org>, Libtool Patches List <libtool-patches@HIDDEN>
Received: via spool by 13414-submit <at> debbugs.gnu.org id=B13414.13585724035121
          (code B ref 13414); Sat, 19 Jan 2013 05:14:02 +0000
Received: (at 13414) by debbugs.gnu.org; 19 Jan 2013 05:13:23 +0000
Received: from localhost ([127.0.0.1]:39439 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TwQk6-0001KY-Qb
	for submit <at> debbugs.gnu.org; Sat, 19 Jan 2013 00:13:23 -0500
Received: from caiajhbdcaib.dreamhost.com ([208.97.132.81]:40944
	helo=homiemail-a23.g.dreamhost.com)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <gary@HIDDEN>) id 1TwQk1-0001KM-6e
	for 13414 <at> debbugs.gnu.org; Sat, 19 Jan 2013 00:13:21 -0500
Received: from homiemail-a23.g.dreamhost.com (localhost [127.0.0.1])
	by homiemail-a23.g.dreamhost.com (Postfix) with ESMTP id 0522C4B006D;
	Fri, 18 Jan 2013 21:12:26 -0800 (PST)
Received: from [192.168.1.12] (unknown [183.89.58.65])
	(using TLSv1 with cipher AES128-SHA (128/128 bits))
	(No client certificate requested)
	(Authenticated sender: gary@HIDDEN)
	by homiemail-a23.g.dreamhost.com (Postfix) with ESMTPSA id 985764B0063; 
	Fri, 18 Jan 2013 21:12:25 -0800 (PST)
References: <50EFF8C2.2050505@HIDDEN> <50F0ADA2.5090102@HIDDEN>
	<50F9D2E1.9040403@HIDDEN>
Mime-Version: 1.0 (1.0)
In-Reply-To: <50F9D2E1.9040403@HIDDEN>
Content-Type: text/plain;
	charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Message-Id: <404BC785-1F93-49D9-9E8A-E07A958B90C4@HIDDEN>
X-Mailer: iPad Mail (10A8500)
From: "Gary V. Vaughan" <gary@HIDDEN>
Date: Sat, 19 Jan 2013 12:12:22 +0700
X-Spam-Score: 1.5 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
	has
	identified this incoming email as possible spam. The original message
	has been attached to this so you can view it (if it isn't spam) or
	label similar future email.  If you have any questions, see
	the administrator of that system for details.
	Content preview:  Hi Peter, Thanks for working on this. On 19 Jan 2013,
	at 05:55, 
	Peter Rosin <peda@HIDDEN> wrote: > On 2013-01-12 01:26,
	Peter Rosin wrote: >> On 2013-01-11 12:34,
	Martin Doucha wrote: >>> I'd like to report
	a bug in libtool 2.4 (including the latest git revision) which mangles
	valid
	DLL def files under MinGW and makes the linker barf. >> >> This issue
	has
	been reported before [1]. > > So, as hinted above, I'm following up with
	a pair of patches that > appear to mend this. > > Ok to push? [...] 
	Content analysis details:   (1.5 points, 10.0 required)
	pts rule name              description
	---- ----------------------
	--------------------------------------------------
	-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,
	no trust [208.97.132.81 listed in list.dnswl.org]
	0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail)
	0.8 BAYES_50               BODY: Bayes spam probability is 40 to 60%
	[score: 0.5000]
	0.0 MIME_QP_LONG_LINE RAW: Quoted-printable line longer than 76 chars
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: 1.5 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has
 identified this incoming email as possible spam.  The original message
 has been attached to this so you can view it (if it isn't spam) or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  Hi Peter, Thanks for working on this. On 19 Jan 2013, at 05:55,
    Peter Rosin <peda@HIDDEN> wrote: > On 2013-01-12 01:26, Peter Rosin
    wrote: >> On 2013-01-11 12:34, Martin Doucha wrote: >>> I'd like to report
    a bug in libtool 2.4 (including the latest git revision) which mangles valid
    DLL def files under MinGW and makes the linker barf. >> >> This issue has
    been reported before [1]. > > So, as hinted above, I'm following up with
   a pair of patches that > appear to mend this. > > Ok to push? [...] 
 
 Content analysis details:   (1.5 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at http://www.dnswl.org/, no
                             trust
                             [208.97.132.81 listed in list.dnswl.org]
  0.7 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
  0.8 BAYES_50               BODY: Bayes spam probability is 40 to 60%
                             [score: 0.5000]
  0.0 MIME_QP_LONG_LINE      RAW: Quoted-printable line longer than 76 chars

Hi Peter,

Thanks for working on this.

On 19 Jan 2013, at 05:55, Peter Rosin <peda@HIDDEN> wrote:
> On 2013-01-12 01:26, Peter Rosin wrote:
>> On 2013-01-11 12:34, Martin Doucha wrote:
>>> I'd like to report a bug in libtool 2.4 (including the latest git revisi=
on) which mangles valid DLL def files under MinGW and makes the linker barf.=

>>=20
>> This issue has been reported before [1].
>=20
> So, as hinted above, I'm following up with a pair of patches that
> appear to mend this.
>=20
> Ok to push?

By inspection, these patches look good to me - presuming there are no regres=
sions, please go ahead.

One nit: your new test has a Copyright notice starting at 2007 followed by "=
written in 2013". The new code doesn't look derivative of existing tests, so=
 I'd suggest deleting the years prior to 2013 before pushing.

> Or are the white-space changes in the first patch too intrusive?

If you would like to separate those into a separate patch then please feel f=
ree; but I'd rather see functional progress in Libtool development than bein=
g overly anal about changeset minutiae for potential future git archaeology a=
t the expense of using your Libtool hacking time more wisely :)

Cheers,
--=20
Gary V. Vaughan (gary AT gnu DOT org)=




Message sent to bug-libtool@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#13414: Valid DLL def file mangled by libtool
Resent-From: Peter Rosin <peda@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-CC: bug-libtool@HIDDEN
Resent-Date: Sun, 20 Jan 2013 07:34:01 +0000
Resent-Message-ID: <handler.13414.B13414.135866722632032 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 13414
X-GNU-PR-Package: libtool
X-GNU-PR-Keywords: 
To: "Gary V. Vaughan" <gary@HIDDEN>
Cc: "erik-gnu@HIDDEN" <erik-gnu@HIDDEN>, Martin Doucha <doucha@HIDDEN>, "13414 <at> debbugs.gnu.org" <13414 <at> debbugs.gnu.org>, Libtool Patches List <libtool-patches@HIDDEN>
Received: via spool by 13414-submit <at> debbugs.gnu.org id=B13414.135866722632032
          (code B ref 13414); Sun, 20 Jan 2013 07:34:01 +0000
Received: (at 13414) by debbugs.gnu.org; 20 Jan 2013 07:33:46 +0000
Received: from localhost ([127.0.0.1]:40998 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TwpPV-0008KZ-8p
	for submit <at> debbugs.gnu.org; Sun, 20 Jan 2013 02:33:46 -0500
Received: from mail.lysator.liu.se ([130.236.254.3]:32785)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <peda@HIDDEN>) id 1TwpPR-0008KQ-RS
	for 13414 <at> debbugs.gnu.org; Sun, 20 Jan 2013 02:33:43 -0500
Received: from mail.lysator.liu.se (localhost [127.0.0.1])
	by mail.lysator.liu.se (Postfix) with ESMTP id EB8D74000C;
	Sun, 20 Jan 2013 08:32:43 +0100 (CET)
Received: from [192.168.0.64] (90-227-119-137-no95.business.telia.com
	[90.227.119.137])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.lysator.liu.se (Postfix) with ESMTPSA id 2F1E540009;
	Sun, 20 Jan 2013 08:32:42 +0100 (CET)
Message-ID: <50FB9D99.2060701@HIDDEN>
Date: Sun, 20 Jan 2013 08:32:41 +0100
From: Peter Rosin <peda@HIDDEN>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64;
	rv:17.0) Gecko/17.0 Thunderbird/17.0
MIME-Version: 1.0
References: <50EFF8C2.2050505@HIDDEN> <50F0ADA2.5090102@HIDDEN>
	<50F9D2E1.9040403@HIDDEN>
	<404BC785-1F93-49D9-9E8A-E07A958B90C4@HIDDEN>
In-Reply-To: <404BC785-1F93-49D9-9E8A-E07A958B90C4@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-Spam-Score: 0.8 (/)
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: 0.8 (/)

On 2013-01-19 06:12, Gary V. Vaughan wrote:
> Hi Peter,
> 
> Thanks for working on this.
> 
> On 19 Jan 2013, at 05:55, Peter Rosin <peda@HIDDEN> wrote:
>> On 2013-01-12 01:26, Peter Rosin wrote:
>>> On 2013-01-11 12:34, Martin Doucha wrote:
>>>> I'd like to report a bug in libtool 2.4 (including the latest git revision) which mangles valid DLL def files under MinGW and makes the linker barf.
>>>
>>> This issue has been reported before [1].
>>
>> So, as hinted above, I'm following up with a pair of patches that
>> appear to mend this.
>>
>> Ok to push?
> 
> By inspection, these patches look good to me - presuming there are no regressions, please go ahead.

I have found no regressions, and thanks for the speedy review!

> One nit: your new test has a Copyright notice starting at 2007 followed by "written in 2013". The new code doesn't look derivative of existing tests, so I'd suggest deleting the years prior to 2013 before pushing.

Done.

>> Or are the white-space changes in the first patch too intrusive?
> 
> If you would like to separate those into a separate patch then please feel free; but I'd rather see functional progress in Libtool development than being overly anal about changeset minutiae for potential future git archaeology at the expense of using your Libtool hacking time more wisely :)

Splitting the commit in two is simple enough, takes little time to do
and I don't feel obliged to test the intermediate state, so I just did
it.

But I will hold off the push a couple of days pending feedback from
those actually using .def files for real things.

Cheers,
Peter





Message sent to bug-libtool@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#13414: Valid DLL def file mangled by libtool
Resent-From: Erik van Pienbroek <erik@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-CC: bug-libtool@HIDDEN
Resent-Date: Sun, 20 Jan 2013 20:07:03 +0000
Resent-Message-ID: <handler.13414.B13414.13587123846423 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 13414
X-GNU-PR-Package: libtool
X-GNU-PR-Keywords: 
To: Peter Rosin <peda@HIDDEN>
Cc: Martin Doucha <doucha@HIDDEN>, "13414 <at> debbugs.gnu.org" <13414 <at> debbugs.gnu.org>, Libtool Patches List <libtool-patches@HIDDEN>, "Gary V. Vaughan" <gary@HIDDEN>
Received: via spool by 13414-submit <at> debbugs.gnu.org id=B13414.13587123846423
          (code B ref 13414); Sun, 20 Jan 2013 20:07:03 +0000
Received: (at 13414) by debbugs.gnu.org; 20 Jan 2013 20:06:24 +0000
Received: from localhost ([127.0.0.1]:41833 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Tx19q-0001fS-4x
	for submit <at> debbugs.gnu.org; Sun, 20 Jan 2013 15:06:24 -0500
Received: from mail.vanpienbroek.nl ([77.243.228.227]:44499)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <erik@HIDDEN>) id 1TwwJ5-0002iZ-0B
	for 13414 <at> debbugs.gnu.org; Sun, 20 Jan 2013 09:55:36 -0500
Received: from localhost (unknown [127.0.0.1])
	by mail.vanpienbroek.nl (Postfix) with ESMTP id 8D6CA6CD53;
	Sun, 20 Jan 2013 14:55:41 +0000 (UTC)
X-Virus-Scanned: amavisd-new at vanpienbroek.nl
Received: from mail.vanpienbroek.nl ([127.0.0.1])
	by localhost (mail.vanpienbroek.nl [127.0.0.1]) (amavisd-new,
	port 10024)
	with ESMTP id nYQWLKwbi-uD; Sun, 20 Jan 2013 15:55:40 +0100 (CET)
Received: from [IPv6:2001:980:1802:4:868f:69ff:fec7:e232] (unknown
	[IPv6:2001:980:1802:4:868f:69ff:fec7:e232])
	by mail.vanpienbroek.nl (Postfix) with ESMTPSA id 74D8C6CD51;
	Sun, 20 Jan 2013 15:55:40 +0100 (CET)
Message-ID: <1358693673.21239.8.camel@HIDDEN>
From: Erik van Pienbroek <erik@HIDDEN>
Date: Sun, 20 Jan 2013 15:54:33 +0100
In-Reply-To: <50FB9D99.2060701@HIDDEN>
References: <50EFF8C2.2050505@HIDDEN> <50F0ADA2.5090102@HIDDEN>
	<50F9D2E1.9040403@HIDDEN>
	<404BC785-1F93-49D9-9E8A-E07A958B90C4@HIDDEN>
	<50FB9D99.2060701@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Mailer: Evolution 3.6.2 (3.6.2-3.fc18.1) 
Mime-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.8 (/)
X-Mailman-Approved-At: Sun, 20 Jan 2013 15:06:20 -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: -0.0 (/)

Peter Rosin schreef op zo 20-01-2013 om 08:32 [+0100]:
> But I will hold off the push a couple of days pending feedback from
> those actually using .def files for real things.

Thanks for the patch. To help out with testing I can perform a test mass
rebuild of all mingw packages which are currently in Fedora (about 135)
against a libtool package which contains this patch. With this mass
rebuild we can at least find out whether the patch introduces
regressions or not. Running such a test mass rebuild will take about 36
hours to complete, so I'll give an update in about 2 days.

Kind regards,

Erik van Pienbroek
Fedora MinGW SIG






Message sent to bug-libtool@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#13414: Valid DLL def file mangled by libtool
Resent-From: Erik van Pienbroek <erik@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-CC: bug-libtool@HIDDEN
Resent-Date: Tue, 22 Jan 2013 18:48:02 +0000
Resent-Message-ID: <handler.13414.B13414.135888043029678 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 13414
X-GNU-PR-Package: libtool
X-GNU-PR-Keywords: 
To: Peter Rosin <peda@HIDDEN>
Cc: Martin Doucha <doucha@HIDDEN>, "13414 <at> debbugs.gnu.org" <13414 <at> debbugs.gnu.org>, Libtool Patches List <libtool-patches@HIDDEN>, "Gary V. Vaughan" <gary@HIDDEN>
Received: via spool by 13414-submit <at> debbugs.gnu.org id=B13414.135888043029678
          (code B ref 13414); Tue, 22 Jan 2013 18:48:02 +0000
Received: (at 13414) by debbugs.gnu.org; 22 Jan 2013 18:47:10 +0000
Received: from localhost ([127.0.0.1]:44977 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TxisI-0007ib-9K
	for submit <at> debbugs.gnu.org; Tue, 22 Jan 2013 13:47:10 -0500
Received: from mail.vanpienbroek.nl ([77.243.228.227]:45551)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <erik@HIDDEN>) id 1TxisG-0007iR-2o
	for 13414 <at> debbugs.gnu.org; Tue, 22 Jan 2013 13:47:09 -0500
Received: from localhost (unknown [127.0.0.1])
	by mail.vanpienbroek.nl (Postfix) with ESMTP id B5AD56CDB9;
	Tue, 22 Jan 2013 18:47:04 +0000 (UTC)
X-Virus-Scanned: amavisd-new at vanpienbroek.nl
Received: from mail.vanpienbroek.nl ([127.0.0.1])
	by localhost (mail.vanpienbroek.nl [127.0.0.1]) (amavisd-new,
	port 10024)
	with ESMTP id msrY59VCo-fB; Tue, 22 Jan 2013 19:47:03 +0100 (CET)
Received: from [IPv6:2001:980:2a0d:1:868f:69ff:fec7:e232] (unknown
	[IPv6:2001:980:2a0d:1:868f:69ff:fec7:e232])
	by mail.vanpienbroek.nl (Postfix) with ESMTPSA id EF9396CDB7;
	Tue, 22 Jan 2013 19:47:02 +0100 (CET)
Message-ID: <1358880352.6455.7.camel@erik-laptop>
From: Erik van Pienbroek <erik@HIDDEN>
Date: Tue, 22 Jan 2013 19:45:52 +0100
In-Reply-To: <1358693673.21239.8.camel@HIDDEN>
References: <50EFF8C2.2050505@HIDDEN> <50F0ADA2.5090102@HIDDEN>
	<50F9D2E1.9040403@HIDDEN>
	<404BC785-1F93-49D9-9E8A-E07A958B90C4@HIDDEN>
	<50FB9D99.2060701@HIDDEN>
	<1358693673.21239.8.camel@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Mailer: Evolution 3.6.2 (3.6.2-3.fc18.1) 
Mime-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.8 (/)
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: -0.0 (/)

Erik van Pienbroek schreef op zo 20-01-2013 om 15:54 [+0100]:
> Peter Rosin schreef op zo 20-01-2013 om 08:32 [+0100]:
> > But I will hold off the push a couple of days pending feedback from
> > those actually using .def files for real things.
> 
> Thanks for the patch. To help out with testing I can perform a test mass
> rebuild of all mingw packages which are currently in Fedora (about 135)
> against a libtool package which contains this patch. With this mass
> rebuild we can at least find out whether the patch introduces
> regressions or not. Running such a test mass rebuild will take about 36
> hours to complete, so I'll give an update in about 2 days.

Hi,

The test mass rebuild of all Fedora MinGW packages against the latest
libtool with the proposed patches was successful. The packages which
required workarounds in order to get built can now be built without
these workarounds, so the original issue is resolved with the proposed
patches. All other packages were rebuilt successfully as well, so from
my point of view I'm +1 to the proposed patches.

Regards,

Erik van Pienbroek
Fedora MinGW SIG






Message sent to bug-libtool@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#13414: Valid DLL def file mangled by libtool
Resent-From: Peter Rosin <peda@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-CC: bug-libtool@HIDDEN
Resent-Date: Tue, 22 Jan 2013 22:31:01 +0000
Resent-Message-ID: <handler.13414.B13414.135889386017544 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 13414
X-GNU-PR-Package: libtool
X-GNU-PR-Keywords: 
To: Erik van Pienbroek <erik@HIDDEN>
Cc: Martin Doucha <doucha@HIDDEN>, "13414 <at> debbugs.gnu.org" <13414 <at> debbugs.gnu.org>, Libtool Patches List <libtool-patches@HIDDEN>
Received: via spool by 13414-submit <at> debbugs.gnu.org id=B13414.135889386017544
          (code B ref 13414); Tue, 22 Jan 2013 22:31:01 +0000
Received: (at 13414) by debbugs.gnu.org; 22 Jan 2013 22:31:00 +0000
Received: from localhost ([127.0.0.1]:45165 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TxmMt-0004Yu-0r
	for submit <at> debbugs.gnu.org; Tue, 22 Jan 2013 17:31:00 -0500
Received: from mail.lysator.liu.se ([130.236.254.3]:42478)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <peda@HIDDEN>) id 1TxmMq-0004Ym-E5
	for 13414 <at> debbugs.gnu.org; Tue, 22 Jan 2013 17:30:57 -0500
Received: from mail.lysator.liu.se (localhost [127.0.0.1])
	by mail.lysator.liu.se (Postfix) with ESMTP id 6E89F40015;
	Tue, 22 Jan 2013 23:29:43 +0100 (CET)
Received: from [192.168.0.64] (90-227-119-137-no95.business.telia.com
	[90.227.119.137])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.lysator.liu.se (Postfix) with ESMTPSA id E53F54000F;
	Tue, 22 Jan 2013 23:29:42 +0100 (CET)
Message-ID: <50FF12D5.6080200@HIDDEN>
Date: Tue, 22 Jan 2013 23:29:41 +0100
From: Peter Rosin <peda@HIDDEN>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64;
	rv:17.0) Gecko/17.0 Thunderbird/17.0
MIME-Version: 1.0
References: <50EFF8C2.2050505@HIDDEN> <50F0ADA2.5090102@HIDDEN>
	<50F9D2E1.9040403@HIDDEN>
	<404BC785-1F93-49D9-9E8A-E07A958B90C4@HIDDEN>
	<50FB9D99.2060701@HIDDEN>
	<1358693673.21239.8.camel@HIDDEN>
	<1358880352.6455.7.camel@erik-laptop>
In-Reply-To: <1358880352.6455.7.camel@erik-laptop>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-Spam-Score: 0.8 (/)
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: 0.8 (/)

close 13414
thanks

Hi!

On 2013-01-22 19:45, Erik van Pienbroek wrote:
> Erik van Pienbroek schreef op zo 20-01-2013 om 15:54 [+0100]:
>> Peter Rosin schreef op zo 20-01-2013 om 08:32 [+0100]:
>>> But I will hold off the push a couple of days pending feedback from
>>> those actually using .def files for real things.
>>
>> Thanks for the patch. To help out with testing I can perform a test mass
>> rebuild of all mingw packages which are currently in Fedora (about 135)
>> against a libtool package which contains this patch. With this mass
>> rebuild we can at least find out whether the patch introduces
>> regressions or not. Running such a test mass rebuild will take about 36
>> hours to complete, so I'll give an update in about 2 days.
> 
> The test mass rebuild of all Fedora MinGW packages against the latest
> libtool with the proposed patches was successful. The packages which
> required workarounds in order to get built can now be built without
> these workarounds, so the original issue is resolved with the proposed
> patches. All other packages were rebuilt successfully as well, so from
> my point of view I'm +1 to the proposed patches.

Ok, that's good enough for me!  Thanks again for testing.

The patches tested by Erik where slightly different from the ones I
posted. I did the whitespace changes in a separate patch and fixed the
copyright year thing spotted by Gary. I also changed

	IFS=' ''
'

into

	IFS="$sp$nl"

The patches tested where also slightly different from the ones I
actually pushed. The pushed version does not have the unneeded quotes
in the above assignment and I changed one instance of

	if ! foo; then
		...
	fi

into

	foo || {
		...
	}

since "if ! foo" isn't as portable according to Autoconf docs.

Anyway, those last changes are all harmless, I'm just putting all
cards on the table just in case...

Cheers,
Peter




Message sent to bug-libtool@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#13414: [Werner Koch] Re: [pkg-gnupg-maint] Bug#814951: libassuan: add libassuan-mingw-w64-dev for cross-building to Windows targets
References: <50EFF8C2.2050505@HIDDEN>
In-Reply-To: <50EFF8C2.2050505@HIDDEN>
Resent-From: Daniel Kahn Gillmor <dkg@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-libtool@HIDDEN
Resent-Date: Sat, 20 Feb 2016 19:30:02 +0000
Resent-Message-ID: <handler.13414.B13414.145599659723495 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 13414
X-GNU-PR-Package: libtool
X-GNU-PR-Keywords: 
To: 13414 <at> debbugs.gnu.org, control@HIDDEN, 814951@HIDDEN
Received: via spool by 13414-submit <at> debbugs.gnu.org id=B13414.145599659723495
          (code B ref 13414); Sat, 20 Feb 2016 19:30:02 +0000
Received: (at 13414) by debbugs.gnu.org; 20 Feb 2016 19:29:57 +0000
Received: from localhost ([127.0.0.1]:35591 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aXDE4-00066t-TU
	for submit <at> debbugs.gnu.org; Sat, 20 Feb 2016 14:29:57 -0500
Received: from che.mayfirst.org ([209.234.253.108]:38205)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <dkg@HIDDEN>) id 1aXDE2-00066k-Pe
 for 13414 <at> debbugs.gnu.org; Sat, 20 Feb 2016 14:29:55 -0500
Received: from fifthhorseman.net (ool-6c3a0662.static.optonline.net
 [108.58.6.98])
 by che.mayfirst.org (Postfix) with ESMTPSA id 25BFCF991;
 Sat, 20 Feb 2016 14:29:49 -0500 (EST)
Received: by fifthhorseman.net (Postfix, from userid 1000)
 id 9503C205C4; Sat, 20 Feb 2016 14:29:50 -0500 (EST)
From: Daniel Kahn Gillmor <dkg@HIDDEN>
User-Agent: Notmuch/0.21+74~gb409435 (http://notmuchmail.org) Emacs/24.5.1
 (x86_64-pc-linux-gnu)
Date: Sat, 20 Feb 2016 14:29:47 -0500
Message-ID: <87mvqv2n9w.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="===-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://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: 0.0 (/)

--===-=-=
Content-Type: multipart/mixed; boundary="=-=-="

--=-=-=
Content-Type: text/plain

# for the debian BTS, hopefully this doesn't cause problems for the GNU BTS)
clone 814951 -1
reassign -1 libtool
retitle -1 libtool fails to detect DLL .def file
forwarded -1 https://debbugs.gnu.org/13414
tags -1 = patch upstream
thanks

Over on https://bugs.debian.org/814951, Werner Koch and i are discussing
how https://debbugs.gnu.org/13414 is still a problem with libtool.  In
particular, GNU libtool can't seem to detect that a .def file is valid
unless EXPORT is the literal first line in the file (it chokes when
blank lines or comments precede EXPORT).

Werner supplied the patch below to fix libtool.  The upstream bug
appears to have a rather different set of patches.  Either way, the
problem should be cleaned up in libtool, as it's causing a series of
workarounds for cross-building things on debian for the Windows
platform.

Is there some reason for the delay upstream besides lack of time to work
on it?  Should debian go ahead and apply one of the proposed patches
downstream in the meantime?

    --dkg


--=-=-=
Content-Type: message/rfc822
Content-Disposition: inline

From: Werner Koch <wk@HIDDEN>
To: Daniel Kahn Gillmor <dkg@HIDDEN>
Cc: 814951@HIDDEN
Subject: Re: [pkg-gnupg-maint] Bug#814951: libassuan: add libassuan-mingw-w64-dev for cross-building to Windows targets
References: <145566426212.6692.16387315076053354741.reportbug@HIDDEN>
Organisation: g10 Code GmbH
X-message-flag: Mails containing HTML will not be read!
	 Please send only plain text.
OpenPGP: url=https://k.gnupg.net/80615870F5BAD690333686D0F2AD85AC1E42B367
Date: Wed, 17 Feb 2016 09:22:05 +0100
In-Reply-To: <145566426212.6692.16387315076053354741.reportbug@HIDDEN>
	(Daniel Kahn Gillmor's message of "Tue, 16 Feb 2016 18:11:02 -0500")
Message-ID: <871t8bg30y.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Wed, 17 Feb 2016 00:11, dkg@HIDDEN said:

> ++++ b/src/libassuan.def
> +@@ -1,3 +1,4 @@
> ++EXPORTS
> + ; assuan.def - List of symbols to export.

That is for sure a bug in libtool.  I fixed that years ago but it didn't
made into into libtool upstream because they where revamping the entire
thing.  Seems this or a new bug is still present.  Find below for
reference the patch used for libgpg-error which has also been ported to
all GnuPG related libraries.  FWIW, I have also another libtool fix to
support Android.


Salam-Shalom,

   Werner


=2D-8<---------------cut here---------------start------------->8---
commit dd05f3790e536dec6ed56087780a1065ca66371e
Author: Werner Koch <wk@HIDDEN>
Date:   Thu Apr 18 14:40:43 2013 +0200

    Fix libtool 2.4.2 to correctly detect .def files.
=20=20=20=20
    * ltmain.sh (sed_uncomment_deffile): New.
    (orig_export_symbols): Uncomment def file before testing for EXPORTS.
    * m4/libtool.m4: Do the same for the generated code.
    --
=20=20=20=20
    The old code was not correct in that it only looked at the first line
    and puts an EXPORTS keyword in front if missing.  Binutils 2.22
    accepted a duplicated EXPORTS keyword but at least 2.23.2 is more
    stringent and bails out without this fix.
=20=20=20=20
    There is no need to send this upstream.  Upstream's git master has a
    lot of changes including a similar fix for this problems.  There are
    no signs that a libtool 2.4.3 will be released to fix this problem and
    thus we need to stick to our copy of 2.4.2 along with this patch.
=20=20=20=20
    Signed-off-by: Werner Koch <wk@HIDDEN>

diff --git a/ltmain.sh b/ltmain.sh
index c7d06c3..24e3fd3 100644
=2D-- a/ltmain.sh
+++ b/ltmain.sh
@@ -411,6 +411,10 @@ sed_make_literal_regex=3D's,[].[^$\\*\/],\\&,g'
 # (escaped) backslashes.  A very naive implementation.
 lt_sed_naive_backslashify=3D's|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
=20
+# Sed substitution to remove simple comments and empty
+# lines from a Windows .def file.
+sed_uncomment_deffile=3D'/^;/d; /^[ ]*$/d'
+
 # Re-`\' parameter expansions in output of double_quote_subst that were
 # `\'-ed in input to the same.  If an odd number of `\' preceded a '$'
 # in input to double_quote_subst, that '$' was protected from expansion.
@@ -8143,7 +8147,7 @@ EOF
 	cygwin* | mingw* | cegcc*)
 	  if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
 	    # exporting using user supplied symfile
=2D	    if test "x`$SED 1q $export_symbols`" !=3D xEXPORTS; then
+	    if test "x`$SED "$sed_uncomment_deffile" $export_symbols | $SED 1q`" =
!=3D xEXPORTS; then
 	      # and it's NOT already a .def file. Must figure out
 	      # which of the given symbols are data symbols and tag
 	      # them as such. So, trigger use of export_symbols_cmds.
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index 4bedbd3..ff871a0 100644
=2D-- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -4773,7 +4773,7 @@ _LT_EOF
         _LT_TAGVAR(archive_cmds, $1)=3D'$CC -shared $libobjs $deplibs $com=
piler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinke=
r --out-implib -Xlinker $lib'
 	# If the export-symbols file already is a .def file (1st line
 	# is EXPORTS), use it as is; otherwise, prepend...
=2D	_LT_TAGVAR(archive_expsym_cmds, $1)=3D'if test "x`$SED 1q $export_symbo=
ls`" =3D xEXPORTS; then
+	_LT_TAGVAR(archive_expsym_cmds, $1)=3D'if test "x`$SED \"$sed_uncomment_d=
effile\" $export_symbols | $SED 1q`" =3D xEXPORTS; then
 	  cp $export_symbols $output_objdir/$soname.def;
 	else
 	  echo EXPORTS > $output_objdir/$soname.def;
@@ -5150,7 +5150,7 @@ _LT_EOF
 	shrext_cmds=3D".dll"
 	# FIXME: Setting linknames here is a bad hack.
 	_LT_TAGVAR(archive_cmds, $1)=3D'$CC -o $output_objdir/$soname $libobjs $c=
ompiler_flags $deplibs -Wl,-dll~linknames=3D'
=2D	_LT_TAGVAR(archive_expsym_cmds, $1)=3D'if test "x`$SED 1q $export_symbo=
ls`" =3D xEXPORTS; then
+	_LT_TAGVAR(archive_expsym_cmds, $1)=3D'if test "x`$SED \"$sed_uncomment_d=
effile\" $export_symbols | $SED 1q`" =3D xEXPORTS; then
 	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!=
p' < $export_symbols > $output_objdir/$soname.exp;
 	  else
 	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_sy=
mbols > $output_objdir/$soname.exp;
@@ -6149,7 +6149,7 @@ if test "$_lt_caught_CXX_error" !=3D yes; then
 	  shrext_cmds=3D".dll"
 	  # FIXME: Setting linknames here is a bad hack.
 	  _LT_TAGVAR(archive_cmds, $1)=3D'$CC -o $output_objdir/$soname $libobjs =
$compiler_flags $deplibs -Wl,-dll~linknames=3D'
=2D	  _LT_TAGVAR(archive_expsym_cmds, $1)=3D'if test "x`$SED 1q $export_sym=
bols`" =3D xEXPORTS; then
+	  _LT_TAGVAR(archive_expsym_cmds, $1)=3D'if test "x`$SED \"$sed_uncomment=
_deffile\" $export_symbols | $SED 1q`" =3D xEXPORTS; then
 	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\=
\\!p' < $export_symbols > $output_objdir/$soname.exp;
 	    else
 	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export=
_symbols > $output_objdir/$soname.exp;
@@ -6190,7 +6190,7 @@ if test "$_lt_caught_CXX_error" !=3D yes; then
 	    _LT_TAGVAR(archive_cmds, $1)=3D'$CC -shared -nostdlib $predep_objects=
 $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$sona=
me ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
 	    # If the export-symbols file already is a .def file (1st line
 	    # is EXPORTS), use it as is; otherwise, prepend...
=2D	    _LT_TAGVAR(archive_expsym_cmds, $1)=3D'if test "x`$SED 1q $export_s=
ymbols`" =3D xEXPORTS; then
+	    _LT_TAGVAR(archive_expsym_cmds, $1)=3D'if test "x`$SED \"$sed_uncomme=
nt_deffile\" $export_symbols | $SED 1q`" =3D xEXPORTS; then
 	      cp $export_symbols $output_objdir/$soname.def;
 	    else
 	      echo EXPORTS > $output_objdir/$soname.def;
=2D-8<---------------cut here---------------end--------------->8---


=2D-=20
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.


--=-=-=--

--===-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQJ8BAEBCgBmBQJWyL6rXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRFREIyRTc0RjU2RkNGMkI2NzI5N0I3MzUy
NEVDRkY1QUZGNjgzNzBBAAoJECTs/1r/aDcKLH4QAMT2PTo9TturH9qWgT5eqdjp
15fe2Gx5RDf8sJ0Sa1ctFG1GD7BInsiTaptTRfvBzUlWOjT9Rbn/wYSm+CLONkdY
6cQlsVbuY0Hm6K8iS7yh0IV6oGZWO6P6stAuuuixzBE/gsAeq7fz8Am8arwm5ecj
0x8j4NFd0wpXWq7p5yY07iYTHkwp8xBVQZQsVRnbIudIXnLLvcjhirCcSnvKzs3K
SuSHDaKpGff1wnFLWYcrnmhrWQY2iVPCL37cJbz98IkyvN9XaNUtbSvH8EHsLzRH
NfJNDHSZkbFVQwQDBANtR+jdHrNOktcJXTDGLbGKBwQkuymKcH1/Mat+BLMO5Ov7
64gHxenzvCJ+5euCemzjyMK8njN7COKz+Vtm38fjfwYuBSZnVVZVqR88qECb8rQe
QqmYcliq7DniPdngfb+uwxUaHXSaV0nOGkBsNQ8YrKgOAOFmryHdOJalTycrhgZB
w71DZuOycBxAI4VMNV/bi1U6k/1XRPsVp5vMPEQJqgVWMXOA4NTl3xBlXMTbDycX
SnTZTtCsWyG9b1DI2ft4EXYjJ0MLrPFi/xq+r7tWUzszirJ15BAJKXWwCxHJ6I1n
zMpFK992JNT006ku7yofCOgmcZEz1j0Fzskx5VjbPvtcfDLLTrVH8J422IbDD6Jf
9VUuJmM7M47zc68eAWNX
=yCBA
-----END PGP SIGNATURE-----
--===-=-=--




Message sent to bug-libtool@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#13414: [Werner Koch] Re: [pkg-gnupg-maint] Bug#814951: libassuan: add libassuan-mingw-w64-dev for cross-building to Windows targets
Resent-From: Pavel Raiskup <praiskup@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-libtool@HIDDEN
Resent-Date: Mon, 22 Feb 2016 11:45:01 +0000
Resent-Message-ID: <handler.13414.B13414.145614149717643 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 13414
X-GNU-PR-Package: libtool
X-GNU-PR-Keywords: 
To: 13414 <at> debbugs.gnu.org
Cc: control@HIDDEN, dkg@HIDDEN, 814951@HIDDEN
X-Debbugs-Original-To: bug-libtool@HIDDEN
X-Debbugs-Original-Cc: 13414 <at> debbugs.gnu.org, control@HIDDEN, Daniel Kahn Gillmor <dkg@HIDDEN>, 814951@HIDDEN
Received: via spool by 13414-submit <at> debbugs.gnu.org id=B13414.145614149717643
          (code B ref 13414); Mon, 22 Feb 2016 11:45:01 +0000
Received: (at 13414) by debbugs.gnu.org; 22 Feb 2016 11:44:57 +0000
Received: from localhost ([127.0.0.1]:36904 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aXovB-0004aU-6E
	for submit <at> debbugs.gnu.org; Mon, 22 Feb 2016 06:44:57 -0500
Received: from mx1.redhat.com ([209.132.183.28]:47287)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <praiskup@HIDDEN>) id 1aXov9-0004Yr-Cr
 for 13414 <at> debbugs.gnu.org; Mon, 22 Feb 2016 06:44:55 -0500
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
 (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
 by mx1.redhat.com (Postfix) with ESMTPS id 8A04A1F573;
 Mon, 22 Feb 2016 11:44:49 +0000 (UTC)
Received: from nb.usersys.redhat.com (unused-4-232.brq.redhat.com
 [10.34.4.232])
 by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id
 u1MBilD9028757
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
 Mon, 22 Feb 2016 06:44:49 -0500
From: Pavel Raiskup <praiskup@HIDDEN>
Date: Mon, 22 Feb 2016 12:44:47 +0100
Message-ID: <7880014.ypui2X9GVB@HIDDEN>
User-Agent: KMail/4.14.10 (Linux/4.3.5-300.fc23.x86_64; KDE/4.14.17; x86_64; ;
 )
In-Reply-To: <87mvqv2n9w.fsf@HIDDEN>
References: <50EFF8C2.2050505@HIDDEN>
 <87mvqv2n9w.fsf@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
X-Spam-Score: -5.0 (-----)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://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: -5.0 (-----)

Hi Daniel,

On Saturday 20 of February 2016 14:29:47 Daniel Kahn Gillmor wrote:
> Over on https://bugs.debian.org/814951, Werner Koch and i are discussing
> how https://debbugs.gnu.org/13414 is still a problem with libtool.  In
> particular, GNU libtool can't seem to detect that a .def file is valid
> unless EXPORT is the literal first line in the file (it chokes when
> blank lines or comments precede EXPORT).
> 
> Werner supplied the patch below to fix libtool.  The upstream bug
> appears to have a rather different set of patches.  Either way, the
> problem should be cleaned up in libtool, as it's causing a series of
> workarounds for cross-building things on debian for the Windows
> platform.
> 
> Is there some reason for the delay upstream besides lack of time to work
> on it?  Should debian go ahead and apply one of the proposed patches
> downstream in the meantime?

From the patch itself:

    There is no need to send this upstream.  Upstream's git master has a
    lot of changes including a similar fix for this problems.  There are
    no signs that a libtool 2.4.3 will be released to fix this problem and
    thus we need to stick to our copy of 2.4.2 along with this patch.

It is quite some time libtool 2.4.3 was released, the latest release is 2.4.6
now.  Can you check that update helps?

Pavel





Message sent to bug-libtool@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#13414: [Werner Koch] Re: [pkg-gnupg-maint] Bug#814951: libassuan: add libassuan-mingw-w64-dev for cross-building to Windows targets
Resent-From: Pavel Raiskup <praiskup@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-libtool@HIDDEN
Resent-Date: Mon, 22 Feb 2016 11:46:02 +0000
Resent-Message-ID: <handler.13414.B.145614150217700 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 13414
X-GNU-PR-Package: libtool
X-GNU-PR-Keywords: 
To: 13414 <at> debbugs.gnu.org
Cc: control@HIDDEN, dkg@HIDDEN, 814951@HIDDEN
X-Debbugs-Original-To: bug-libtool@HIDDEN
X-Debbugs-Original-Cc: 13414 <at> debbugs.gnu.org, control@HIDDEN, Daniel Kahn Gillmor <dkg@HIDDEN>, 814951@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.145614150217700
          (code B ref -1); Mon, 22 Feb 2016 11:46:02 +0000
Received: (at submit) by debbugs.gnu.org; 22 Feb 2016 11:45:02 +0000
Received: from localhost ([127.0.0.1]:36908 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aXovG-0004bM-Dc
	for submit <at> debbugs.gnu.org; Mon, 22 Feb 2016 06:45:02 -0500
Received: from eggs.gnu.org ([208.118.235.92]:42617)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <praiskup@HIDDEN>) id 1aXovE-0004aM-Jm
 for submit <at> debbugs.gnu.org; Mon, 22 Feb 2016 06:45:01 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <praiskup@HIDDEN>) id 1aXov8-0008JD-Kn
 for submit <at> debbugs.gnu.org; Mon, 22 Feb 2016 06:44:55 -0500
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]:32923)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <praiskup@HIDDEN>) id 1aXov8-0008J8-Im
 for submit <at> debbugs.gnu.org; Mon, 22 Feb 2016 06:44:54 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:33577)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <praiskup@HIDDEN>) id 1aXov7-0002BL-ME
 for bug-libtool@HIDDEN; Mon, 22 Feb 2016 06:44:54 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <praiskup@HIDDEN>) id 1aXov4-0008Gm-HP
 for bug-libtool@HIDDEN; Mon, 22 Feb 2016 06:44:53 -0500
Received: from mx1.redhat.com ([209.132.183.28]:47210)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <praiskup@HIDDEN>) id 1aXov4-0008Gi-CU
 for bug-libtool@HIDDEN; Mon, 22 Feb 2016 06:44:50 -0500
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
 (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
 by mx1.redhat.com (Postfix) with ESMTPS id 8A04A1F573;
 Mon, 22 Feb 2016 11:44:49 +0000 (UTC)
Received: from nb.usersys.redhat.com (unused-4-232.brq.redhat.com
 [10.34.4.232])
 by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id
 u1MBilD9028757
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
 Mon, 22 Feb 2016 06:44:49 -0500
From: Pavel Raiskup <praiskup@HIDDEN>
Date: Mon, 22 Feb 2016 12:44:47 +0100
Message-ID: <7880014.ypui2X9GVB@HIDDEN>
User-Agent: KMail/4.14.10 (Linux/4.3.5-300.fc23.x86_64; KDE/4.14.17; x86_64; ;
 )
In-Reply-To: <87mvqv2n9w.fsf@HIDDEN>
References: <50EFF8C2.2050505@HIDDEN>
 <87mvqv2n9w.fsf@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
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: 2001:4830:134:3::11
X-Spam-Score: -4.1 (----)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://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.1 (----)

Hi Daniel,

On Saturday 20 of February 2016 14:29:47 Daniel Kahn Gillmor wrote:
> Over on https://bugs.debian.org/814951, Werner Koch and i are discussing
> how https://debbugs.gnu.org/13414 is still a problem with libtool.  In
> particular, GNU libtool can't seem to detect that a .def file is valid
> unless EXPORT is the literal first line in the file (it chokes when
> blank lines or comments precede EXPORT).
> 
> Werner supplied the patch below to fix libtool.  The upstream bug
> appears to have a rather different set of patches.  Either way, the
> problem should be cleaned up in libtool, as it's causing a series of
> workarounds for cross-building things on debian for the Windows
> platform.
> 
> Is there some reason for the delay upstream besides lack of time to work
> on it?  Should debian go ahead and apply one of the proposed patches
> downstream in the meantime?

From the patch itself:

    There is no need to send this upstream.  Upstream's git master has a
    lot of changes including a similar fix for this problems.  There are
    no signs that a libtool 2.4.3 will be released to fix this problem and
    thus we need to stick to our copy of 2.4.2 along with this patch.

It is quite some time libtool 2.4.3 was released, the latest release is 2.4.6
now.  Can you check that update helps?

Pavel





Message sent to bug-libtool@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#13414: [Werner Koch] Re: [pkg-gnupg-maint] Bug#814951: libassuan: add libassuan-mingw-w64-dev for cross-building to Windows targets
Resent-From: Peter Rosin <peda@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-libtool@HIDDEN
Resent-Date: Mon, 22 Feb 2016 21:04:01 +0000
Resent-Message-ID: <handler.13414.B13414.145617503225558 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 13414
X-GNU-PR-Package: libtool
X-GNU-PR-Keywords: 
To: Pavel Raiskup <praiskup@HIDDEN>, 13414 <at> debbugs.gnu.org
Cc: dkg@HIDDEN, 814951@HIDDEN, control@HIDDEN
Received: via spool by 13414-submit <at> debbugs.gnu.org id=B13414.145617503225558
          (code B ref 13414); Mon, 22 Feb 2016 21:04:01 +0000
Received: (at 13414) by debbugs.gnu.org; 22 Feb 2016 21:03:52 +0000
Received: from localhost ([127.0.0.1]:38535 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aXxe4-0006e9-2v
	for submit <at> debbugs.gnu.org; Mon, 22 Feb 2016 16:03:52 -0500
Received: from mail.lysator.liu.se ([130.236.254.3]:34875)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <peda@HIDDEN>) id 1aXxe1-0006e0-Oc
 for 13414 <at> debbugs.gnu.org; Mon, 22 Feb 2016 16:03:50 -0500
Received: from mail.lysator.liu.se (localhost [127.0.0.1])
 by mail.lysator.liu.se (Postfix) with ESMTP id 318CA4004D;
 Mon, 22 Feb 2016 22:03:47 +0100 (CET)
Received: from [192.168.0.96] (217-210-101-82-no95.business.telia.com
 [217.210.101.82])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mail.lysator.liu.se (Postfix) with ESMTPSA id CAF194004C;
 Mon, 22 Feb 2016 22:03:44 +0100 (CET)
Message-ID: <56CB77B5.4040102@HIDDEN>
Date: Mon, 22 Feb 2016 22:03:49 +0100
From: Peter Rosin <peda@HIDDEN>
User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64;
 rv:31.0) Gecko/20100101 Thunderbird/31.3.0
MIME-Version: 1.0
References: <50EFF8C2.2050505@HIDDEN>	<87mvqv2n9w.fsf@HIDDEN>
 <7880014.ypui2X9GVB@HIDDEN>
In-Reply-To: <7880014.ypui2X9GVB@HIDDEN>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://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: -2.3 (--)



On 2016-02-22 12:44, Pavel Raiskup wrote:
> Hi Daniel,
> 
> On Saturday 20 of February 2016 14:29:47 Daniel Kahn Gillmor wrote:
>> Over on https://bugs.debian.org/814951, Werner Koch and i are discussing
>> how https://debbugs.gnu.org/13414 is still a problem with libtool.  In
>> particular, GNU libtool can't seem to detect that a .def file is valid
>> unless EXPORT is the literal first line in the file (it chokes when
>> blank lines or comments precede EXPORT).
>>
>> Werner supplied the patch below to fix libtool.  The upstream bug
>> appears to have a rather different set of patches.  Either way, the
>> problem should be cleaned up in libtool, as it's causing a series of
>> workarounds for cross-building things on debian for the Windows
>> platform.
>>
>> Is there some reason for the delay upstream besides lack of time to work
>> on it?  Should debian go ahead and apply one of the proposed patches
>> downstream in the meantime?
> 
> From the patch itself:
> 
>     There is no need to send this upstream.  Upstream's git master has a
>     lot of changes including a similar fix for this problems.  There are
>     no signs that a libtool 2.4.3 will be released to fix this problem and
>     thus we need to stick to our copy of 2.4.2 along with this patch.
> 
> It is quite some time libtool 2.4.3 was released, the latest release is 2.4.6
> now.  Can you check that update helps?

Hi!

The libtool patch from https://debbugs.gnu.org/13414 is better than the
debian patch from https://bugs.debian.org/814951 in every aspect that I
can see and should indeed help.

For reference, the libtool patch was committed here
http://git.savannah.gnu.org/cgit/libtool.git/commit/?id=a5a4944fbb2bbd

(three years old, released one year ago in 2.4.3)

Cheers,
Peter




Message sent to bug-libtool@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#13414: [Werner Koch] Re: [pkg-gnupg-maint] Bug#814951: libassuan: add libassuan-mingw-w64-dev for cross-building to Windows targets
Resent-From: Daniel Kahn Gillmor <dkg@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-libtool@HIDDEN
Resent-Date: Wed, 02 Mar 2016 07:24:01 +0000
Resent-Message-ID: <handler.13414.B13414.145690341224770 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 13414
X-GNU-PR-Package: libtool
X-GNU-PR-Keywords: 
To: Peter Rosin <peda@HIDDEN>, Pavel Raiskup <praiskup@HIDDEN>, 13414 <at> debbugs.gnu.org
Cc: 814951@HIDDEN
Received: via spool by 13414-submit <at> debbugs.gnu.org id=B13414.145690341224770
          (code B ref 13414); Wed, 02 Mar 2016 07:24:01 +0000
Received: (at 13414) by debbugs.gnu.org; 2 Mar 2016 07:23:32 +0000
Received: from localhost ([127.0.0.1]:56930 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ab188-0006RR-08
	for submit <at> debbugs.gnu.org; Wed, 02 Mar 2016 02:23:32 -0500
Received: from che.mayfirst.org ([209.234.253.108]:54090)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <dkg@HIDDEN>) id 1ab186-0006RJ-Ch
 for 13414 <at> debbugs.gnu.org; Wed, 02 Mar 2016 02:23:30 -0500
Received: from fifthhorseman.net (81.202.159.62.dyn.user.ono.com
 [81.202.159.62])
 by che.mayfirst.org (Postfix) with ESMTPSA id 9692FF991;
 Wed,  2 Mar 2016 02:23:17 -0500 (EST)
Received: by fifthhorseman.net (Postfix, from userid 1000)
 id 2285B200CE; Wed,  2 Mar 2016 08:23:18 +0100 (CET)
From: Daniel Kahn Gillmor <dkg@HIDDEN>
In-Reply-To: <56CB77B5.4040102@HIDDEN>
References: <50EFF8C2.2050505@HIDDEN>
 <87mvqv2n9w.fsf@HIDDEN>
 <7880014.ypui2X9GVB@HIDDEN> <56CB77B5.4040102@HIDDEN>
User-Agent: Notmuch/0.21+74~gb409435 (http://notmuchmail.org) Emacs/24.5.1
 (x86_64-pc-linux-gnu)
Date: Wed, 02 Mar 2016 08:23:14 +0100
Message-ID: <87h9gppcm5.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://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: 0.0 (/)

--=-=-=
Content-Type: text/plain

On Mon 2016-02-22 22:03:49 +0100, Peter Rosin wrote:
> The libtool patch from https://debbugs.gnu.org/13414 is better than the
> debian patch from https://bugs.debian.org/814951 in every aspect that I
> can see and should indeed help.
>
> For reference, the libtool patch was committed here
> http://git.savannah.gnu.org/cgit/libtool.git/commit/?id=a5a4944fbb2bbd
>
> (three years old, released one year ago in 2.4.3)

It sounds like you're saying that the libtool patch should already be
committed and running effectively in libtool 2.4.3 or later.

however, debian had libtool 2.4.2-1.11 up until 2016-02-07, when
2.4.6-0.1 entered debian.  But Andreas's bug report of FTBFS on unstable
[0] came 12 days after 2.4.6 entered unstable and 6 days after 2.4.6
transitioned to testing [1].  So something in the libtool upstream
changes either didn't have the desired effect, or something else is
wrong in debian that i'm unaware of.

for now, i've gone ahead with the simple patch (moving EXPORTS to the
first line of the file) for libassuan, but i'll be happy to drop that
patch when libtool is effectively fixed :)

      --dkg

[0] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=814954#10
[1] https://packages.qa.debian.org/libt/libtool/news/20160213T163908Z.html

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQJ8BAEBCgBmBQJW1pTiXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRFREIyRTc0RjU2RkNGMkI2NzI5N0I3MzUy
NEVDRkY1QUZGNjgzNzBBAAoJECTs/1r/aDcKcCMQAIzrsKGmh1Yiq412ZPR8dPnL
2D4RId8hxssRLaQVTnHY8kly8OaH10+X+B4HfYiezQRM4UOfbWPw3TjyXVTcHRWZ
byaEkxR3ihYRqHWJxNIsOXX0KP6/jJBVDrXtHdVw0c8tV1zDxDuty946RwkEUI48
a6UWJk162l2vTsExG5iEThTgEIBNZKcvPiiErolVBbYXNllM3meQ5t++MvVe/nQx
pkzdqF36FQeg7lP50t+v/XCBc/rW6OXKfQRYZmX6IN59OhkhDMGvkj3T7Kh20K0Y
SYj+7KdoPizgG4xfFYeTHkO2fnwE1G3fdtxz8wYhoxT9ojVbzVrpNBcRc4z+AG96
Zsb2FYlG2uhCYFerwMpuhb8x02AzQnKl3rF49sXcyAx3zRuQY7/zV3O8ke24N0oy
xI0KxiUBDlcBh9WYMoIcurzMKmWikEjvSRXLQ8y3wCWMEr21CQMxt2C0n9Z0DSUR
rCcStikWL+cG33jFCOW+PKoPH29ext8uNctS82Ra9tVyPoXKInRuMAx+aj/rWWeb
QdSFAiIgYKRsnHMpb6bYEw7WuT7DkN4NF2AxxNhyzZeoYIlhkb6WmnTQl/v8vNo4
Ad3kJlET6OGYE5H5gu82oebEbwV1UyspuRFhLATh1z5TVpkHPb7u3+zPPrjEC8Jr
RFXLviBdoTyfKG5r/++J
=CyrX
-----END PGP SIGNATURE-----
--=-=-=--




Message sent to bug-libtool@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#13414: [Werner Koch] Re: [pkg-gnupg-maint] Bug#814951: libassuan: add libassuan-mingw-w64-dev for cross-building to Windows targets
Resent-From: Peter Rosin <peda@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-libtool@HIDDEN
Resent-Date: Thu, 03 Mar 2016 21:43:02 +0000
Resent-Message-ID: <handler.13414.B13414.145704132512387 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 13414
X-GNU-PR-Package: libtool
X-GNU-PR-Keywords: 
To: Daniel Kahn Gillmor <dkg@HIDDEN>,  Pavel Raiskup <praiskup@HIDDEN>, 13414 <at> debbugs.gnu.org
Cc: 814951@HIDDEN
Received: via spool by 13414-submit <at> debbugs.gnu.org id=B13414.145704132512387
          (code B ref 13414); Thu, 03 Mar 2016 21:43:02 +0000
Received: (at 13414) by debbugs.gnu.org; 3 Mar 2016 21:42:05 +0000
Received: from localhost ([127.0.0.1]:60560 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1abb0X-0003Dj-CW
	for submit <at> debbugs.gnu.org; Thu, 03 Mar 2016 16:42:05 -0500
Received: from mail.lysator.liu.se ([130.236.254.3]:49027)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <peda@HIDDEN>) id 1abb0U-0003DZ-Uz
 for 13414 <at> debbugs.gnu.org; Thu, 03 Mar 2016 16:42:03 -0500
Received: from mail.lysator.liu.se (localhost [127.0.0.1])
 by mail.lysator.liu.se (Postfix) with ESMTP id 8493740043;
 Thu,  3 Mar 2016 22:42:00 +0100 (CET)
Received: from [192.168.0.96] (217-210-101-82-no95.business.telia.com
 [217.210.101.82])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mail.lysator.liu.se (Postfix) with ESMTPSA id 7AF6B40014;
 Thu,  3 Mar 2016 22:41:59 +0100 (CET)
Message-ID: <56D8AFA6.6030906@HIDDEN>
Date: Thu, 03 Mar 2016 22:41:58 +0100
From: Peter Rosin <peda@HIDDEN>
User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64;
 rv:31.0) Gecko/20100101 Thunderbird/31.3.0
MIME-Version: 1.0
References: <50EFF8C2.2050505@HIDDEN>
 <87mvqv2n9w.fsf@HIDDEN>
 <7880014.ypui2X9GVB@HIDDEN> <56CB77B5.4040102@HIDDEN>
 <87h9gppcm5.fsf@HIDDEN>
In-Reply-To: <87h9gppcm5.fsf@HIDDEN>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://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: -2.3 (--)

Hi!

On 2016-03-02 08:23, Daniel Kahn Gillmor wrote:
> On Mon 2016-02-22 22:03:49 +0100, Peter Rosin wrote:
>> The libtool patch from https://debbugs.gnu.org/13414 is better than the
>> debian patch from https://bugs.debian.org/814951 in every aspect that I
>> can see and should indeed help.
>>
>> For reference, the libtool patch was committed here
>> http://git.savannah.gnu.org/cgit/libtool.git/commit/?id=a5a4944fbb2bbd
>>
>> (three years old, released one year ago in 2.4.3)
> 
> It sounds like you're saying that the libtool patch should already be
> committed and running effectively in libtool 2.4.3 or later.

Yes.

> however, debian had libtool 2.4.2-1.11 up until 2016-02-07, when
> 2.4.6-0.1 entered debian.  But Andreas's bug report of FTBFS on unstable
> [0] came 12 days after 2.4.6 entered unstable and 6 days after 2.4.6
> transitioned to testing [1].  So something in the libtool upstream
> changes either didn't have the desired effect, or something else is
> wrong in debian that i'm unaware of.

Have you checked if libassuan has been libtoolized with 2.4.6? Mind you,
that is not automatically the case just because debian ships 2.4.6. Most
libraries carry a bundled copy of the libtool version they were
libtoolized with by the library maintainer prior to the library release.
Some distributions automatically relibtoolizes its packages, some don't.

> for now, i've gone ahead with the simple patch (moving EXPORTS to the
> first line of the file) for libassuan, but i'll be happy to drop that
> patch when libtool is effectively fixed :)

Please check the libtool version in the relevant version of libassuan.

Cheers,
Peter




Message sent to bug-libtool@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#13414: [Werner Koch] Re: [pkg-gnupg-maint] Bug#814951: libassuan: add libassuan-mingw-w64-dev for cross-building to Windows targets
Resent-From: Daniel Kahn Gillmor <dkg@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-libtool@HIDDEN
Resent-Date: Mon, 07 Mar 2016 01:29:02 +0000
Resent-Message-ID: <handler.13414.B13414.145731411028419 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 13414
X-GNU-PR-Package: libtool
X-GNU-PR-Keywords: 
To: Peter Rosin <peda@HIDDEN>, Pavel Raiskup <praiskup@HIDDEN>, 13414 <at> debbugs.gnu.org
Cc: 814951@HIDDEN
Received: via spool by 13414-submit <at> debbugs.gnu.org id=B13414.145731411028419
          (code B ref 13414); Mon, 07 Mar 2016 01:29:02 +0000
Received: (at 13414) by debbugs.gnu.org; 7 Mar 2016 01:28:30 +0000
Received: from localhost ([127.0.0.1]:37191 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1acjyI-0007OI-6c
	for submit <at> debbugs.gnu.org; Sun, 06 Mar 2016 20:28:30 -0500
Received: from che.mayfirst.org ([209.234.253.108]:44098)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <dkg@HIDDEN>) id 1acjyG-0007OB-Ie
 for 13414 <at> debbugs.gnu.org; Sun, 06 Mar 2016 20:28:29 -0500
Received: from fifthhorseman.net (ool-6c3a0662.static.optonline.net
 [108.58.6.98])
 by che.mayfirst.org (Postfix) with ESMTPSA id 85893F997;
 Sun,  6 Mar 2016 20:28:27 -0500 (EST)
Received: by fifthhorseman.net (Postfix, from userid 1000)
 id E66A9202D6; Sun,  6 Mar 2016 20:27:44 +0100 (CET)
From: Daniel Kahn Gillmor <dkg@HIDDEN>
In-Reply-To: <56D8AFA6.6030906@HIDDEN>
References: <50EFF8C2.2050505@HIDDEN>
 <87mvqv2n9w.fsf@HIDDEN>
 <7880014.ypui2X9GVB@HIDDEN> <56CB77B5.4040102@HIDDEN>
 <87h9gppcm5.fsf@HIDDEN> <56D8AFA6.6030906@HIDDEN>
User-Agent: Notmuch/0.21+74~gb409435 (http://notmuchmail.org) Emacs/24.5.1
 (x86_64-pc-linux-gnu)
Date: Sun, 06 Mar 2016 14:27:44 -0500
Message-ID: <87d1r776fj.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 1.1 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  Hi Peter-- On Thu 2016-03-03 16:41:58 -0500,
 Peter Rosin <peda@HIDDEN>
 wrote: > Have you checked if libassuan has been libtoolized with 2.4.6? Mind
 you, > that is not automatically the case just because debian ships 2.4.6.
 Most > libraries carry a bundled copy of the libtool version they were >
 libtoolized with by the library maintainer prior to the library release. >
 Some distributions automatically relibtoolizes its packages, some don't.
 [...] Content analysis details:   (1.1 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 1.1 DATE_IN_PAST_06_12     Date: is 6 to 12 hours before Received: date
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://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: 1.1 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  Hi Peter-- On Thu 2016-03-03 16:41:58 -0500, Peter Rosin <peda@HIDDEN>
    wrote: > Have you checked if libassuan has been libtoolized with 2.4.6? Mind
    you, > that is not automatically the case just because debian ships 2.4.6.
    Most > libraries carry a bundled copy of the libtool version they were >
   libtoolized with by the library maintainer prior to the library release. >
    Some distributions automatically relibtoolizes its packages, some don't.
   [...] 
 
 Content analysis details:   (1.1 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  1.1 DATE_IN_PAST_06_12     Date: is 6 to 12 hours before Received: date

Hi Peter--

On Thu 2016-03-03 16:41:58 -0500, Peter Rosin <peda@HIDDEN> wrote:
> Have you checked if libassuan has been libtoolized with 2.4.6? Mind you,
> that is not automatically the case just because debian ships 2.4.6. Most
> libraries carry a bundled copy of the libtool version they were
> libtoolized with by the library maintainer prior to the library release.
> Some distributions automatically relibtoolizes its packages, some don't.

the debian packaging for libassuan uses dh_autoreconf, which
automatically libretoolizes.

              --dkg




Message sent to bug-libtool@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#13414: [Werner Koch] Re: [pkg-gnupg-maint] Bug#814951: libassuan: add libassuan-mingw-w64-dev for cross-building to Windows targets
Resent-From: Peter Rosin <peda@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-libtool@HIDDEN
Resent-Date: Mon, 07 Mar 2016 07:37:02 +0000
Resent-Message-ID: <handler.13414.B13414.145733617928737 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 13414
X-GNU-PR-Package: libtool
X-GNU-PR-Keywords: 
To: Daniel Kahn Gillmor <dkg@HIDDEN>,  Pavel Raiskup <praiskup@HIDDEN>, 13414 <at> debbugs.gnu.org
Cc: 814951@HIDDEN
Received: via spool by 13414-submit <at> debbugs.gnu.org id=B13414.145733617928737
          (code B ref 13414); Mon, 07 Mar 2016 07:37:02 +0000
Received: (at 13414) by debbugs.gnu.org; 7 Mar 2016 07:36:19 +0000
Received: from localhost ([127.0.0.1]:37284 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1acpiE-0007TR-UG
	for submit <at> debbugs.gnu.org; Mon, 07 Mar 2016 02:36:19 -0500
Received: from mail.lysator.liu.se ([130.236.254.3]:45317)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <peda@HIDDEN>) id 1acpiD-0007TJ-Ee
 for 13414 <at> debbugs.gnu.org; Mon, 07 Mar 2016 02:36:18 -0500
Received: from mail.lysator.liu.se (localhost [127.0.0.1])
 by mail.lysator.liu.se (Postfix) with ESMTP id CADE040059;
 Mon,  7 Mar 2016 08:36:15 +0100 (CET)
Received: from [192.168.0.96] (217-210-101-82-no95.business.telia.com
 [217.210.101.82])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mail.lysator.liu.se (Postfix) with ESMTPSA id 13DAF40055;
 Mon,  7 Mar 2016 08:36:14 +0100 (CET)
Message-ID: <56DD2F6C.3060604@HIDDEN>
Date: Mon, 07 Mar 2016 08:36:12 +0100
From: Peter Rosin <peda@HIDDEN>
User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64;
 rv:31.0) Gecko/20100101 Thunderbird/31.3.0
MIME-Version: 1.0
References: <50EFF8C2.2050505@HIDDEN>	<87mvqv2n9w.fsf@HIDDEN>	<7880014.ypui2X9GVB@HIDDEN>	<56CB77B5.4040102@HIDDEN>	<87h9gppcm5.fsf@HIDDEN>	<56D8AFA6.6030906@HIDDEN>
 <87d1r776fj.fsf@HIDDEN>
In-Reply-To: <87d1r776fj.fsf@HIDDEN>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://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: -2.3 (--)

Hi!

On 2016-03-06 20:27, Daniel Kahn Gillmor wrote:
> Hi Peter--
> 
> On Thu 2016-03-03 16:41:58 -0500, Peter Rosin <peda@HIDDEN> wrote:
>> Have you checked if libassuan has been libtoolized with 2.4.6? Mind you,
>> that is not automatically the case just because debian ships 2.4.6. Most
>> libraries carry a bundled copy of the libtool version they were
>> libtoolized with by the library maintainer prior to the library release.
>> Some distributions automatically relibtoolizes its packages, some don't.
> 
> the debian packaging for libassuan uses dh_autoreconf, which
> automatically libretoolizes.

Then it must be something fiddly going on, the def file looks simple enough...

Maybe your .def file is infested with CR/NL line-endings, does the below patch
(untested) help?

Cheers,
Peter

diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index 2601564..e323165 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -1358,12 +1358,11 @@ func_dll_def_p ()
 {
   $debug_cmd
 
-  func_dll_def_p_tmp=`$SED -n \
+  func_dll_def_p_tmp=`tr -d '\015' < "$1" | $SED -n \
     -e 's/^[	 ]*//' \
     -e '/^\(;.*\)*$/d' \
     -e 's/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p' \
-    -e q \
-    "$1"`
+    -e q`
   test DEF = "$func_dll_def_p_tmp"
 }
 
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index ee292af..7b33d6a 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -3847,12 +3847,11 @@ _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
 # Keep in sync with func_dll_def_p in the libtool script
 AC_DEFUN([_LT_DLL_DEF_P],
 [dnl
-  test DEF = "`$SED -n dnl
+  test DEF = "`tr -d '\''\015'\'' < $1 | $SED -n dnl
     -e '\''s/^[[	 ]]*//'\'' dnl Strip leading whitespace
     -e '\''/^\(;.*\)*$/d'\'' dnl      Delete empty lines and comments
     -e '\''s/^\(EXPORTS\|LIBRARY\)\([[	 ]].*\)*$/DEF/p'\'' dnl
-    -e q dnl                          Only consider the first "real" line
-    $1`" dnl
+    -e q`" dnl                        Only consider the first "real" line
 ])# _LT_DLL_DEF_P
 
 





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.