Building ghc-iserv fails with: error: undefined reference to '__stack_chk_guard'
Summary
My machine used to build GHC just fine, but with the current master(3656dff8) it fails with:
"inplace/bin/ghc-stage1" -o utils/iserv/stage2/build/tmp/ghc-iserv -hisuf hi -osuf o -hcsuf hc -static -H32m -O -Wall -hide-all-packages -i -iutils/iserv/src -iutils/iserv/stage2/build -Iutils/iserv/stage2/build -iutils/iserv/stage2/build/iserv/autogen -Iutils/iserv/stage2/build/iserv/autogen -Iutils/iserv/. -Iutils/iserv/stage2/build/. -optP-include -optPutils/iserv/stage2/build/iserv/autogen/cabal_macros.h -package-id array-0.5.4.0 -package-id base-4.15.0.0 -package-id binary-0.8.7.0 -package-id bytestring-0.10.10.0 -package-id containers-0.6.2.1 -package-id deepseq-1.4.4.0 -package-id ghci-8.11.0.20200709 -package-id libiserv-8.11.0.20200709 -package-id unix-2.7.2.2 -no-hs-main -XHaskell2010 -threaded -optl-Wl,--export-dynamic -no-hs-main -no-user-package-db -rtsopts -Wnoncanonical-monad-instances -outputdir utils/iserv/stage2/build -split-sections -static -H32m -O -Wall -hide-all-packages -i -iutils/iserv/src -iutils/iserv/stage2/build -Iutils/iserv/stage2/build -iutils/iserv/stage2/build/iserv/autogen -Iutils/iserv/stage2/build/iserv/autogen -Iutils/iserv/. -Iutils/iserv/stage2/build/. -optP-include -optPutils/iserv/stage2/build/iserv/autogen/cabal_macros.h -package-id array-0.5.4.0 -package-id base-4.15.0.0 -package-id binary-0.8.7.0 -package-id bytestring-0.10.10.0 -package-id containers-0.6.2.1 -package-id deepseq-1.4.4.0 -package-id ghci-8.11.0.20200709 -package-id libiserv-8.11.0.20200709 -package-id unix-2.7.2.2 -no-hs-main -XHaskell2010 -threaded -optl-Wl,--export-dynamic -no-hs-main -no-user-package-db -rtsopts -Wnoncanonical-monad-instances utils/iserv/stage2/build/Main.o utils/iserv/stage2/build/cbits/iservmain.o
Warning: -rtsopts and -with-rtsopts have no effect with -no-hs-main.
Call hs_init_ghc() from your main() function to set these options.
/home/leon/devel/ghc/rts/dist/build/libHSrts_thr.a(RtsSymbols.thr_o):RtsSymbols.c:rtsSyms: error: undefined reference to '__stack_chk_guard'
collect2: error: ld returned 1 exit status
`cc' failed in phase `Linker'. (Exit code: 1)
utils/iserv/ghc.mk:101: recipe for target 'utils/iserv/stage2/build/tmp/ghc-iserv' failed
make[1]: *** [utils/iserv/stage2/build/tmp/ghc-iserv] Error 1
I've bisected it to 686e7225, part of !3434 (closed)
Steps to reproduce
# use default settings:
rm mk/build.mk
./boot
./configure
make clean
make
Environment
- GHC version used:
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.8.2
- Operating System: Ubuntu 18.04.4 LTS
- System Architecture: x86_64
$ gcc --version
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ ld --version
GNU ld (GNU Binutils for Ubuntu) 2.30
Copyright (C) 2018 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.