It's my first time working on ghc (currently implementing
proposal 99 ), and I have two issues with the ghc tests that I
can't seem to figure out:
- Running hadrian/build.sh test -j on my machine causes 78 tests
to fail with the following error:
collect2: error: ld returned 1 exit status
`cc' failed in phase `Linker'. (Exit code: 1)
This happens in both my wip branch and on master, both in devel2
and quickest flavour. I've tried hadrian/build.sh clean and even
recloned the repo, but the errors are quite persistent. Running
the hadrian tests on CI works fine though.
- On CI , all tests under build pass. Under full-build
however, the hadrian tests pass, but a single make test fails :
Wrong exit code for haddockHtmlTest()(expected 0 , actual 2 )
Stdout ( haddockHtmlTest ):
[1 of 6] Compiling Test.Haddock.Process ( /builds/Gertjan423/ghc/testsuite/../utils/haddock/haddock-test/src/Test/Haddock/Process.hs, Test/Haddock/Process.o )
[2 of 6] Compiling Test.Haddock.Utils ( /builds/Gertjan423/ghc/testsuite/../utils/haddock/haddock-test/src/Test/Haddock/Utils.hs, Test/Haddock/Utils.o )
[3 of 6] Compiling Test.Haddock.Config ( /builds/Gertjan423/ghc/testsuite/../utils/haddock/haddock-test/src/Test/Haddock/Config.hs, Test/Haddock/Config.o )
[4 of 6] Compiling Test.Haddock ( /builds/Gertjan423/ghc/testsuite/../utils/haddock/haddock-test/src/Test/Haddock.hs, Test/Haddock.o )
[5 of 6] Compiling Test.Haddock.Xhtml ( /builds/Gertjan423/ghc/testsuite/../utils/haddock/haddock-test/src/Test/Haddock/Xhtml.hs, Test/Haddock/Xhtml.o )
[6 of 6] Compiling Main ( /builds/Gertjan423/ghc/testsuite/../utils/haddock/html-test/Main.hs, Main.o )
Linking html-test ...
Haddock version 2.22.0, (c) Simon Marlow 2006
Ported to use the GHC API by David Waern 2006-2008
Failed to run Haddock on test package ''
Haddock output is at 'haddock-out.log'. This file can be set with `--haddock-stdout`.
Testing output files...
Some tests crashed.
Makefile:19: recipe for target 'htmlTest' failed
Stderr ( haddockHtmlTest ):
Warning: Unknown/unsupported 'ghc' version detected (Cabal 126.96.36.199 supports
'ghc' version < 8.10): /builds/Gertjan423/ghc/inplace/bin/ghc-stage2 is
make: *** [htmlTest] Error 1
*** unexpected failure for haddockHtmlTest(normal)
I did make some small Haddock changes, so I did most likely cause
this behavior. I just find it strange that this error does not
happen on my machine, and even on CI only occurs in the make tests
(and only under linux, not under windows).
Any tips regarding what could cause this, and how to tackle
debugging this would be greatly appreciated :)