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

'unknown symbol' error when running hls on the stack codebase #330

Closed
theobat opened this issue Aug 16, 2020 · 3 comments
Closed

'unknown symbol' error when running hls on the stack codebase #330

theobat opened this issue Aug 16, 2020 · 3 comments
Labels
os: macos type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@theobat
Copy link

theobat commented Aug 16, 2020

Hi,

The repo where this happens is https://github.com/commercialhaskell/stack/
I slightly modified the package.yaml to use GHC 8.8.3 and LTS-16.9 (but an older one does not change this issue)

I get:

haskell-language-server-8.8.3: 
lookupSymbol failed in relocateSection (relocate external)
/Users/theophile/.stack/snapshots/x86_64-osx/63fd7302eafdb4f0848748d641de7b97f139e859d01e32c9b472b68facb0ed5d/8.8.3/lib/x86_64-osx-ghc-8.8.3/hackage-security-0.6.0.1-EOE2VKs23b41HWmlFHCnG/libHShackage-security-0.6.0.1-EOE2VKs23b41HWmlFHCnG.a: unknown symbol `___dso_handle'

I'm not sure what to do with this or where it comes from, I didn't find any occurence of ___dso_handle on google.
Here's an interesting GHC issue though, I'm trying to see if something can be done at the hackage-security level (or a shared C lib they use)
Also, maybe it's unrelated, but Template Haskell is used in several places in the stack codebase.

@jneira jneira added os: macos status: needs repro type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. labels Aug 16, 2020
@theobat
Copy link
Author

theobat commented Aug 26, 2020

Another interesting thread on google about ___dso_handle:
https://mail.haskell.org/pipermail/haskell-cafe/2011-January/088041.html

It definitely seems to be related to template haskell, in particular:

It seems to me that TH (when used with cabal) loads all packages
specified at "Build-Depends" in your cabal file (whether they are needed
or not). ghc --make instead just loads all packages, that are really
needed for THs code generation.

@theobat
Copy link
Author

theobat commented Jan 7, 2021

Yet another interesting suggestion in (untested for now) : https://stackoverflow.com/questions/26449154/a-workaround-for-the-template-haskell-c-bug

Seems like this is also an issue on linux (the linking fails, with different errors though)

@jneira
Copy link
Member

jneira commented Jan 31, 2022

I am gonna close this issue as all compiler crashes seems to have the same root cause:

If any of you think the issue should not be included generically feel free to reopen it (with a brief explanation if possible)
Thanks all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os: macos type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

No branches or pull requests

2 participants