-
-
Notifications
You must be signed in to change notification settings - Fork 389
hls fails with linker error due to missing symbols (with ghc linked dinamically) #787
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
Comments
is ghcide built by the same version of ghc being used to build the codebase? |
I'm using 8.6.5 for both. @mpickering was able to reproduce it before too. I suppose I could try what happens if I use 8.10 for both, but since the problem seems to be in the linking of libc I'm not sure whether it'd really affect anything. |
How do you build ghcide? If you are downloading a pre-built ghcide binary, it could have been linked to a different |
If you are embedding sqlite and using a statically linked build of ghc, or template haskell for that matter, you are probably running into this bug: https://gitlab.haskell.org/ghc/ghc/issues/7072 Does ghci work? You can try to work around it by patching |
I'm building ghcide myself from digital-asset master and from mpickering's fork. Copying ghcide's flags and running ghci manually works fine. |
Have you tried dynamically linking ghcide? |
Not yet, is it as simple as |
You can add |
Ok, |
I suspect the advice should indeed be "always link ghcide dynamically", just like ghc itself is built in most platforms. |
Ok, maybe we should add the |
Afaik this applies to hls as well (and there are other issues very similar to this) |
As there is a newer issue with the workaround about the same problem (afaics) i am gonna close this one |
When trying to use ghcide in my codebase I run into a weird linker issue where Haskell symbols can't be loaded because libc symbols they refer to are missing, as per the following error:
I've tried to debug this further, but I keep getting stuck. The codebase where it goes wrong can be found here: https://github.com/merijn/Belewitte
The C++ parts of the repo aren't relevant to Haskell code or error, running
make
in thebenchmark-analysis
directory is sufficient to build the Haskell bits of the repo. The code/makefile assumes GHC 8.6.5 and cabal-install >2.4. It can be build with GHC 8.10.1 too, if theConfig.mk
is edited to havePROJECTFILE:=cabal.project.ghc-8.10
(You can also point it at the right GHC and cabal-install binary if the wrong one is on PATH).Running
ghcide
in thebenchmark-analysis
or any of the source files in it invariably triggers this error./CC @mpickering
The text was updated successfully, but these errors were encountered: