Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cabal install hoogle failure #383

Open
ndzik opened this issue Feb 1, 2022 · 2 comments
Open

cabal install hoogle failure #383

ndzik opened this issue Feb 1, 2022 · 2 comments

Comments

@ndzik
Copy link

ndzik commented Feb 1, 2022

Hopefully the right address here (;

So I tried to install hoogle via cabal using the following command:

cabal install hoogle

Down the road I receive the following error:

cabal: Failed to build wai-logger-2.4.0 (which is required by exe:hoogle from
hoogle-5.0.18.3). The failure occurred during the configure step. The
exception was:
dieVerbatim: user error (cabal: '/home/omega/.ghcup/bin/ghc' exited with an
error:

/tmp/cabal-install.-47811/dist-newstyle/tmp/src-47813/wai-logger-2.4.0/dist/setup/setup.hs:11:1:
error:
Bad interface file:
/home/omega/.cabal/store/ghc-8.10.7/cabal-doctest-1.0.9-f8a0eb8f5ca943544bd4426764b807654c9259bab0897519ba54541e31009638/lib/Distribution/Extra/Doctest.hi
mismatched interface file ways (wanted "", got "dyn")
|
11 | import Distribution.Extra.Doctest ( defaultMainWithDoctests )
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)

Workaround:
What worked for me was cabal install hoogle --ghc-options="-dynamic-too". Now I do not know why this worked and the only reason I tried this out was because of an issue with haskell-language-server in which a similar error was mentioned in the thread and this answer containing above suggestion. I figured I try it and everything works now.

System: ArchLinux
GHC: Everything haskell related is installed with ghcup. I tried the above with GHC 8.10.7.
Cabal: Tried with versions 3.6.2.0 and 3.4.1.0 and it only works with the above flag for both.

Maybe this is also an issue for cabal? I think someone might point me to the right direction, just figured I post something s.t. some other lost soul might find a solution.

Might this be related to me being on ArchLinux? Since I am not using any Arch ghc or haskell-* packages I figured this should not pose a problem but who am I to judge.

Thanks for your time!

@ghost
Copy link

ghost commented Feb 2, 2022

Looks like wai-logger-2.4.0 was uploaded at 2022-01-30T00:52:35Z.

GHC 8.10.7

hoogle successfully installed in December 2021 using GHC 8.10.7 and wai-logger-2.3.7


with this cabal executable

https://downloads.haskell.org/~cabal/cabal-install-3.6.0.0/
cabal-install-3.6.0.0-x86_64-linux.tar.xz

$ tar xvf cabal-install-3.6.0.0-x86_64-linux.tar.xz
cabal
$ ./cabal --version
cabal-install version 3.6.0.0
compiled using version 3.6.1.0 of the Cabal library
$

Running strings cabal | grep lHS | cut -f 1 -d ] | cut -f 2 -d [ | tr , '\n' prints the Haskell
libraries (and Cffi library as bundled with rts) the executable had been compiled with.

Strip and locally install cabal.

$ strip --strip-unneeded cabal
$ mkdir -p ~/.cabal/bin && mv cabal ~/.cabal/bin
$ 

@kazu-yamamoto
Copy link

wai-logger-2.4.0 changed a minor log message a bit. Building should not be influenced at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants