From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Richard Copley Newsgroups: gmane.emacs.bugs Subject: bug#37852: Build failure on MSYS2 (undefined reference to _chk functions) Date: Mon, 21 Oct 2019 15:04:34 +0100 Message-ID: References: <83k18y2qnd.fsf@gnu.org> <83eez62pir.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000780c4005956c2b2d" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="34611"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 37852@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 21 16:06:17 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 1iMYK7-0008jn-E3 for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 Oct 2019 16:06:15 +0200 Original-Received: from localhost ([::1]:42792 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMYK5-0002KM-Vt for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 Oct 2019 10:06:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44876) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMYJw-0002HN-3Y for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2019 10:06:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iMYJu-0002jX-SB for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2019 10:06:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48774) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iMYJu-0002jP-P5 for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2019 10:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iMYJu-0007KO-HN for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2019 10:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Richard Copley Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Oct 2019 14:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37852 X-GNU-PR-Package: emacs Original-Received: via spool by 37852-submit@debbugs.gnu.org id=B37852.157166670928067 (code B ref 37852); Mon, 21 Oct 2019 14:06:02 +0000 Original-Received: (at 37852) by debbugs.gnu.org; 21 Oct 2019 14:05:09 +0000 Original-Received: from localhost ([127.0.0.1]:57595 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMYJ2-0007Id-QN for submit@debbugs.gnu.org; Mon, 21 Oct 2019 10:05:09 -0400 Original-Received: from mail-ot1-f42.google.com ([209.85.210.42]:46959) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMYJ1-0007IF-LE for 37852@debbugs.gnu.org; Mon, 21 Oct 2019 10:05:08 -0400 Original-Received: by mail-ot1-f42.google.com with SMTP id 89so11039618oth.13 for <37852@debbugs.gnu.org>; Mon, 21 Oct 2019 07:05:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zzrctJSXgA8nRQ52tWus5c4um4+fvDX+TUGYJPOHXmI=; b=XoZcrv/LShl/QN2tf6ho6MSdqy3L0LI+kgX78eGCx0b7hwbvLeuzmkcrF3vxhweJMn j4N1SJK7DialuPci3VW6DQm3RufnEY6v4RvRFSAH062ddxkZsmRM3GHhYvUvV2UE5G5e 1RjeFZFTVmGIHUgQaOAh7stq23GgHMqDP9QcO+hEoCaTtdP6iNI8DEQ1iwhQKzJCIlHh 6CXastPrm/ZJKy5ORAM4JDUAS8DmEPYop1QzwPbogGrR865FO1HbgypDxRfSSVmG0x1c 4o4Cq7a+GkWWf6WsGh80WU312hUhSO4/Hd9d8PQlPbvUli+Y5gs75qFWQXfoSJ1B/E2d d2/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zzrctJSXgA8nRQ52tWus5c4um4+fvDX+TUGYJPOHXmI=; b=KanZ9LGggx2cpYqzkag90JrowiCxlvI9BSDcUDCUZ2E7N+E/PMC6Yc5UNmLuN3BTZx 6DSrCaWLTbFGIwzko4TBre9dH478wWgUMYBUgp4O1nz/DWAgEGRzdRkPUBRfIrzmIXcv mbvMOPTy/q4Z5GvVarPfe2IsNaQn/T93rHM+/otuQpW58X5Stk8+KKb+wqPoYUl5seZI Vf+Oz1Wk6Sazlr9oTeLkonRybK6ALUhGzUTLL/idiOoDIy6zRnHJ0gqHs0noeTF22nPt YDkDlfX6GDCrAkDd+mJ1poe9/PbNO3MlrvUgAdo6i1Iqj5w629Ck0sEFDfOW2UkGLb9B 5y4w== X-Gm-Message-State: APjAAAU0Omzt/OeuLoZwf0VQwAlOm8jDQFWf4vTI+riBUPdwdsuo2Zkx XB4GH7oyyEv7rns+pfISjZvfQIlgJyfzQKsg9Ok= X-Google-Smtp-Source: APXvYqzgZL/HJy6MlU1ENwlEYHfpMgzzge0nTjdrSXJmSUMMfN1kUaPJ5mXhb1xm6+HeuMApNAIi+TKcXQ5wKKmgvJM= X-Received: by 2002:a05:6830:14ca:: with SMTP id t10mr1036499otq.182.1571666701846; Mon, 21 Oct 2019 07:05:01 -0700 (PDT) In-Reply-To: <83eez62pir.fsf@gnu.org> 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:169914 Archived-At: --000000000000780c4005956c2b2d Content-Type: text/plain; charset="UTF-8" On Mon, 21 Oct 2019 at 14:32, 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), > I don't know. > or is this an option you > added manually? > No, I built in a clean checkout of master, with these commands: ./autogen.sh ./configure --without-pop --without-dbus --without-gconf --without-gsettings "CFLAGS=-O2" make --000000000000780c4005956c2b2d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, 21 Oct 2019 at 14:32, Eli Zar= etskii <eliz@gnu.org> wrote:
<= /div>
> From: Richard C= opley <rcopley@gm= ail.com>
> Date: Mon, 21 Oct 2019 14:17:36 +0100
> Cc: 37852@d= ebbugs.gnu.org
>
> On Mon, 21 Oct 2019 at 14:07, Eli Zaretskii <eliz@gnu.org> wrote:
>
>=C2=A0 > From: Richard Copley <rcopley@gmail.com>
>=C2=A0 > Date: Mon, 21 Oct 2019 13:28:29 +0100
>=C2=A0 >
>=C2=A0 > Linking auxiliary executables fails with undefined referenc= es to (FORTIFY_SOURCE?) functions
>=C2=A0 > __memcpy_chk and __memmove_chk. This is apparently caused b= y some change in MSYS2,
>=C2=A0 because
>=C2=A0 > previously buildable commits now fail. Transcript below. >
>=C2=A0 Looks like FORTIFY_SOURCE requires linking against -lssp?=C2=A0 = Can you try
>=C2=A0 adding that, e.g. by
>
>=C2=A0 =C2=A0 make LIBS_SYSTEM=3D-lssp
>
> Yes, that works.

OK, thanks.

So do we need to add that library to the link command under some
conditions?=C2=A0 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),

I don't know.
=C2=A0
or is this an option you
added manually?

No, I built in a clean = checkout of master, with these commands:

./autogen= .sh
./configure --without-pop --without-dbus --without-gconf --without-g= settings "CFLAGS=3D-O2"
make

--000000000000780c4005956c2b2d--