master: cross compiler bindist built from source fails to configure
Summary
I've tried building a GHC cross compiler targeting aarch64-linux with hadrian. When configuring the bindist, I get:
configure: WARNING: unrecognized options: --with-curses-includes, --with-curses-libraries, --with-system-libffi, --with-ffi-includes, --with-ffi-libraries, --enable-bootstrap-with-devel-snapshot
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... aarch64-unknown-linux-gnu
configure: GHC build : x86_64-unknown-linux
configure: GHC host : x86_64-unknown-linux
configure: GHC target : aarch64-unknown-linux
checking for path to top of build tree... /build/ghc-ab3e0f5/_build/bindist/ghc-9.5.20220819-aarch64-unknown-linux-gnu
checking for a BSD-compatible install... /nix/store/m5n32vy7rbfrqcxigw1p6wyx3cj7smg9-coreutils-9.1/bin/install -c
checking whether ln -s works... yes
checking for gsed... sed
checking for python3... /nix/store/xf1k5k05vg3zn7dfcpfh1qa7ga48hi3m-python3-3.10.6/bin/python3
checking for gfind... no
checking for find... /nix/store/0b6zhyagwcps9qq67sd0qwmsshnjsqs0-findutils-4.9.0/bin/find
checking for x86_64-unknown-linux-gnu-gcc... /nix/store/rs8cbccfb15pmc3gj5yizislva0fwcw8-aarch64-unknown-linux-gnu-stage-final-gcc-wrapper-9.5.0/bin/aarch64-unknown-linux-gnu-cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/build/ghc-ab3e0f5/_build/bindist/ghc-9.5.20220819-aarch64-unknown-linux-gnu':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
Steps to reproduce
configure flags (passed to the original configure and re-passed to the bindist configure): --datadir=$doc/share/doc/ghc --with-curses-includes=/nix/store/8ic6v37rpqql3w3mw9wj1mqviidmibi3-ncurses-6.3-p20220507-dev/include --with-curses-libraries=/nix/store/1rbdizyr45spsmig0sl9cykv4bami6lg-ncurses-6.3-p20220507/lib --with-system-libffi --with-ffi-includes=/nix/store/mkn9f0k6kbgpnj69zsxn8mj4bf0xw0wh-libffi-aarch64-unknown-linux-gnu-3.4.2-dev/include --with-ffi-libraries=/nix/store/67wwbmzijk3hyp2s89z9hvh9ijkmp7ii-libffi-aarch64-unknown-linux-gnu-3.4.2/lib --enable-bootstrap-with-devel-snapshot CFLAGS=-fuse-ld=gold CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=aarch64-unknown-linux-gnu
hadrian flags: --flavour=release+llvm+no_profiled_libs+split_sections --bignum=gmp --docs=no-sphinx
-- hadrian UserSettings.hs
```haskell
module UserSettings (
userFlavours, userPackages, userDefaultFlavour,
verboseCommand, buildProgressColour, successColour, finalStage
) where
import Flavour.Type
import Expression
import {-# SOURCE #-} Settings.Default
-- no way to set this via the command line
finalStage :: Stage
finalStage = Stage1
userDefaultFlavour :: String
userDefaultFlavour = "release"
userFlavours :: [Flavour]
userFlavours = []
-- Disable Colours
buildProgressColour :: BuildProgressColour
buildProgressColour = mkBuildProgressColour (Dull Reset)
successColour :: SuccessColour
successColour = mkSuccessColour (Dull Reset)
-- taken from src/UserSettings.hs unchanged, need to be there
userPackages :: [Package]
userPackages = []
verboseCommand :: Predicate
verboseCommand = do
verbosity <- expr getVerbosity
return $ verbosity >= Verbose
Expected behavior
configures and installs normally
Environment
- GHC version used: ab3e0f5a
Optional:
- Operating System: NixOS
- System Architecture: x86_64-linux (target: aarch64-linux)