GNU bug report logs -
#29224
Solaris, lost mapfiles and silent failures
Previous Next
To reply to this bug, email your comments to 29224 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-libtool <at> gnu.org
:
bug#29224
; Package
libtool
.
(Thu, 09 Nov 2017 05:21:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
noloader <at> gmail.com
:
New bug report received and forwarded. Copy sent to
bug-libtool <at> gnu.org
.
(Thu, 09 Nov 2017 05:21:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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.
Information forwarded
to
bug-libtool <at> gnu.org
:
bug#29224
; Package
libtool
.
(Tue, 21 Nov 2017 15:38:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 29224 <at> debbugs.gnu.org (full text, mbox):
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
This bug report was last modified 7 years and 207 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.