From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 21 08:29:04 2019 Received: (at submit) by debbugs.gnu.org; 21 Oct 2019 12:29:04 +0000 Received: from localhost ([127.0.0.1]:55886 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMWo3-0002FF-MH for submit@debbugs.gnu.org; Mon, 21 Oct 2019 08:29:04 -0400 Received: from lists.gnu.org ([209.51.188.17]:60173) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMWo1-0002Eo-4i for submit@debbugs.gnu.org; Mon, 21 Oct 2019 08:29:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57603) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMWnz-0004Xi-In for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2019 08:29:00 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iMWny-0005s0-1t for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2019 08:28:59 -0400 Received: from mail-oi1-x231.google.com ([2607:f8b0:4864:20::231]:34657) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iMWnx-0005qU-SZ for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2019 08:28:57 -0400 Received: by mail-oi1-x231.google.com with SMTP id 83so10879991oii.1 for ; Mon, 21 Oct 2019 05:28:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=/tQVkgPB1L58aUch6LkcHi9mUMsh5If58jtev3topL0=; b=HxOKsgz5ZqD/7ifedJTt2q/raq2u6zPuoN3r5kHPKeYgj/D61WG7qBFwyOH0SUmEOE gePqQ2wcY60SAW117SO/sfY2h+NsixfsFs6pqT1k1IS57NNDjEy0F6SbnLIX/odZSAng DGs6RktTvklnG8bJvcu929Ca4Iv5i3fQRsyHcYJbtRcPKEf0fc7Ts04+8rTtFCALnKeV 87TU4DcdL4PDvHL4WFdX9A1Zcl45Z0WX5PTiwmnH8/+EJKjQ1JGnGyaZL92nUMtWh7VB EQDwgjJSrLdhLF1yft8QlBiofI2h7fHcSY9VglrZNMtO5fsKwvPcS/Df/VJ477mXByHu qJcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=/tQVkgPB1L58aUch6LkcHi9mUMsh5If58jtev3topL0=; b=gFYygqmCsR3xq5OmMzoLXtTkvNfdNR1jwPN+rVyGIWpJaoEwOWeAmA5hbXur/+KyUA GzjukRS1iF9zjwb4SKq0beW8O/9KooVuNbOokhWm/1th14g9pvsfI+Su82GXYwOZYf/N 7tkuXPI+UlMNAtJVPVVnDuEw/9UxpL1mse/ya/snnZQPtjMeGkaJLgIWPmHKzCC7xhMt 6bFOeOMpdOLIpcwXCVld5oSOenN88YWX8UZYIlRx9ZWiXNYMyCSKuXqfOpd3skp7g16y Yyf/ROlmnjjE2KRLx9XZe15DE7gl6xaC8vAQgIvjL8owUP4kuXFSTkhPIebtVW2RF8Ue aaHg== X-Gm-Message-State: APjAAAXIN7ubxvX7e0lrnLYg95O+60CtQ3+KFe8QKxOoi8/QNaMgYKyg FpO5DvXC8iGYgkwYGTjjXAQh5k4uWUAxSOr50LuMssPwoqo= X-Google-Smtp-Source: APXvYqxxBApqW0BA3/9B1Wbv3BiY1d6FCqJdqldEqxhPsKugkOZCxF0S9H1jFgLWguCG4udnCi0FxwmJCJUIU90xCJc= X-Received: by 2002:aca:df84:: with SMTP id w126mr19347883oig.79.1571660936397; Mon, 21 Oct 2019 05:28:56 -0700 (PDT) MIME-Version: 1.0 From: Richard Copley Date: Mon, 21 Oct 2019 13:28:29 +0100 Message-ID: Subject: Build failure on MSYS2 (undefined reference to _chk functions) To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary="000000000000d2476a05956ad380" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::231 X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --000000000000d2476a05956ad380 Content-Type: text/plain; charset="UTF-8" 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. + make V=1 -k make -C nt all make[1]: Entering directory '/c/projects/emacs/nt' make[1]: Nothing to be done for 'all'. make[1]: Leaving directory '/c/projects/emacs/nt' make -C lib all make[1]: Entering directory '/c/projects/emacs/lib' make[1]: Nothing to be done for 'all'. make[1]: Leaving directory '/c/projects/emacs/lib' make -C lib-src all make[1]: Entering directory '/c/projects/emacs/lib-src' gcc -mtune=generic -fno-common -W[...] -I. -I../src -I../lib -I. -I./../src -I./../lib -mtune=generic -DUSE_CRT_DLL=1 -I /c/projects/emacs/nt/inc -O2 emacsclient.c \ ntlib.o ../lib/libgnu.a \ -lwsock32 -lcomctl32 -o emacsclient.exe C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\buster\AppData\Local\Temp\ccVJXdYZ.o:emacsclient.c:(.text+0xb4d): undefined reference to `__memmove_chk' collect2.exe: error: ld returned 1 exit status make[1]: *** [Makefile:395: emacsclient.exe] Error 1 gcc -mtune=generic -fno-common -W[...] -I. -I../src -I../lib -I. -I./../src -I./../lib -mtune=generic -DUSE_CRT_DLL=1 -I /c/projects/emacs/nt/inc -O2 emacsclient.res -mwindows emacsclient.c \ ../lib/libgnu.a \ -lwsock32 -lcomctl32 -o emacsclientw.exe C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\buster\AppData\Local\Temp\ccSZs6xf.o:emacsclient.c:(.text+0xb4d): undefined reference to `__memmove_chk' collect2.exe: error: ld returned 1 exit status make[1]: *** [Makefile:400: emacsclientw.exe] Error 1 gcc -mtune=generic -fno-common -W[...] -I. -I../src -I../lib -I. -I./../src -I./../lib -mtune=generic -DUSE_CRT_DLL=1 -I /c/projects/emacs/nt/inc -O2 make-docfile.c ntlib.o ../lib/libgnu.a -o make-docfile.exe C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\buster\AppData\Local\Temp\ccHhbMkg.o:make-docfile.c:(.text+0x166a): undefined reference to `__memcpy_chk' collect2.exe: error: ld returned 1 exit status make[1]: *** [Makefile:382: make-docfile.exe] Error 1 make[1]: Target 'all' not remade because of errors. make[1]: Leaving directory '/c/projects/emacs/lib-src' make: *** [Makefile:411: lib-src] Error 2 make info-real info-dir make[1]: Entering directory '/c/projects/emacs' make -C doc/lispref info make[2]: Entering directory '/c/projects/emacs/doc/lispref' make[2]: Nothing to be done for 'info'. make[2]: Leaving directory '/c/projects/emacs/doc/lispref' make -C doc/lispintro info make[2]: Entering directory '/c/projects/emacs/doc/lispintro' make[2]: Nothing to be done for 'info'. make[2]: Leaving directory '/c/projects/emacs/doc/lispintro' make -C doc/emacs info make[2]: Entering directory '/c/projects/emacs/doc/emacs' make[2]: Nothing to be done for 'info'. make[2]: Leaving directory '/c/projects/emacs/doc/emacs' make -C doc/misc info make[2]: Entering directory '/c/projects/emacs/doc/misc' make[2]: Nothing to be done for 'info'. make[2]: Leaving directory '/c/projects/emacs/doc/misc' make[1]: Nothing to be done for 'info-dir'. make[1]: Leaving directory '/c/projects/emacs' make: Target 'all' not remade because of errors. --000000000000d2476a05956ad380 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Linking auxiliary executables fails with undefined r= eferences to (FORTIFY_SOURCE?) functions=C2=A0 __memcpy_chk and __memmove_c= hk.=20 This is apparently caused by some change in MSYS2, because previously build= able commits now fail. Transcript below.

