unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Andy Moreton <andrewjmoreton@gmail.com>
To: 37852@debbugs.gnu.org
Subject: bug#37852: Build failure on MSYS2 (undefined reference to _chk functions)
Date: Mon, 21 Oct 2019 17:05:35 +0100	[thread overview]
Message-ID: <vz1eez6dqy8.fsf@gmail.com> (raw)
In-Reply-To: <CAPM58ojJU9FXHodR1Ad3y=5Rd4+e6ikkSb0HP4+7BS7VREyZoA@mail.gmail.com>

On Mon 21 Oct 2019, Eli Zaretskii wrote:

>> From: Richard Copley <rcopley@gmail.com>
>> Date: Mon, 21 Oct 2019 14:17:36 +0100
>> Cc: 37852@debbugs.gnu.org
>> 
>> On Mon, 21 Oct 2019 at 14:07, Eli Zaretskii <eliz@gnu.org> wrote:
>> 
>>  > From: Richard Copley <rcopley@gmail.com>
>>  > Date: Mon, 21 Oct 2019 13:28:29 +0100
>>  > 
>>  > Linking auxiliary executables fails with undefined references to (FORTIFY_SOURCE?) functions 
>>  > __memcpy_chk and __memmove_chk. This is apparently caused by some change in MSYS2,
>>  because
>>  > previously buildable commits now fail. Transcript below.
>> 
>>  Looks like FORTIFY_SOURCE requires linking against -lssp?  Can you try
>>  adding that, e.g. by
>> 
>>    make LIBS_SYSTEM=-lssp
>> 
>> Yes, that works.
>
> OK, thanks.
>
> So do we need to add that library to the link command under some
> conditions?  IOW, is FORTIFY_SOURCE something that comes out of our
> configure script (in which case I'm missing something, because I
> didn't find it in the configure script), or is this an option you
> added manually?  In the latter case, would configuring with LIBS=-lssp
> be an okay solution?

See GNULIB_PORTCHECK_FORTIFY_SOURCE in configure.ac - the relevant macro
is _FORTIFY_SOURCE.

Building with -D_FORTIFY_SOURCE=0 also works, but your suggestion to add
the missing library is a better workaround than disabling the checks.

    AndyM






  parent reply	other threads:[~2019-10-21 16:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-21 12:28 bug#37852: Build failure on MSYS2 (undefined reference to _chk functions) Richard Copley
2019-10-21 13:07 ` Eli Zaretskii
2019-10-21 13:17   ` Richard Copley
2019-10-21 13:31     ` Eli Zaretskii
2019-10-21 14:04       ` Richard Copley
2019-10-21 16:01         ` Eli Zaretskii
2019-10-21 16:05       ` Andy Moreton [this message]
2019-10-21 16:36         ` Eli Zaretskii
2019-10-21 16:55           ` Eli Zaretskii
2019-10-22  0:40 ` Paul Eggert
2019-10-22  2:37   ` Eli Zaretskii
2019-10-22 18:27     ` Paul Eggert
2019-10-22 18:51       ` Eli Zaretskii
2019-10-23 21:29         ` Richard Copley
2019-10-24 13:50           ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vz1eez6dqy8.fsf@gmail.com \
    --to=andrewjmoreton@gmail.com \
    --cc=37852@debbugs.gnu.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).