haskell / haddock

Haskell Documentation Tool
www.haskell.org/haddock/
BSD 2-Clause "Simplified" License
361 stars 242 forks source link

html-test fails when run with stack: unknown symbol `___gmp_rands' #811

Open DanBurton opened 6 years ago

DanBurton commented 6 years ago

Might be a stack bug... some issue with how stack installs ghc, perhaps?

# stack.yaml
resolver: nightly-2018-04-28
packages:
- .
- haddock-api
- haddock-library
- haddock-test
extra-deps:
- hspec-2.4.8
- hspec-core-2.4.8
- hspec-discover-2.4.8
$ stack --version
Version 1.7.1, Git revision 681c800873816c022739ca7ed14755e85a579565 (5807 commits) x86_64 hpack-0.28.2
$ stack install
$ HADOCK_PATH="$HOME/.local/bin/haddock" stack test haddock:html-test
...
Ported to use the GHC API by David Waern 2006-2008
8.4.2
Generating documentation...
haddock:
lookupSymbol failed in relocateSection (RELOC_GOT)
/Users/dan/.stack/programs/x86_64-osx/ghc-8.4.2/lib/ghc-8.4.2/integer-gmp-1.0.2.0/HSinteger-gmp-1.0.2.0.o: unknown symbol `___gmp_rands'
Failed to run Haddock on specified test files

haddock-2.20.0: Test suite html-test failed

I do not see the same test failure when I follow the cabal new-test instructions, using ghc-8.4.2 as installed by homebrew.

$ cabal new-test html-tests
...
1 of 1 test suites (1 of 1 test cases) passed.
harpocrates commented 6 years ago

Dup of https://github.com/haskell/haddock/issues/767? I'm hoping to figure this out soon, it really is a pain.

DanBurton commented 6 years ago

@harpocrates It appears to be related, though I'm not sure it's an exact dupe. Note that when I run the test suite with cabal new-test, it passes.