GNU bug report logs - #29224
Solaris, lost mapfiles and silent failures

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: noloader@HIDDEN; dated Thu, 9 Nov 2017 05:21:02 UTC; Maintainer for libtool is bug-libtool@HIDDEN.

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


Received: (at 29224) by debbugs.gnu.org; 21 Nov 2017 15:37:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 21 10:37:51 2017
Received: from localhost ([127.0.0.1]:51240 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eHAcR-00011A-Hh
	for submit <at> debbugs.gnu.org; Tue, 21 Nov 2017 10:37:51 -0500
Received: from mail.lysator.liu.se ([130.236.254.3]:41441)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <peda@HIDDEN>) id 1eHAcP-00010z-0s
 for 29224 <at> debbugs.gnu.org; Tue, 21 Nov 2017 10:37:50 -0500
Received: from mail.lysator.liu.se (localhost [127.0.0.1])
 by mail.lysator.liu.se (Postfix) with ESMTP id 51CF84002E;
 Tue, 21 Nov 2017 16:37:47 +0100 (CET)
Received: from [192.168.13.3]
 (c-17f4e255.26241707-0-68616c6d7374616473746164736e6174.cust.bredbandsbolaget.se
 [85.226.244.23])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mail.lysator.liu.se (Postfix) with ESMTPSA id 231F240029;
 Tue, 21 Nov 2017 16:37:45 +0100 (CET)
Subject: Re: bug#29224: Solaris, lost mapfiles and silent failures
To: noloader@HIDDEN, 29224 <at> debbugs.gnu.org
References: <CAH8yC8mhLyzAMgRkycWgsT8V-98WDEqVx9C-DRbeCVxf7an+Zw@HIDDEN>
From: Peter Rosin <peda@HIDDEN>
Message-ID: <a2db71df-1179-9bf1-2d27-3c267dc92bda@HIDDEN>
Date: Tue, 21 Nov 2017 16:37:44 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101
 Thunderbird/52.4.0
MIME-Version: 1.0
In-Reply-To: <CAH8yC8mhLyzAMgRkycWgsT8V-98WDEqVx9C-DRbeCVxf7an+Zw@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 29224
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 2017-11-09 06:19, Jeffrey Walton wrote:
> I've been tracking an Autotools issue on Solaris 11.3 x86_64 (fully
> patched). The project is a C++ library, and it uses a mapfile to set
> capabilities on executables and shared objects.
> 
> The mapfile specifies SSE and SSE2 capabilities. The mapfile is added
> with the linker option '-M mylib.mapfile'. There are no long forms of
> the command. Confer,
> https://docs.oracle.com/cd/E26502_01/html/E29030/ld-1.html.
> 
> When the Autotools project builds the library and test program,
> libtool silently drops the mapfile when linking the shared object. It
> just vanishes into the ether. The mapfile is present when building
> test program. Its only missing when building the shared object.
> 
> Subsequently, trying to run the test program results in:
> 
>    $ ./cryptestcwd v
>    ld.so.1: cryptestcwd: fatal:
>    /export/home/cryptopp/.libs/libcryptopp.so.6: hardware capability
>    (CA_SUNW_HW_1) unsupported: 0x4800000  [ AES SSE4.1 ]
>    Killed
> 
> The failure is silent. libtool does not produce a warning or error
> message stating its removing the option. The documentation does not
> discuss libtool's behavior on Solaris. There's a warning for -M
> options on Cygwin, and I believe that is the extent of it. Solaris is
> certainly not Cygwin. Confer,
> https://www.gnu.org/software/libtool/manual/libtool.html.
> 
> We spent the better part of a day trying to trouble shoot the issue.
> Our attention was focused on Automake, and trying to untangle things
> that result in missing AM_LDFLAGS options when linking the shared
> object. The lack of a message probably wasted 6 to 10 man hours.
> 
> Please stop removing important options needed to link programs and
> shared objects. The  options were specified for a reason and they are
> necessary. If libtool cannot stop removing necessary options, then we
> need (1) a clear message stating what is happening; (2) documentation
> on the behavior; and (3) a way to override the default behavior.
> 
> An example of working around the problem would be nice since Autotools
> does not appear to have a post-build or post-link hook. We cut-in an
> awful hack, but it probably runs afoul of Autotools or libtool.
> Confer, https://github.com/noloader/cryptopp-autotools/commit/61828068c6ab.