+ make V= =3D1 -k
make -C nt all
make[1]: Entering directory '/c/projects/e= macs/nt'
make[1]: Nothing to be done for 'all'.
make[1]: = Leaving directory '/c/projects/emacs/nt'
make -C lib all
make= [1]: Entering directory '/c/projects/emacs/lib'
make[1]: Nothing= to be done for 'all'.
make[1]: Leaving directory '/c/projec= ts/emacs/lib'
make -C lib-src all
make[1]: Entering directory = 9;/c/projects/emacs/lib-src'
gcc =C2=A0-mtune=3Dgeneric =C2=A0-fno-c= ommon -W[...] =C2=A0-I. -I../src -I../lib -I. -I./../src -I./../lib =C2=A0 = -mtune=3Dgeneric =C2=A0 -DUSE_CRT_DLL=3D1 -I /c/projects/emacs/nt/inc -O2 e= macsclient.c \
=C2=A0 =C2=A0ntlib.o ../lib/libgnu.a =C2=A0\
=C2=A0 = =C2=A0-lwsock32 =C2=A0-lcomctl32 -o emacsclient.exe
C:/msys64/mingw64/bi= n/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld= .exe: C:\Users\buster\AppData\Local\Temp\ccVJXdYZ.o:emacsclient.c:(.text+0x= b4d): undefined reference to `__memmove_chk'
collect2.exe: error: ld= returned 1 exit status
make[1]: *** [Makefile:395: emacsclient.exe] Err= or 1
gcc =C2=A0-mtune=3Dgeneric =C2=A0-fno-common -W[...] =C2=A0-I. -I..= /src -I../lib -I. -I./../src -I./../lib =C2=A0 -mtune=3Dgeneric =C2=A0 -DUS= E_CRT_DLL=3D1 -I /c/projects/emacs/nt/inc -O2 emacsclient.res -mwindows ema= csclient.c \
=C2=A0 =C2=A0../lib/libgnu.a =C2=A0\
=C2=A0 =C2=A0-lwsoc= k32 =C2=A0-lcomctl32 -o emacsclientw.exe
C:/msys64/mingw64/bin/../lib/gc= c/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Us= ers\buster\AppData\Local\Temp\ccSZs6xf.o:emacsclient.c:(.text+0xb4d): undef= ined reference to `__memmove_chk'
collect2.exe: error: ld returned 1= exit status
make[1]: *** [Makefile:400: emacsclientw.exe] Error 1
gc= c =C2=A0-mtune=3Dgeneric =C2=A0-fno-common -W[...] =C2=A0-I. -I../src -I../= lib -I. -I./../src -I./../lib =C2=A0 -mtune=3Dgeneric =C2=A0 -DUSE_CRT_DLL= =3D1 -I /c/projects/emacs/nt/inc -O2 make-docfile.c ntlib.o ../lib/libgnu.a= =C2=A0-o make-docfile.exe
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-m= ingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\buster\App= Data\Local\Temp\ccHhbMkg.o:make-docfile.c:(.text+0x166a): undefined referen= ce to `__memcpy_chk'
collect2.exe: error: ld returned 1 exit status<= br>make[1]: *** [Makefile:382: make-docfile.exe] Error 1
make[1]: Target= 'all' not remade because of errors.
make[1]: Leaving directory = '/c/projects/emacs/lib-src'
make: *** [Makefile:411: lib-src] Er= ror 2
make info-real info-dir
make[1]: Entering directory '/c/pro= jects/emacs'
make -C doc/lispref info
make[2]: Entering directory= '/c/projects/emacs/doc/lispref'
make[2]: Nothing to be done for= 'info'.
make[2]: Leaving directory '/c/projects/emacs/doc/l= ispref'
make -C doc/lispintro info
make[2]: Entering directory &#= 39;/c/projects/emacs/doc/lispintro'
make[2]: Nothing to be done for = 'info'.
make[2]: Leaving directory '/c/projects/emacs/doc/li= spintro'
make -C doc/emacs info
make[2]: Entering directory '= /c/projects/emacs/doc/emacs'
make[2]: Nothing to be done for 'in= fo'.
make[2]: Leaving directory '/c/projects/emacs/doc/emacs'= ;
make -C doc/misc info
make[2]: Entering directory '/c/projects/= emacs/doc/misc'
make[2]: Nothing to be done for 'info'.
m= ake[2]: Leaving directory '/c/projects/emacs/doc/misc'
make[1]: = Nothing to be done for 'info-dir'.
make[1]: Leaving directory &#= 39;/c/projects/emacs'
make: Target 'all' not remade bec= ause of errors.

--000000000000d2476a05956ad380-- From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 21 09:07:48 2019 Received: (at 37852) by debbugs.gnu.org; 21 Oct 2019 13:07:48 +0000 Received: from localhost ([127.0.0.1]:55928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMXPX-0005Hy-VP for submit@debbugs.gnu.org; Mon, 21 Oct 2019 09:07:48 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53040) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMXPW-0005Hl-Fr for 37852@debbugs.gnu.org; Mon, 21 Oct 2019 09:07:46 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37053) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iMXPR-0001gx-Bh; Mon, 21 Oct 2019 09:07:41 -0400 Received: from [176.228.60.248] (port=4347 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iMXPQ-00088u-SH; Mon, 21 Oct 2019 09:07:41 -0400 Date: Mon, 21 Oct 2019 16:07:34 +0300 Message-Id: <83k18y2qnd.fsf@gnu.org> From: Eli Zaretskii To: Richard Copley In-reply-to: (message from Richard Copley on Mon, 21 Oct 2019 13:28:29 +0100) Subject: Re: bug#37852: Build failure on MSYS2 (undefined reference to _chk functions) References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37852 Cc: 37852@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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 From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 21 09:18:13 2019 Received: (at 37852) by debbugs.gnu.org; 21 Oct 2019 13:18:13 +0000 Received: from localhost ([127.0.0.1]:55945 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMXZb-0005YV-Vk for submit@debbugs.gnu.org; Mon, 21 Oct 2019 09:18:13 -0400 Received: from mail-ot1-f45.google.com ([209.85.210.45]:34024) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMXZZ-0005YI-U8 for 37852@debbugs.gnu.org; Mon, 21 Oct 2019 09:18:10 -0400 Received: by mail-ot1-f45.google.com with SMTP id m19so10967895otp.1 for <37852@debbugs.gnu.org>; Mon, 21 Oct 2019 06:18:09 -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=psRfX/G/4462EcgA055uQa+Lf37tXSAA5+o+7s/u+TY=; b=DlDgn34qOsb1z5dNFGt0WRTRa0OUSzz6j3tGloiNkql5jMhEjGKxEtCOkkhoAapSpw 4b+lHB6LxKq3RwIECPGM+WSjsRmyKmmVJ3oBoiBJv5qaxUkqO6pqvAhYAwT9juKa8PAP Bz7FMjWpIvscqefNuLebP7uuzmiMkF2yT0RMcTJao9q/VEm7+jQ2+R9xW184VHG2fvaL Kj6hutUX6PQ9AXrc2vB4U1ZTmjL6aKhcLzRvIBcXvsRzZqY13Q6qG7WAAfbdabS6ILYk y5ISQV9t+h3cFr/APUotMV4ytJYX7ZC+qthJ+rVJ7OPGQMnYimmWxbYY6lhaw5Z+Wkle Jryw== 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=psRfX/G/4462EcgA055uQa+Lf37tXSAA5+o+7s/u+TY=; b=GPXkB/L9YYS4cTQ24ITYgic4VJ3ukO2SRxFwClBlxtC5OT/IOhdDG/SmgMPf8/F0Gd fCg52AUoOZt69IfNH8WeGiOErqomPO+ReS+R+lakXR2VPcwf0OqOcj3oobcQOrQ3ebR9 KwHWKDg6/Jdjw4iSI8lw6IdZHxZ90ySP5unfQuDDzsMVBQQpL0DvjTEFdl00jBF61Qqc uUm3/BsoQPrwXLgQzDPKWJaprfHTWhNsBFoGPiaTcZcs7xlYJiThvN6+eJajJY+M8ljY PyEOvPYqLCntqhRw4TdzDO3CMrtFc2knLC3yN6E6JRwtFkBX8WqWSYcFBLcILfT2H2Qx c3ig== X-Gm-Message-State: APjAAAU3Yr4lSkH8C+aI8UanTonmQ/SPJBgQqfHUJSMMgA/CxEwTE3Dy hRJXhvamLN5t7wnbk5D+82vnofHZH4N2RbdoOl0= X-Google-Smtp-Source: APXvYqxnq1Kz8CLbIQD3c0nzebu00klN6Kp0E4sKVPWAABfQEhF5a7pIs/U8yxz4W5of5bf/wPTCd0FbIaxEkWDCUe0= X-Received: by 2002:a9d:5c15:: with SMTP id o21mr9698820otk.115.1571663884255; Mon, 21 Oct 2019 06:18:04 -0700 (PDT) MIME-Version: 1.0 References: <83k18y2qnd.fsf@gnu.org> In-Reply-To: <83k18y2qnd.fsf@gnu.org> From: Richard Copley Date: Mon, 21 Oct 2019 14:17:36 +0100 Message-ID: Subject: Re: bug#37852: Build failure on MSYS2 (undefined reference to _chk functions) To: Eli Zaretskii Content-Type: multipart/alternative; boundary="0000000000008705c705956b833f" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37852 Cc: 37852@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --0000000000008705c705956b833f Content-Type: text/plain; charset="UTF-8" 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. --0000000000008705c705956b833f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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 (FORT= IFY_SOURCE?) functions
> __memcpy_chk and __memmove_chk. This is apparently caused by some chan= ge in MSYS2, because
> previously buildable commits now fail. Transcript below.

Looks like FORTIFY_SOURCE requires linking against -lssp?=C2=A0 Can you try=
adding that, e.g. by

=C2=A0 make LIBS_SYSTEM=3D-lssp

Yes, th= at works.

--0000000000008705c705956b833f-- From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 21 09:32:11 2019 Received: (at 37852) by debbugs.gnu.org; 21 Oct 2019 13:32:11 +0000 Received: from localhost ([127.0.0.1]:55961 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMXn9-0005vg-E9 for submit@debbugs.gnu.org; Mon, 21 Oct 2019 09:32:11 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58488) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMXn7-0005vS-0N for 37852@debbugs.gnu.org; Mon, 21 Oct 2019 09:32:10 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37440) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iMXn1-0005Vx-6H; Mon, 21 Oct 2019 09:32:03 -0400 Received: from [176.228.60.248] (port=1869 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iMXn0-0001ug-CQ; Mon, 21 Oct 2019 09:32:02 -0400 Date: Mon, 21 Oct 2019 16:31:56 +0300 Message-Id: <83eez62pir.fsf@gnu.org> From: Eli Zaretskii To: Richard Copley In-reply-to: (message from Richard Copley on Mon, 21 Oct 2019 14:17:36 +0100) Subject: Re: bug#37852: Build failure on MSYS2 (undefined reference to _chk functions) References: <83k18y2qnd.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37852 Cc: 37852@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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? From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 21 10:05:09 2019 Received: (at 37852) by debbugs.gnu.org; 21 Oct 2019 14:05:09 +0000 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 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 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) MIME-Version: 1.0 References: <83k18y2qnd.fsf@gnu.org> <83eez62pir.fsf@gnu.org> In-Reply-To: <83eez62pir.fsf@gnu.org> From: Richard Copley Date: Mon, 21 Oct 2019 15:04:34 +0100 Message-ID: Subject: Re: bug#37852: Build failure on MSYS2 (undefined reference to _chk functions) To: Eli Zaretskii Content-Type: multipart/alternative; boundary="000000000000780c4005956c2b2d" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37852 Cc: 37852@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --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-- From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 21 12:01:36 2019 Received: (at 37852) by debbugs.gnu.org; 21 Oct 2019 16:01:36 +0000 Received: from localhost ([127.0.0.1]:57664 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMa7k-00040b-2q for submit@debbugs.gnu.org; Mon, 21 Oct 2019 12:01:36 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52888) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMa7g-00040I-Ko for 37852@debbugs.gnu.org; Mon, 21 Oct 2019 12:01:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40251) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iMa7b-0002IO-Ez; Mon, 21 Oct 2019 12:01:27 -0400 Received: from [176.228.60.248] (port=3035 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iMa7a-0006ir-Lp; Mon, 21 Oct 2019 12:01:27 -0400 Date: Mon, 21 Oct 2019 19:01:20 +0300 Message-Id: <837e4y2ilr.fsf@gnu.org> From: Eli Zaretskii To: Richard Copley In-reply-to: (message from Richard Copley on Mon, 21 Oct 2019 15:04:34 +0100) Subject: Re: bug#37852: Build failure on MSYS2 (undefined reference to _chk functions) References: <83k18y2qnd.fsf@gnu.org> <83eez62pir.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37852 Cc: 37852@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Richard Copley > Date: Mon, 21 Oct 2019 15:04:34 +0100 > Cc: 37852@debbugs.gnu.org > > 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 Hmm... okay, could you please grep Makefiles in lib-src/ and src/, and see if FORTIFY_SOURCE appears in any of them? If not, I guess the references to those _chk functions are coming from some libraries linked into the programs we compile, and that probably means we need to use -lssp for MinGW just in case? Possibly relevant discussion: https://github.com/msys2/MINGW-packages/issues/5803 From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 21 12:05:55 2019 Received: (at submit) by debbugs.gnu.org; 21 Oct 2019 16:05:55 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, KHOP_HELO_FCRDNS,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=disabled version=3.3.2 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 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 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/ To: bug-gnu-emacs@gnu.org From: Andy Moreton Subject: Re: 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 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt) Cancel-Lock: sha1:cSEP7s/2bjJcy5OzsxVa4exT5yQ= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-Spam-Score: -0.8 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.8 (-) 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 From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 21 12:36:39 2019 Received: (at 37852) by debbugs.gnu.org; 21 Oct 2019 16:36:39 +0000 Received: from localhost ([127.0.0.1]:57728 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMafa-00076e-DY for submit@debbugs.gnu.org; Mon, 21 Oct 2019 12:36:38 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57837) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMafV-00076L-F0 for 37852@debbugs.gnu.org; Mon, 21 Oct 2019 12:36:33 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40998) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iMafQ-0003p2-8g; Mon, 21 Oct 2019 12:36:24 -0400 Received: from [176.228.60.248] (port=1204 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iMafP-0002Dl-Lh; Mon, 21 Oct 2019 12:36:24 -0400 Date: Mon, 21 Oct 2019 19:36:17 +0300 Message-Id: <83wocy12f2.fsf@gnu.org> From: Eli Zaretskii To: Andy Moreton In-reply-to: (message from Andy Moreton on Mon, 21 Oct 2019 17:05:35 +0100) Subject: Re: bug#37852: Build failure on MSYS2 (undefined reference to _chk functions) References: <83k18y2qnd.fsf@gnu.org> <83eez62pir.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37852 Cc: 37852@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Andy Moreton > Date: Mon, 21 Oct 2019 17:05:35 +0100 > > > 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. Thanks, I indeed missed that. > Building with -D_FORTIFY_SOURCE=0 also works, but your suggestion to add > the missing library is a better workaround than disabling the checks. The problem with using -lssp unconditionally is that some installations might not have it, and then the linker will barf. So I think we should better disable GNULIB_PORTCHECK on MinGW (I can hardly imagine someone using that platform for those portability checks, and I'm not sure I understand why this gets defined by default on other platforms). From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 21 12:56:06 2019 Received: (at 37852) by debbugs.gnu.org; 21 Oct 2019 16:56:06 +0000 Received: from localhost ([127.0.0.1]:57744 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMayU-0007bE-4q for submit@debbugs.gnu.org; Mon, 21 Oct 2019 12:56:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60267) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMayP-0007ah-T1 for 37852@debbugs.gnu.org; Mon, 21 Oct 2019 12:56:04 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41357) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iMayK-0000wH-Cv; Mon, 21 Oct 2019 12:55:56 -0400 Received: from [176.228.60.248] (port=2489 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iMayJ-0003xH-P5; Mon, 21 Oct 2019 12:55:56 -0400 Date: Mon, 21 Oct 2019 19:55:49 +0300 Message-Id: <83sgnm11ii.fsf@gnu.org> From: Eli Zaretskii To: andrewjmoreton@gmail.com In-reply-to: <83wocy12f2.fsf@gnu.org> (message from Eli Zaretskii on Mon, 21 Oct 2019 19:36:17 +0300) Subject: Re: bug#37852: Build failure on MSYS2 (undefined reference to _chk functions) References: <83k18y2qnd.fsf@gnu.org> <83eez62pir.fsf@gnu.org> <83wocy12f2.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37852 Cc: 37852@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Mon, 21 Oct 2019 19:36:17 +0300 > From: Eli Zaretskii > Cc: 37852@debbugs.gnu.org > > > See GNULIB_PORTCHECK_FORTIFY_SOURCE in configure.ac - the relevant macro > > is _FORTIFY_SOURCE. > > Thanks, I indeed missed that. > > > Building with -D_FORTIFY_SOURCE=0 also works, but your suggestion to add > > the missing library is a better workaround than disabling the checks. Btw, this sounds like a bug in MinGW64 headers: they shouldn't generate references to the _chk functions without making sure, e.g. via specs or somesuch, that libssp is linked against. It's worth reporting to the MSYS2 folks, I think. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 21 20:40:24 2019 Received: (at 37852) by debbugs.gnu.org; 22 Oct 2019 00:40:24 +0000 Received: from localhost ([127.0.0.1]:58060 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMiDo-0001y8-E4 for submit@debbugs.gnu.org; Mon, 21 Oct 2019 20:40:24 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:56092) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMiDk-0001xr-TN for 37852@debbugs.gnu.org; Mon, 21 Oct 2019 20:40:23 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 21A54160619; Mon, 21 Oct 2019 17:40:15 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id nwQx0bfqJZRT; Mon, 21 Oct 2019 17:40:12 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 55467160635; Mon, 21 Oct 2019 17:40:12 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id TG6fSWRhlL1T; Mon, 21 Oct 2019 17:40:12 -0700 (PDT) Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 36104160619; Mon, 21 Oct 2019 17:40:12 -0700 (PDT) To: Eli Zaretskii From: Paul Eggert Subject: Re: bug#37852: Build failure on MSYS2 (undefined reference to _chk functions) Organization: UCLA Computer Science Department Message-ID: Date: Mon, 21 Oct 2019 17:40:12 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------7395C89D8EC09883C8C030CC" Content-Language: en-US X-Spam-Score: 1.1 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > I think we should better disable GNULIB_PORTCHECK on MinGW (I can hardly > imagine someone using that platform for those portability checks, and > I'm not sure I understand why this gets defined by [...] Content analysis details: (1.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: configure.ac] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [131.179.128.68 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 3.4 FAKE_REPLY_A1 No description available. X-Debbugs-Envelope-To: 37852 Cc: Richard Copley , 37852@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.1 (/) This is a multi-part message in MIME format. --------------7395C89D8EC09883C8C030CC Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit > I think we should better disable GNULIB_PORTCHECK on MinGW (I can hardly > imagine someone using that platform for those portability checks, and > I'm not sure I understand why this gets defined by default on other > platforms). The intent of GNULIB_PORTCHECK is that it is enabled by developers who want some simple build-time portability tests. It isn't suitable for people who just want to build the software, as there are too many build failures and other false alarms that builders don't care about. I installed the attached patch, to cause the problem to occur only if one configures explicitly with --enable-gcc-warnings. This should fix the problem that Richard reported. However, it won't fix the more general problem (which Richard should be able to reproduce via './configure --enable-gcc-warnings ...'). Apparently MSYS2 changed recently, and this caused _FORTIFY_SOURCE builds to fail. See, for example: https://github.com/msys2/MINGW-packages/issues/5803 I don't understand MSYS2 well enough to suggest fixes for Emacs, other than "don't configure with --enable-gcc-warnings and don't compile with _FORTIFY_SOURCE defined". --------------7395C89D8EC09883C8C030CC Content-Type: text/x-patch; charset=UTF-8; name="0001-Portcheck-only-if-enable-gcc-warnings.patch" Content-Disposition: attachment; filename="0001-Portcheck-only-if-enable-gcc-warnings.patch" Content-Transfer-Encoding: quoted-printable >From 0ccd70a99b5cbd3cf7fea65c47a724846c578a43 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 21 Oct 2019 17:28:02 -0700 Subject: [PATCH] Portcheck only if --enable-gcc-warnings MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit Problem reported by Richard Copley (Bug#37852). This patch causes the problem to not occur if one uses plain =E2=80=98configure=E2=80=99. The problem can still occur if with =E2=80=98= configure --enable-gcc-warnings=E2=80=99, so a further fix may be needed. * configure.ac (GNULIB_PORTCHECK, _FORTIFY_SOURCE): Define these only with an explicit --enable-gcc-warnings. --- configure.ac | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 33d725c804..3b6a2a6d16 100644 --- a/configure.ac +++ b/configure.ac @@ -1114,15 +1114,16 @@ AC_DEFUN fi =20 AC_DEFINE([GCC_LINT], [1], [Define to 1 if --enable-gcc-warnings.]) - AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability che= cks]) - AH_VERBATIM([GNULIB_PORTCHECK_FORTIFY_SOURCE], - [/* Enable compile-time and run-time bounds-checking, and some warning= s, - without upsetting glibc 2.15+. */ - #if (defined GNULIB_PORTCHECK && !defined _FORTIFY_SOURCE \ - && defined __OPTIMIZE__ && __OPTIMIZE__) - # define _FORTIFY_SOURCE 2 - #endif - ]) + AS_IF([test $gl_gcc_warnings =3D yes], + [AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability = checks]) + AH_VERBATIM([GNULIB_PORTCHECK_FORTIFY_SOURCE], + [/* Enable compile-time and run-time bounds-checking, and some warn= ings, + without upsetting glibc 2.15+. */ + #if (defined GNULIB_PORTCHECK && !defined _FORTIFY_SOURCE \ + && defined __OPTIMIZE__ && __OPTIMIZE__) + # define _FORTIFY_SOURCE 2 + #endif + ])]) ]) =20 # clang is picky about these regardless of whether --=20 2.21.0 --------------7395C89D8EC09883C8C030CC-- From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 21 22:38:06 2019 Received: (at 37852) by debbugs.gnu.org; 22 Oct 2019 02:38:06 +0000 Received: from localhost ([127.0.0.1]:58118 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMk3h-0006zu-PS for submit@debbugs.gnu.org; Mon, 21 Oct 2019 22:38:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34746) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMk3f-0006zT-Ox for 37852@debbugs.gnu.org; Mon, 21 Oct 2019 22:38:04 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48902) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iMk3Z-00033E-Ui; Mon, 21 Oct 2019 22:37:57 -0400 Received: from [176.228.60.248] (port=2085 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iMk3Z-00088k-4p; Mon, 21 Oct 2019 22:37:57 -0400 Date: Tue, 22 Oct 2019 05:37:53 +0300 Message-Id: <83h8411p4u.fsf@gnu.org> From: Eli Zaretskii To: Paul Eggert In-reply-to: (message from Paul Eggert on Mon, 21 Oct 2019 17:40:12 -0700) Subject: Re: bug#37852: Build failure on MSYS2 (undefined reference to _chk functions) References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37852 Cc: rcopley@gmail.com, 37852@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 37852@debbugs.gnu.org, Richard Copley > From: Paul Eggert > Date: Mon, 21 Oct 2019 17:40:12 -0700 > > I installed the attached patch, to cause the problem to occur only if > one configures explicitly with --enable-gcc-warnings. This should fix > the problem that Richard reported. Thanks. > I don't understand MSYS2 well enough to suggest fixes for Emacs, other > than "don't configure with --enable-gcc-warnings and don't compile with > _FORTIFY_SOURCE defined". Should we perhaps test for -lssp, and if it is found, add it to the link command when we define _FORTIFY_SOURCE? From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 22 14:27:58 2019 Received: (at 37852) by debbugs.gnu.org; 22 Oct 2019 18:27:59 +0000 Received: from localhost ([127.0.0.1]:60475 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMysw-0002Hu-KQ for submit@debbugs.gnu.org; Tue, 22 Oct 2019 14:27:58 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:35648) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMysu-0002HU-Ql for 37852@debbugs.gnu.org; Tue, 22 Oct 2019 14:27:57 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 3119B160597; Tue, 22 Oct 2019 11:27:51 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id VoiXZ9b3siUh; Tue, 22 Oct 2019 11:27:50 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 5E277160653; Tue, 22 Oct 2019 11:27:50 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id o6-5G4HrMvIL; Tue, 22 Oct 2019 11:27:50 -0700 (PDT) Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 41E29160597; Tue, 22 Oct 2019 11:27:50 -0700 (PDT) Subject: Re: bug#37852: Build failure on MSYS2 (undefined reference to _chk functions) To: Eli Zaretskii References: <83h8411p4u.fsf@gnu.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: Date: Tue, 22 Oct 2019 11:27:48 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 MIME-Version: 1.0 In-Reply-To: <83h8411p4u.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37852 Cc: rcopley@gmail.com, 37852@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 10/21/19 7:37 PM, Eli Zaretskii wrote: >> I don't understand MSYS2 well enough to suggest fixes for Emacs, other >> than "don't configure with --enable-gcc-warnings and don't compile with >> _FORTIFY_SOURCE defined". > > Should we perhaps test for -lssp, and if it is found, add it to the > link command when we define _FORTIFY_SOURCE? If this is done only on MSYS2 platforms, and if -lssp is used only when it causes otherwise-failing programs to work, then it should be OK. I wouldn't do it elsewhere because on Fedora at any rate, -lssp used to be trouble and was best avoided. It vaguely sounds like MSYS2 is trailing Fedora and so is experiencing problems Fedora had a few years ago (see, e.g., ). From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 22 14:51:14 2019 Received: (at 37852) by debbugs.gnu.org; 22 Oct 2019 18:51:14 +0000 Received: from localhost ([127.0.0.1]:60492 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMzFS-0002rw-CI for submit@debbugs.gnu.org; Tue, 22 Oct 2019 14:51:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52198) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMzFP-0002rg-FM for 37852@debbugs.gnu.org; Tue, 22 Oct 2019 14:51:12 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:35245) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iMzFJ-0003ea-Qw; Tue, 22 Oct 2019 14:51:05 -0400 Received: from [176.228.60.248] (port=1896 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iMzFJ-0000Ci-6V; Tue, 22 Oct 2019 14:51:05 -0400 Date: Tue, 22 Oct 2019 21:51:00 +0300 Message-Id: <83o8y8zka3.fsf@gnu.org> From: Eli Zaretskii To: Paul Eggert In-reply-to: (message from Paul Eggert on Tue, 22 Oct 2019 11:27:48 -0700) Subject: Re: bug#37852: Build failure on MSYS2 (undefined reference to _chk functions) References: <83h8411p4u.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37852 Cc: rcopley@gmail.com, 37852@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 37852@debbugs.gnu.org, rcopley@gmail.com > From: Paul Eggert > Date: Tue, 22 Oct 2019 11:27:48 -0700 > > > Should we perhaps test for -lssp, and if it is found, add it to the > > link command when we define _FORTIFY_SOURCE? > > If this is done only on MSYS2 platforms, and if -lssp is used only when > it causes otherwise-failing programs to work, then it should be OK. I > wouldn't do it elsewhere because on Fedora at any rate, -lssp used to be > trouble and was best avoided. Right. > It vaguely sounds like MSYS2 is trailing Fedora and so is experiencing > problems Fedora had a few years ago (see, e.g., > ). I actually think it's a bug in MSYS2, and hope they will fix it soon. So perhaps we should just wait and see if the current situation, after your patch, is good enough. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 23 17:29:47 2019 Received: (at 37852) by debbugs.gnu.org; 23 Oct 2019 21:29:47 +0000 Received: from localhost ([127.0.0.1]:35090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iNOCO-0007JO-Ip for submit@debbugs.gnu.org; Wed, 23 Oct 2019 17:29:47 -0400 Received: from mail-oi1-f169.google.com ([209.85.167.169]:44253) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iNOCL-0007J7-8K for 37852@debbugs.gnu.org; Wed, 23 Oct 2019 17:29:42 -0400 Received: by mail-oi1-f169.google.com with SMTP id s71so5866865oih.11 for <37852@debbugs.gnu.org>; Wed, 23 Oct 2019 14:29:41 -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=aJZSXPkPBrerU9YvHH5eLB6iBr2nTZAdAqdm4omIRbU=; b=WrqMb9EIMs6skDKKViwxd+jLWMDcgcfhGdmkf2RyQJcdXqc4+poiOqYHMOMbrMZ6sF ca33jBxm9fHX8Ibzaa1xr9aAzhVKs5j1p6+2AD3SNSVoDrPk2Yu911ZrnA/c/MlFjpPu ZIE9HZtr8zWE88IKVZUkBEjmYytpI0wD7TQa+/6an04CgXOdMgKCjjE1x512e6zQswq5 Noy4iSojs/AtaBl8kwPuWGE9UFQMuSol1wVt3H2XmW5CxHNHOk4HHqp/Li8H5YFblpQl y0nQX1Ns6USBkPljJizYfqKxICJ2qWG8t6irkYlGzOiU3Jjxq+x5D6mZsuScM5WNnkW6 uIVQ== 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=aJZSXPkPBrerU9YvHH5eLB6iBr2nTZAdAqdm4omIRbU=; b=pCUcoR1sW9cF9VjauCg7yRSA6uOtv4/wILoU/oihqc410uVPFf6Zh16imfGUTPmoRB /L3TDYdS2NBfZFfFofKL5D8pDAVrpRcrG1RlpH/5SbIGKMkkP8PJtbzZM/w10hEdW7yY v1iVhQyuRiG8anWaSS/9MJDz9iQGCbCfiGCjO7E2+wGAksqkZV3tOH6pey84cKyHLHTe Ogj6r/vS0fU2+HzsL19inRd05vP922AqtuWIgdGQRAMPuIYk56mHCtUvXVpAGTKseQGu UAfJGJPGRr4zX23zjBWV3VUXITogC5q6ZmmcfQp0neY3HFOI8YMS99JbiM3DBlPsvWj/ sk2w== X-Gm-Message-State: APjAAAXOJM7SEXtCcEzVGUJedd2zBZNAdUY8K0s5mu13akv6JmH7Fcrt kBoIHMjcYNb7kF6lBYTdz8Dw9fMmMGe/gNRfmbA= X-Google-Smtp-Source: APXvYqw25zDla8XdMi0O3CyeiJ5jBmJi+94lHkZ2UTXMPXqCsrkAbIQPHi1UJxPYvSyXLPX1cO6cXVDlFOVDPx58yr8= X-Received: by 2002:aca:df84:: with SMTP id w126mr1771222oig.79.1571866175485; Wed, 23 Oct 2019 14:29:35 -0700 (PDT) MIME-Version: 1.0 References: <83h8411p4u.fsf@gnu.org> <83o8y8zka3.fsf@gnu.org> In-Reply-To: <83o8y8zka3.fsf@gnu.org> From: Richard Copley Date: Wed, 23 Oct 2019 22:29:09 +0100 Message-ID: Subject: Re: bug#37852: Build failure on MSYS2 (undefined reference to _chk functions) To: Eli Zaretskii Content-Type: multipart/alternative; boundary="000000000000063d4705959a9dd4" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37852 Cc: Paul Eggert , 37852@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000063d4705959a9dd4 Content-Type: text/plain; charset="UTF-8" On Tue, 22 Oct 2019 at 19:51, Eli Zaretskii wrote: > > Cc: 37852@debbugs.gnu.org, rcopley@gmail.com > > From: Paul Eggert > > Date: Tue, 22 Oct 2019 11:27:48 -0700 > > > > > Should we perhaps test for -lssp, and if it is found, add it to the > > > link command when we define _FORTIFY_SOURCE? > > > > If this is done only on MSYS2 platforms, and if -lssp is used only when > > it causes otherwise-failing programs to work, then it should be OK. I > > wouldn't do it elsewhere because on Fedora at any rate, -lssp used to be > > trouble and was best avoided. > > Right. > > > It vaguely sounds like MSYS2 is trailing Fedora and so is experiencing > > problems Fedora had a few years ago (see, e.g., > > ). > > I actually think it's a bug in MSYS2, and hope they will fix it soon. > So perhaps we should just wait and see if the current situation, after > your patch, is good enough. > > Thanks. > Just to confirm, this fix works for me. Thank you. --000000000000063d4705959a9dd4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, 22 Oct 2019 at 19:51, Eli Zaretskii <eliz@gnu.org> wrote:
> Cc: 37852@debbugs.gnu.org, rcopley@gmail.com
> From: Paul Eggert <eggert@cs.ucla.edu>
> Date: Tue, 22 Oct 2019 11:27:48 -0700
>
> > Should we perhaps test for -lssp, and if it is found, add it to t= he
> > link command when we define _FORTIFY_SOURCE?
>
> If this is done only on MSYS2 platforms, and if -lssp is used only whe= n
> it causes otherwise-failing programs to work, then it should be OK. I =
> wouldn't do it elsewhere because on Fedora at any rate, -lssp used= to be
> trouble and was best avoided.

Right.

> It vaguely sounds like MSYS2 is trailing Fedora and so is experiencing=
> problems Fedora had a few years ago (see, e.g.,
> <https://cve.mitre.org/cgi-bin= /cvename.cgi?name=3DCVE-2016-4973>).

I actually think it's a bug in MSYS2, and hope they will fix it soon. So perhaps we should just wait and see if the current situation, after
your patch, is good enough.

Thanks.

Just to confirm, this fix works= for me. Thank you.

--000000000000063d4705959a9dd4-- From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 24 09:50:48 2019 Received: (at 37852-done) by debbugs.gnu.org; 24 Oct 2019 13:50:48 +0000 Received: from localhost ([127.0.0.1]:35508 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iNdVo-0005oH-Gk for submit@debbugs.gnu.org; Thu, 24 Oct 2019 09:50:48 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51309) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iNdVn-0005o4-1Y for 37852-done@debbugs.gnu.org; Thu, 24 Oct 2019 09:50:47 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45878) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iNdVh-0000gk-OM; Thu, 24 Oct 2019 09:50:41 -0400 Received: from [176.228.60.248] (port=3654 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iNdVg-0004k7-Mz; Thu, 24 Oct 2019 09:50:41 -0400 Date: Thu, 24 Oct 2019 16:50:25 +0300 Message-Id: <83mudqxnfi.fsf@gnu.org> From: Eli Zaretskii To: Richard Copley In-reply-to: (message from Richard Copley on Wed, 23 Oct 2019 22:29:09 +0100) Subject: Re: bug#37852: Build failure on MSYS2 (undefined reference to _chk functions) References: <83h8411p4u.fsf@gnu.org> <83o8y8zka3.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37852-done Cc: eggert@cs.ucla.edu, 37852-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Richard Copley > Date: Wed, 23 Oct 2019 22:29:09 +0100 > Cc: Paul Eggert , 37852@debbugs.gnu.org > > Just to confirm, this fix works for me. Thank you. Thanks, closing. From unknown Fri Jun 20 07:27:26 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 22 Nov 2019 12:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator