From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: cygwin-apps@cygwin.com
Subject: Re: libtool can't build shared library unless -no-undefined specified
Date: Tue, 21 May 2024 10:22:54 -0600 [thread overview]
Message-ID: <f933ac1a-d9f4-48dc-9b93-8a61414adca9@SystematicSw.ab.ca> (raw)
In-Reply-To: <a19b6f07-8ff8-42c6-aec3-515dba9fcb0f@dronecode.org.uk>
On 2024-05-21 07:18, Jon Turney via Cygwin-apps wrote:
> On 17/05/2024 05:50, Brian Inglis via Cygwin-apps wrote:
>> On 2024-05-16 15:45, Ken Brown via Cygwin-apps wrote:
>>> On 5/16/2024 4:24 PM, Brian Inglis via Cygwin-apps wrote:
>>>> Trying to update dateutils, autotools build fails with:
>>>> libtool: error: can't build x86_64-pc-cygwin shared library unless
>>>> -no-undefined is specified
>>>> Suggestions for overrides or fixes?
>>>> Tried:
>>>> LDFLAGS="$LDFLAGS -Wl,--no-allow-shlib-undefined -Wl,--no-undefined"
>>>> CYGCONF_ARGS="
>>>> --enable-contrib
>>>> --enable-tzmap-fetch
>>>> lt_no_undefined_flag=--no-undefined
>>>> no_undefined_flag=--no-undefined
>>> You and I discussed this a few years ago in connection with curl. The
>>> solution there, and in most similar cases, is to add -no-undefined to the
>>> appropriate lib*_la_LDFLAGS variable(s) in Makefile.am. See
Had to patch into lib AM_LDFLAGS variable, then found out that library was not
for use in open source packages, but only required to link with a (missing)
proprietary MatLab module, so dropped the config --enable-contrib option!
> Yeah, building stuff for Cygwin often requires adding this flag in the
> appropriate places, to say "yes, I really do want a shared library".
> https://www.gnu.org/software/libtool/manual/html_node/Link-mode.html#Link-mode
>> -no-undefined
>> Declare that output-file does not depend on any libraries other than
>> the ones listed on the command line, i.e., after linking, it will not
>> have unresolved symbols. Some platforms require all symbols in shared
>> libraries to be resolved at library creation (see Inter-library
>> dependencies), and using this parameter allows libtool to assume that
>> this will not happen.
> Note that because this flag doesn't do anything for non-PE targets, it's (a)
> always safe to upstream, and (b) doesn't actually prevent development from
> unwittingly introducing unresolved symbols.
In that case, could we ask Bruno to add into gnulib somewhere appropriate?
> This should probably be mentioned in the FAQ item on PE linkage peculiarities.
In libtool info?
--
Take care. Thanks, Brian Inglis Calgary, Alberta, Canada
La perfection est atteinte Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut
-- Antoine de Saint-Exupéry
next prev parent reply other threads:[~2024-05-21 16:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-16 20:24 Brian Inglis
2024-05-16 21:45 ` Ken Brown
2024-05-17 4:50 ` Brian Inglis
2024-05-21 13:18 ` Jon Turney
2024-05-21 16:22 ` Brian Inglis [this message]
2024-06-02 14:56 ` Jon Turney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f933ac1a-d9f4-48dc-9b93-8a61414adca9@SystematicSw.ab.ca \
--to=brian.inglis@systematicsw.ab.ca \
--cc=cygwin-apps@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).