GNU bug report logs - #15321
incorrect sys_lib_search_path_spec with mingw cross compiler

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: libtool; Reported by: Ozkan Sezer <sezeroz@HIDDEN>; dated Tue, 10 Sep 2013 15:45:03 UTC; Maintainer for libtool is bug-libtool@HIDDEN.

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


Received: (at submit) by debbugs.gnu.org; 10 Sep 2013 15:44:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 10 11:44:40 2013
Received: from localhost ([127.0.0.1]:52765 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VJQ7L-0004C5-8p
	for submit <at> debbugs.gnu.org; Tue, 10 Sep 2013 11:44:39 -0400
Received: from eggs.gnu.org ([208.118.235.92]:44472)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <sezeroz@HIDDEN>) id 1VJNFA-0007m8-0y
 for submit <at> debbugs.gnu.org; Tue, 10 Sep 2013 08:40:32 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <sezeroz@HIDDEN>) id 1VJNF3-0006fQ-7a
 for submit <at> debbugs.gnu.org; Tue, 10 Sep 2013 08:40:26 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:41705)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <sezeroz@HIDDEN>) id 1VJNF3-0006fM-4N
 for submit <at> debbugs.gnu.org; Tue, 10 Sep 2013 08:40:25 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:46166)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <sezeroz@HIDDEN>) id 1VJNEy-00011f-0H
 for bug-libtool@HIDDEN; Tue, 10 Sep 2013 08:40:25 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <sezeroz@HIDDEN>) id 1VJNEw-0006dR-BU
 for bug-libtool@HIDDEN; Tue, 10 Sep 2013 08:40:19 -0400
Received: from mail-pb0-x22e.google.com ([2607:f8b0:400e:c01::22e]:50461)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <sezeroz@HIDDEN>) id 1VJNEv-0006dI-WF
 for bug-libtool@HIDDEN; Tue, 10 Sep 2013 08:40:18 -0400
Received: by mail-pb0-f46.google.com with SMTP id rq2so7465230pbb.5
 for <bug-libtool@HIDDEN>; Tue, 10 Sep 2013 05:40:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:date:message-id:subject:from:to:cc:content-type
 :content-transfer-encoding;
 bh=nE2Lfp3xNZ3OwY+P33ceh7uYw+gwHHMMwFZ40dqr4WI=;
 b=xzCai7bz3aAoJZWuwzH9/zIsOJs9htWhlt3wECxTu15rdUSp9hAg7xG2WzjQfYxLdA
 vuomcBPtum+nZWr4vPCmlUwO6YpRBPmND4ThtqoRgx23PeLv9iz2hjc336My2CfXI8Cc
 an3MVJ4bKojdqgt0SwkTvniw641+8ZtohCOQe+1jWo0OaXV5XbtJVMMZ1XDKMMC/vClm
 MJfjR/7PhTwR8Z0Vnf9kDkWcW/jUCgQi0U1TyB2TtDiHoiKZs6UVsYkDo32w/qH7UGvK
 28+O6F06b/uuT4295YLdU1+oauM4MMRFT00KnROnwmDN9J0d64kRfaeOw1SwWr2NdhaU
 HbUA==
MIME-Version: 1.0
X-Received: by 10.68.241.198 with SMTP id wk6mr14243115pbc.122.1378816817004; 
 Tue, 10 Sep 2013 05:40:17 -0700 (PDT)
Received: by 10.68.236.97 with HTTP; Tue, 10 Sep 2013 05:40:16 -0700 (PDT)
Date: Tue, 10 Sep 2013 15:40:16 +0300
Message-ID: <CAA2C=vAGEuLKmFQVVt8q8Sz0_AbTnjyv0RCReMbpD6t1eAv8uw@HIDDEN>
Subject: incorrect sys_lib_search_path_spec with mingw cross compiler
From: Ozkan Sezer <sezeroz@HIDDEN>
To: bug-libtool@HIDDEN
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Tue, 10 Sep 2013 11:44:37 -0400
Cc: Peter Rosin <peda@HIDDEN>,
 Charles Wilson <libtool@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

This patch by Charles Wilson went in in 2009 between libtool-2.2.6 and
2.2.8 is causing libtool to use incorrect sys_lib_search_path_spec with
mingw cross compiler:
http://lists.gnu.org/archive/html/libtool-patches/2009-06/msg00052.html
http://git.savannah.gnu.org/gitweb/?p=3Dlibtool.git;a=3Dcommitdiff;h=3Df0f9=
9955cb283ead0817744921621d66c049709f

