bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#37852: Build failure on MSYS2 (undefined reference to _chk functions


From: Andy Moreton
Subject: bug#37852: Build failure on MSYS2 (undefined reference to _chk functions)
Date: Mon, 21 Oct 2019 17:05:35 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt)

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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]