Testsuite driver cannot find ghc-pkg when cross compiling
When running the testsuite for cross GHC, there are a ton of failing cases with the same error:
/tmp/ghc-unreg/testsuite/mk/boilerplate.mk:187: *** Cannot find ghc-pkg: /tmp/ghc-unreg/_build/stage1/bin/ghc-pkg. Stop.
The console log also revealed something interesting:
/usr/bin/python3 testsuite/driver/runtests.py --rootdir=testsuite/tests --rootdir=libraries/binary/tests --rootdir=libraries/bytestring/tests --rootdir=libraries/directory/tests --rootdir=libraries/process/tests --rootdir=libraries/exceptions/tests --rootdir=libraries/filepath/tests --rootdir=libraries/ghc-heap/tests --rootdir=libraries/hpc/tests --rootdir=libraries/template-haskell/tests --rootdir=libraries/text/tests --rootdir=libraries/unix/tests --rootdir=libraries/array/tests --rootdir=libraries/base/tests --rootdir=libraries/deepseq/tests --rootdir=libraries/exceptions/tests --rootdir=libraries/ghc-compact/tests --rootdir=libraries/ghc-prim/tests --rootdir=libraries/haskeline/tests --rootdir=libraries/pretty/tests --rootdir=libraries/stm/tests --top /tmp/ghc-unreg/testsuite -e windows=False -e darwin=False -e config.local=False -e config.cleanup=True -e config.accept=False -e config.accept_platform=False -e config.accept_os=False -e 'config.exeext='\'''\''' -e config.compiler_debugged=False -e ghc_with_native_codegen=False -e config.have_ncg=False -e config.have_llvm=True -e config.compiler_profiled=False -e config.have_RTS_linker=False -e 'config.package_conf_cache_file="/tmp/ghc-unreg/_build/stage1/lib/package.conf.d/package.cache"' -e 'config.libdir="/tmp/ghc-unreg/_build/stage1/lib"' -e config.have_interp=False -e config.unregisterised=True -e config.tables_next_to_code=False -e 'ghc_compiler_always_flags='\'' -dcore-lint -dstg-lint -dcmm-lint -no-user-package-db -fno-dump-with-ways -rtsopts -optc-fno-builtin -fno-warn-missed-specialisations -fshow-warning-groups -fdiagnostics-color=never -fno-diagnostics-show-caret -Werror=compat -dno-debug-output'\''' -e ghc_with_dynamic_rts=False -e ghc_with_threaded_rts=False -e config.have_fast_bignum=True -e ghc_with_smp=False -e config.ghc_dynamic=False -e config.leading_underscore=False -e 'config.wordsize="32"' -e 'config.os="linux"' -e 'config.arch="wasm32"' -e 'config.platform="wasm32-unknown-wasi"' -e config.stage=2 --config gs=gs --config 'timeout_prog="/tmp/ghc-unreg/_build/testsuite/timeout/install-inplace/bin/timeout"' --config stats_files_dir=_build/stage1/haddock-timing-files --threads=48 --config-file=testsuite/config/ghc -e config.speed=0 --summary-file=summary.txt --junit=junit.xml --verbose=2 --config 'compiler="/tmp/ghc-unreg/_build/stage1/bin/wasm32-wasi-ghc"' --config 'ghc_pkg="/tmp/ghc-unreg/_build/stage1/bin/ghc-pkg"' --config haddock= --config 'hp2ps="/tmp/ghc-unreg/_build/stage1/bin/hp2ps"' --config 'hpc="/tmp/ghc-unreg/_build/stage1/bin/hpc"' -e config.in_tree_compiler=True
So hadrian was invoking the testsuite driver with the correct prefixed name of ghc
, but it failed to pass prefixed ghc-pkg
/hp2ps
/hpc
. So at least this is definitely a bug in hadrian, and maybe the testsuite makefiles will also need some tuning.