$ x86_64-w64-mingw32-gcc --print-search-dirs
install: /opt/W64_180676/bin/../lib/gcc/x86_64-w64-mingw32/4.5.4/
programs: =3D/opt/W64_180676/bin/../libexec/gcc/x86_64-w64-mingw32/4.5.4/:/=
opt/W64_180676/bin/../libexec/gcc/:/opt/W64_180676/bin/../lib/gcc/x86_64-w6=
4-mingw32/4.5.4/../../../../x86_64-w64-mingw32/bin/x86_64-w64-mingw32/4.5.4=
/:/opt/W64_180676/bin/../lib/gcc/x86_64-w64-mingw32/4.5.4/../../../../x86_6=
4-w64-mingw32/bin/
libraries: =3D/opt/W64_180676/bin/../lib/gcc/x86_64-w64-mingw32/4.5.4/:/opt=
/W64_180676/bin/../lib/gcc/:/opt/W64_180676/bin/../lib/gcc/x86_64-w64-mingw=
32/4.5.4/../../../../x86_64-w64-mingw32/lib/x86_64-w64-mingw32/4.5.4/:/opt/=
W64_180676/bin/../lib/gcc/x86_64-w64-mingw32/4.5.4/../../../../x86_64-w64-m=
ingw32/lib/../lib64/:/opt/W64_180676/bin/../../cross_win64/mingw/lib/x86_64=
-w64-mingw32/4.5.4/:/opt/W64_180676/bin/../../cross_win64/mingw/lib/../lib6=
4/:/opt/W64_180676/bin/../lib/gcc/x86_64-w64-mingw32/4.5.4/../../../../x86_=
64-w64-mingw32/lib/:/opt/W64_180676/bin/../../cross_win64/mingw/lib/

With libtool-2.2.6 and older, I have this in libtool --config output:
sys_lib_search_path_spec=3D"
/opt/W64_180676/bin/../lib/gcc/x86_64-w64-mingw32/4.5.4/
/opt/W64_180676/bin/../lib/gcc/
/opt/W64_180676/bin/../lib/gcc/x86_64-w64-mingw32/4.5.4/../../../../x86_64-=
w64-mingw32/lib/x86_64-w64-mingw32/4.5.4/
/opt/W64_180676/bin/../lib/gcc/x86_64-w64-mingw32/4.5.4/../../../../x86_64-=
w64-mingw32/lib/../lib64/
/opt/W64_180676/bin/../../cross_win64/mingw/lib/x86_64-w64-mingw32/4.5.4/
/opt/W64_180676/bin/../../cross_win64/mingw/lib/../lib64/
/opt/W64_180676/bin/../lib/gcc/x86_64-w64-mingw32/4.5.4/../../../../x86_64-=
w64-mingw32/lib/
/opt/W64_180676/bin/../../cross_win64/mingw/lib/"

With libtool-2.2.8 and newer, including current git, it is like this:
sys_lib_search_path_spec=3D"/opt/W64_180676/lib/gcc
/opt/W64_180676/x86_64-w64-mingw32/lib64 /opt/cross_win64/mingw/lib64
"

... which is incorrect: /opt/W64_180676/x86_64-w64-mingw32/lib64 does
exist, but it holds only gcc libs, whereas the required libs are under
/opt/W64_180676/x86_64-w64-mingw32/lib, therefore libtool -2.2.8 and
newer cannot build a dll with the following failure:

*** Warning: linker path does not have real file for library -lole32.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libole32 but no candidates were found. (...for file magic test)

*** Warning: linker path does not have real file for library -ldsound.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libdsound but no candidates were found. (...for file magic test)

*** Warning: linker path does not have real file for library -lwinmm.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libwinmm but no candidates were found. (...for file magic test)
*** The inter-library dependencies that have been dropped here will be
*** automatically added whenever a program is linked with this library
*** or is declared to -dlopen it.

.. only because it cannot find the libs. Reverting the above-mentioned
change makes it to work again.

--
O.S.




Acknowledgement sent to Ozkan Sezer <sezeroz@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-libtool@HIDDEN. Full text available.
Report forwarded to bug-libtool@HIDDEN:
bug#15321; Package libtool. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

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