Hadrian: some "sanity" tests failing spuriously
It looks like the sanity
way of running tests is failing due to linker trouble. At least, that's what I think it is -- I'm a bit clueless in this department.
Here is what I observe:
rae:23:06:32 ~/ghc/ghc-homo> runtests compact_cycle
--build-root=_build --flavour=default -j5 --flavour=devel2+werror test --only=compact_cycle --freeze1 --freeze2
Up to date
/Users/rae/ghc/ghc-homo/_build/stage1/bin/ghc-pkg field ghc-prim library-dirs --simple-output
# ghc-pkg (for OracleQ (ArgsHash (Target {context = Context {stage = Stage2, package = Package {pkgType = Library, pkgName = "ghc", pkgPath = "compiler"}, way = v}, builder = RunTest, inputs = ["-904909205859904705"], outputs = []})))
| Run RunTest: none => none
/usr/local/bin/python3 testsuite/driver/runtests.py --rootdir=testsuite/tests --rootdir=libraries/binary/tests --rootdir=libraries/exceptions/tests --rootdir=libraries/ghc-heap/tests --rootdir=libraries/hpc/tests --rootdir=libraries/template-haskell/tests --rootdir=libraries/text/tests --rootdir=libraries/array/tests --rootdir=libraries/base/tests --rootdir=libraries/bytestring/tests --rootdir=libraries/deepseq/tests --rootdir=libraries/directory/tests --rootdir=libraries/exceptions/tests --rootdir=libraries/filepath/tests --rootdir=libraries/ghc-compact/tests --rootdir=libraries/ghc-prim/tests --rootdir=libraries/haskeline/tests --rootdir=libraries/pretty/tests --rootdir=libraries/process/tests --rootdir=libraries/stm/tests --rootdir=libraries/unix/tests --top /Users/rae/ghc/ghc-homo/testsuite -e windows=False -e darwin=True -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=True -e ghc_with_native_codegen=True -e config.have_interp=True -e config.unregisterised=False -e 'ghc_compiler_always_flags='\'' -dcore-lint -dstg-lint -dcmm-lint -no-user-package-db -rtsopts -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=True -e config.have_vanilla=True -e config.have_dynamic=False -e config.have_profiling=False -e config.have_fast_bignum=True -e ghc_with_smp=True -e config.ghc_dynamic=False -e config.leading_underscore=True -e 'config.wordsize="64"' -e 'config.os="darwin"' -e 'config.arch="x86_64"' -e 'config.platform="x86_64-apple-darwin"' --config gs=gs --config 'timeout_prog="/Users/rae/ghc/ghc-homo/_build/testsuite/timeout/install-inplace/bin/timeout"' --config stats_files_dir=_build/stage1/haddock-timing-files --threads=5 --config-file=testsuite/config/ghc --only=compact_cycle -e config.speed=1 --summary-file=testsuite_summary.txt --verbose=2 --config 'compiler="/Users/rae/ghc/ghc-homo/_build/stage1/bin/ghc"' --config 'ghc_pkg="/Users/rae/ghc/ghc-homo/_build/stage1/bin/ghc-pkg"' --config haddock= --config 'hp2ps="/Users/rae/ghc/ghc-homo/_build/stage1/bin/hp2ps"' --config 'hpc="/Users/rae/ghc/ghc-homo/_build/stage1/bin/hpc"' -e config.in_tree_compiler=True
Failed to find `llc` command; skipping LLVM ways...
Timeout is 300
Known ways: prof, normal_h, prof_hc_hb, prof_hb, prof_hd, prof_hy, prof_hr, sanity, threaded1_ls, threaded2_hT, debug_numa, llvm, debugllvm, profllvm, profoptllvm, profthreadedllvm, debug, ghci-ext, ghci-ext-prof, ext-interp, nonmoving, nonmoving_thr, nonmoving_thr_ghc, compacting_gc
Run ways: normal, hpc, optasm, ghci, threaded1, threaded2
Compile ways: normal, hpc, optasm
Allowing performance changes in:
Found 508 .T files...
Beginning test run at Sat Oct 9 23:07:42 2021
Detected CPU features: {'avx1', 'sse', 'sse3', 'avx2', 'sse4_2', 'sse2', 'bmi2', 'bmi1', 'sse4_1'}
Found CPU features: avx1 sse sse3 avx2 sse4_2 sse2 bmi2 bmi1 sse4_1
=====> 1 of 1 [0, 0, 0]
=====> 1 of 1 [0, 0, 0]
Compile failed (exit code 1) errors were:
[1 of 1] Compiling Main ( compact_cycle.hs, compact_cycle.o )
Linking compact_cycle ...
ld: library not found for -lHSrts-1.0.2_debug
clang: error: linker command failed with exit code 1 (use -v to see invocation)
`cc' failed in phase `Linker'. (Exit code: 1)
*** unexpected failure for compact_cycle(sanity)
=====> 1 of 1 [0, 1, 0]
Performance Metrics (test environment: local):
None collected.
Unexpected results from:
TEST="compact_cycle"
SUMMARY for test run started at Sat Oct 9 23:07:42 2021
0:00:02.388249 spent to go through
1 total tests, which gave rise to
8 test cases, of which
5 were skipped
0 had missing libraries
2 expected passes
0 expected failures
0 caused framework failures
0 caused framework warnings
0 unexpected passes
1 unexpected failures
0 unexpected stat failures
0 fragile tests
Unexpected failures:
/var/folders/hk/9mb2kh2s4_74mk61crypkypm0000gn/T/ghctest-q8g1vavi/test spaces/libraries/ghc-compact/tests/compact_cycle.run compact_cycle [exit code non-0] (sanity)
user error (tests failed)
Build failed.
hadrian-util: Received ExitFailure 1 when running
Raw command: /Users/rae/ghc/ghc-homo/hadrian/build-cabal --build-root=_build --flavour=default -j5 --flavour=devel2+werror test --only=compact_cycle --freeze1 --freeze2
Run from: /Users/rae/ghc/ghc-homo
rae:23:07:45 ~/ghc/ghc-homo>
I have observed this both on macOS and on NixOS using ghc.nix.
Am I doing something wrong here?
Thanks!