From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Andy Moreton Newsgroups: gmane.emacs.bugs Subject: bug#37852: Build failure on MSYS2 (undefined reference to _chk functions) Date: Mon, 21 Oct 2019 17:05:35 +0100 Message-ID: References: <83k18y2qnd.fsf@gnu.org> <83eez62pir.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="44867"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt) To: 37852@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 21 18:09:26 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iMaFI-000BXp-Rx for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 Oct 2019 18:09:24 +0200 Original-Received: from localhost ([::1]:44754 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMaFH-0001JF-Ld for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 Oct 2019 12:09:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34595) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMaC5-0005Ag-V1 for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2019 12:06:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iMaC4-0004l9-Lm for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2019 12:06:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48847) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iMaC4-0004l3-J9 for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2019 12:06:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iMaC2-00049N-9w for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2019 12:06:04 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Andy Moreton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Oct 2019 16:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37852 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.157167395515932 (code B ref -1); Mon, 21 Oct 2019 16:06:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Oct 2019 16:05:55 +0000 Original-Received: from localhost ([127.0.0.1]:57668 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMaBu-00048t-Mt for submit@debbugs.gnu.org; Mon, 21 Oct 2019 12:05:54 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:57496) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMaBs-00048j-2t for submit@debbugs.gnu.org; Mon, 21 Oct 2019 12:05:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34557) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMaBq-0004rP-IH for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2019 12:05:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iMaBm-0004gV-UW for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2019 12:05:50 -0400 Original-Received: from 195-159-176-226.customer.powertech.no ([195.159.176.226]:45222 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iMaBm-0004fw-Nu for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2019 12:05:46 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1iMaBj-00074t-VQ for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2019 18:05:43 +0200 X-Injected-Via-Gmane: http://gmane.org/ Cancel-Lock: sha1:cSEP7s/2bjJcy5OzsxVa4exT5yQ= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:169922 Archived-At: On Mon 21 Oct 2019, Eli Zaretskii wrote: >> From: Richard Copley >> Date: Mon, 21 Oct 2019 14:17:36 +0100 >> Cc: 37852@debbugs.gnu.org >> >> On Mon, 21 Oct 2019 at 14:07, Eli Zaretskii wrote: >> >> > From: Richard Copley >> > 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