MINGW-packages: Something broke - undefined reference to `__memcpy_chk'

Sometime this afternoon builds broke that earlier today were fine. All are using the gcc toolchain. below is grab of the packages that were updated with the builds:

undefined reference to `__memcpy_chk'

All packages are mingw-w64-x86_64

Good build earlier today

binutils-2.32-3
headers-git-7.0.0.5524.2346384e-1
crt-git-7.0.0.5524.2346384e-1
libwinpthread-git-7.0.0.5522.977a9720-1
gcc-libs-9.2.0-2
winpthreads-git-7.0.0.5522.977a9720-1
gcc-9.2.0-2
gcc-ada-9.2.0-2
gcc-libgfortran-9.2.0-2
gcc-fortran-9.2.0-2
gcc-objc-9.2.0-2
gdb-8.3.1-1


Bad build today

binutils-2.33.1-1
headers-git-7.0.0.5546.d200317d-1
crt-git-7.0.0.5546.d200317d-1
libwinpthread-git-7.0.0.5544.15da3ce2-1
gcc-libs-9.2.0-2
winpthreads-git-7.0.0.5544.15da3ce2-1
gcc-9.2.0-2
gcc-ada-9.2.0-2
gcc-libgfortran-9.2.0-2
gcc-fortran-9.2.0-2
gcc-objc-9.2.0-2
gdb-8.3.1-1

Some builds were on Appveyor, some on GH Actions.

I’m not much of c type, so any help would be appreciated…

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 20 (15 by maintainers)

Commits related to this issue

Most upvoted comments

Yes with mingw-w64 if you define _FORTIFY_SOUECE to something greater than zero you have to link against libssp, either by adding -fstack-protector or -lssp, because mingw-w64, unlike GNU libc, does not provide fortified functions.

Until recently, the default configuration of makepkg had -D_FORTIFY_SOURCE=2 which has been removed. If projects add this themselves then they start to have to add -lssp as well. One known example is GDB.

I’m getting this same error trying to build libopus on Cygwin, using the mingw-64 build tools. I’m not a programmer, so for my clarification, what’s the best way to get this package to successfully compile? Thank you.

EDIT: Never mind, passing CFLAGS="I=/usr/local/llsp" to configure fixed the issue.