Your mail is a bit poisonous and seeks to blame others, so I'm not
sure I want to respond. I actually don't know why I'm spending time
on your problem...

But ok, I feel your pain. So, defending Libtool, I don't think the
manual states that linker options are supposed to be transparent. The
whole point of libtool is to hide the particulars of the specific
linker, especially when creating shared libraries. I.e. when using
Lintool, you get to use the options mentioned in the Libtool manual.
Sure, a lot of them are similar and in many cases equivalent to
options for "the real linkers", but it is an error to expect Libtool
to accept the union of all options of all linkers.

BTW, the first (and only) entry in the FAQ is:

    "Why does libtool strip link flags when creating a library?"

I suggest you read it. In short, research the -Wc and the -Wl options.

Perhaps "-Wc,-M,mylib.mapfile" or "-Wl,-M,mylib.mapfile" will do?

Cheers,
Peter




Information forwarded to bug-libtool@HIDDEN:
bug#29224; Package libtool. Full text available.

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


Received: (at submit) by debbugs.gnu.org; 9 Nov 2017 05:20:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 09 00:20:07 2017
Received: from localhost ([127.0.0.1]:59311 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eCfFz-0004sn-Ov
	for submit <at> debbugs.gnu.org; Thu, 09 Nov 2017 00:20:07 -0500
Received: from eggs.gnu.org ([208.118.235.92]:42126)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <noloader@HIDDEN>) id 1eCfFx-0004sA-Qd
 for submit <at> debbugs.gnu.org; Thu, 09 Nov 2017 00:20:02 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <noloader@HIDDEN>) id 1eCfFr-0003Wd-Ny
 for submit <at> debbugs.gnu.org; Thu, 09 Nov 2017 00:19:56 -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,FREEMAIL_FROM,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:48927)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <noloader@HIDDEN>) id 1eCfFr-0003WV-Kg
 for submit <at> debbugs.gnu.org; Thu, 09 Nov 2017 00:19:55 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:33096)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <noloader@HIDDEN>) id 1eCfFq-0000PR-CP
 for bug-libtool@HIDDEN; Thu, 09 Nov 2017 00:19:55 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <noloader@HIDDEN>) id 1eCfFp-0003Vf-5z
 for bug-libtool@HIDDEN; Thu, 09 Nov 2017 00:19:54 -0500
Received: from mail-ot0-x232.google.com ([2607:f8b0:4003:c0f::232]:49691)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <noloader@HIDDEN>) id 1eCfFo-0003UT-WE
 for bug-libtool@HIDDEN; Thu, 09 Nov 2017 00:19:53 -0500
Received: by mail-ot0-x232.google.com with SMTP id c47so4335408otj.6
 for <bug-libtool@HIDDEN>; Wed, 08 Nov 2017 21:19:51 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:reply-to:from:date:message-id:subject:to;
 bh=xuTSrXjS/QJpFuXyUG5on1pbxdFqhQbwveOT9ZpToLY=;
 b=MG6K2pjCQBw10eBNGSGk5d0+ayp7FFU3wku4WT3xRw98jbxX8MkWu6/K/G1unEJDNv
 dXG0lX8QF7v/JANks8WVFDCdxNksX3trQE480JXHr5TSItJY+hQpSyuAvDxWZaWW16MK
 O6DieTTyJcWUZq9Un0QZl4lWUTg5SnK7Wy3RsgVhtbdpT++Lurs9QmYs9q5z2iBBxsfp
 TXZe/Z2Dj5bcDIb/6FjNim7jicrxvCqpW+lt64Xw0w+84KUXtzCtV482CVUwnL/+F1M4
 teKaxracgjNXOx9qa0saDpvoMEQfsKRCI1j4cG8PjLoGqeB8wjpBPfoetHSzK9gQBP55
 lpMQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:reply-to:from:date:message-id
 :subject:to;
 bh=xuTSrXjS/QJpFuXyUG5on1pbxdFqhQbwveOT9ZpToLY=;
 b=m0B8Ji2YTEtwihzJ3Q+ikRakm2jB8jPr1mc3BRwjeEfqhbEGi/zpzUsfswPUoZoJCL
 EAxtXxXmDoMzGEJxpqErvAWMm68AVySq3ghB7QBrSE+AXGhU2Vs9R9yvyEooK89W/+8v
 gEL+LVGrUpDnwJGzYrs0SBN7moLzaotHYgiWoLuRQLtshitrOAFgF266MKAaEg8vt42n
 ASxpUoUjNnN7Cuxys7UcZfNTJVoBSPlv0SCmrhm9IdGBREyic8UH726g96oetmNIls95
 aGVLCPf1RNehH+tmQBseUqBaYcyKjwuCUTrpNf/9wXMPmc6Ks1xJ7ukbAXCuwRyITeYK
 6Gww==
X-Gm-Message-State: AJaThX6TnWy3bfDIEtW3pnFCSFWKZyuh444tArqJkCgdzOTJQqtP2NW8
 tdAkAnz/c9w3+0Rfl5JMFZpcM50spbRxpNIaXwI5UYl5
X-Google-Smtp-Source: AGs4zMbako0WBI1tohQWati0+VyH64na3pz5Ztc/hOo8SRxbb7+bAz2dx2AThS+YOwJphFdu4zFmHGvIs1mimxWwkMo=
X-Received: by 10.157.17.68 with SMTP id p4mr1567233otp.321.1510204790323;
 Wed, 08 Nov 2017 21:19:50 -0800 (PST)
MIME-Version: 1.0
Received: by 10.74.19.87 with HTTP; Wed, 8 Nov 2017 21:19:49 -0800 (PST)
From: Jeffrey Walton <noloader@HIDDEN>
Date: Thu, 9 Nov 2017 00:19:49 -0500
Message-ID: <CAH8yC8mhLyzAMgRkycWgsT8V-98WDEqVx9C-DRbeCVxf7an+Zw@HIDDEN>
Subject: Solaris, lost mapfiles and silent failures
To: bug-libtool@HIDDEN
Content-Type: text/plain; charset="UTF-8"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
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.0 (----)
X-Debbugs-Envelope-To: submit
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>
Reply-To: noloader@HIDDEN
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

I've been tracking an Autotools issue on Solaris 11.3 x86_64 (fully
patched). The project is a C++ library, and it uses a mapfile to set
capabilities on executables and shared objects.

The mapfile specifies SSE and SSE2 capabilities. The mapfile is added
with the linker option '-M mylib.mapfile'. There are no long forms of
the command. Confer,
https://docs.oracle.com/cd/E26502_01/html/E29030/ld-1.html.

When the Autotools project builds the library and test program,
libtool silently drops the mapfile when linking the shared object. It
just vanishes into the ether. The mapfile is present when building
test program. Its only missing when building the shared object.

Subsequently, trying to run the test program results in:

   $ ./cryptestcwd v
   ld.so.1: cryptestcwd: fatal:
   /export/home/cryptopp/.libs/libcryptopp.so.6: hardware capability
   (CA_SUNW_HW_1) unsupported: 0x4800000  [ AES SSE4.1 ]
   Killed

The failure is silent. libtool does not produce a warning or error
message stating its removing the option. The documentation does not
discuss libtool's behavior on Solaris. There's a warning for -M
options on Cygwin, and I believe that is the extent of it. Solaris is
certainly not Cygwin. Confer,
https://www.gnu.org/software/libtool/manual/libtool.html.

We spent the better part of a day trying to trouble shoot the issue.
Our attention was focused on Automake, and trying to untangle things
that result in missing AM_LDFLAGS options when linking the shared
object. The lack of a message probably wasted 6 to 10 man hours.

Please stop removing important options needed to link programs and
shared objects. The  options were specified for a reason and they are
necessary. If libtool cannot stop removing necessary options, then we
need (1) a clear message stating what is happening; (2) documentation
on the behavior; and (3) a way to override the default behavior.

An example of working around the problem would be nice since Autotools
does not appear to have a post-build or post-link hook. We cut-in an
awful hack, but it probably runs afoul of Autotools or libtool.
Confer, https://github.com/noloader/cryptopp-autotools/commit/61828068c6ab.

Thanks in advance.




Acknowledgement sent to noloader@HIDDEN:
New bug report received and forwarded. Copy sent to bug-libtool@HIDDEN. Full text available.
Report forwarded to bug-libtool@HIDDEN:
bug#29224; 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: 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.