Hadrian: test T3807 failure
When building with hadrian, test T3807 fails with a linker error. The test's Makefile attempts to link with the RTS:
# testsuite/tests/dynlibs/Makefile : 12 '$(TEST_HC)' $(filter-out -rtsopts,$(TEST_HC_OPTS)) -v0 --make -dynamic -fPIC -shared T3807Export.hs T3807-export.c -o T3807test.so -lHSrts-ghc`'$(TEST_HC)' $(TEST_HC_OPTS) --numeric-version`
In particular, this will result in the following linker option that causes the failure (assuming ghc version 8.9.0):
In Hadrian, unlike in make, the RTS library file includes the (dummy) version number, so the required linker option would actually be:
While it's possible to try and match makes behavior by removing the dummy version from the file names (I've started on that here), a further complication arises. Hadrian tries to copy relevant library files using cabal-install's
cabal copy command. Cabal expects the "1.0" version number to be present and so will fail. In summary, the naming conventions between Hadrian and Cabal would conflict if Hadrian dropped the "1.0" version number for the RTS library files.
The correct way to resolve this is unclear. 2 Ideas are:
- Drop the RTS version number in Hadrian and patch Cabal as well.
- Cabal may need a special case for the RTS.
- Or is there a better alternative?
- Keep the RTS version number, but create syslinks of the library files without the RTS version number to allow backwards compatibility with code that links with the rts.