You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Archlinux, when building a package using autoconf, stack gives CFLAGS=-fno-PIE to autoconf, which makes autoconf think the C compiler is broken. Using CFLAGS=-no-pie instead would fix this.
Steps to reproduce
Have a package that uses autoconf (e.g. terminfo)
stack build
Expected
It works.
Actual
Configure fails:
$ stack build
terminfo-0.4.1.0: configure (lib)
Configuring terminfo-0.4.1.0...
configure: WARNING: unrecognized options: --with-compiler
checking for gcc... /usr/bin/gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
configure: error: in `/tmp/tmp.A5fZP6SH5x/terminfo-0.4.1.0':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
checking whether we are cross compiling...
-- While building package terminfo-0.4.1.0 using:
/tmp/tmp.A5fZP6SH5x/terminfo-0.4.1.0/.stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-1.24.2.0/setup/setup --builddir=.stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-1.24.2.0 configure --with-ghc=/home/michael/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.0.2/bin/ghc --with-ghc-pkg=/home/michael/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.0.2/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/home/michael/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.8/8.0.2/pkgdb --package-db=/tmp/tmp.A5fZP6SH5x/terminfo-0.4.1.0/.stack-work/install/x86_64-linux-tinfo6-nopie/lts-9.8/8.0.2/pkgdb --libdir=/tmp/tmp.A5fZP6SH5x/terminfo-0.4.1.0/.stack-work/install/x86_64-linux-tinfo6-nopie/lts-9.8/8.0.2/lib --bindir=/tmp/tmp.A5fZP6SH5x/terminfo-0.4.1.0/.stack-work/install/x86_64-linux-tinfo6-nopie/lts-9.8/8.0.2/bin --datadir=/tmp/tmp.A5fZP6SH5x/terminfo-0.4.1.0/.stack-work/install/x86_64-linux-tinfo6-nopie/lts-9.8/8.0.2/share --libexecdir=/tmp/tmp.A5fZP6SH5x/terminfo-0.4.1.0/.stack-work/install/x86_64-linux-tinfo6-nopie/lts-9.8/8.0.2/libexec --sysconfdir=/tmp/tmp.A5fZP6SH5x/terminfo-0.4.1.0/.stack-work/install/x86_64-linux-tinfo6-nopie/lts-9.8/8.0.2/etc --docdir=/tmp/tmp.A5fZP6SH5x/terminfo-0.4.1.0/.stack-work/install/x86_64-linux-tinfo6-nopie/lts-9.8/8.0.2/doc/terminfo-0.4.1.0 --htmldir=/tmp/tmp.A5fZP6SH5x/terminfo-0.4.1.0/.stack-work/install/x86_64-linux-tinfo6-nopie/lts-9.8/8.0.2/doc/terminfo-0.4.1.0 --haddockdir=/tmp/tmp.A5fZP6SH5x/terminfo-0.4.1.0/.stack-work/install/x86_64-linux-tinfo6-nopie/lts-9.8/8.0.2/doc/terminfo-0.4.1.0 --dependency=base=base-4.9.1.0 --enable-tests --enable-benchmarks
Process exited with code: ExitFailure 1
General summary/comments (optional)
On Archlinux, when building a package using autoconf, stack gives
CFLAGS=-fno-PIE
to autoconf, which makes autoconf think the C compiler is broken. UsingCFLAGS=-no-pie
instead would fix this.Steps to reproduce
stack build
Expected
It works.
Actual
Configure fails:
Verbose output
config.log
Stack version
Method of installation
The text was updated successfully, but these errors were encountered: