Open LeanderK opened 4 years ago
btw stack build
works fine
Can you try what happens if you add a custom hie.yaml
?
I dont know what your project looks like in general, so I just guess how it should look like:
cradle:
stack:
component: "project:lib"
Where "project:lib" is the library component of your project.
EDIT: It may be named differently, you can find the library name with stack ide targets
I just unregistered the libtorch-ffi package and recompiled it without success.
My project essentially looks like:
app/*
src/*
test/*
hasktorch/ (<- git submodule of the hasktorch project)
package.yaml (<- nothing special besides the dependencies mentioned above)
stack.yaml (<- copied from above)
using the hie.yaml
with the stack ide targets
i just get repeating errors of:
2020-01-03 18:21:37.023204 [ThreadId 35] - Found cradle: Cradle {cradleRootDir = "/Users/LeanderK/Documents/Haskell/hasktorch-comcat", cradleOptsProg = CradleAction: stack}
2020-01-03 18:21:38.588374 [ThreadId 254] - hasktorch-comcat> initial-build-steps (lib + exe)
2020-01-03 18:21:39.101826 [ThreadId 254] - Configuring GHCi with the following packages: hasktorch-comcat
2020-01-03 18:21:40.008604 [ThreadId 262] - /Users/LeanderK/Documents/Haskell/hasktorch-comcat/.stack-work/install/x86_64-osx/939c413ab4a7d2343bb3a9b2ece27ffbd63771fd22078232752ce434eb022688/8.6.5/pkgdb:/Users/LeanderK/.stack/snapshots/x86_64-osx/939c413ab4a7d2343bb3a9b2ece27ffbd63771fd22078232752ce434eb022688/8.6.5/pkgdb:/Users/LeanderK/.stack/programs/x86_64-osx/ghc-8.6.5/lib/ghc-8.6.5/package.conf.d
2020-01-03 18:21:40.059488 [ThreadId 250] - Ghc error on cradle initialisation: "panic! (the 'impossible' happened)\n (GHC version 8.6.5 for x86_64-apple-darwin):\n\tDynamic linker not initialised\n\nPlease report this as a GHC bug: http://www.haskell.org/ghc/reportabug\n"
2020-01-03 18:21:40.059688 [ThreadId 35] - ghcDispatcher:Got error for a request: IdeError {ideCode = OtherError, ideMessage = "\"panic! (the 'impossible' happened)\\n (GHC version 8.6.5 for x86_64-apple-darwin):\\n\\tDynamic linker not initialised\\n\\nPlease report this as a GHC bug: http://www.haskell.org/ghc/reportabug\\n\"", ideInfo = Null} with mid: Nothing
Does hie work on trivial projects for you?
@fendor hmmm....no, it doesn't. But it did a few days ago, so there must be something going on (upgraded HIE). I'll investigate.
@fendor I get similar errors on other or completely newly clones projects:
Configuring concat-redux-0.1.0.0...
hie-8.6.5: ^^ Could not load '_concatzmreduxzm0zi1zi0zi0zm21HUV9SKq6C6WOV8oQEGnT_Lib_plugin_closure', dependency unresolved. See top entry above.
2020-01-03 19:58:28.816396 [ThreadId 60] - Ghc error on cradle initialisation: "\nByteCodeLink.lookupCE\nDuring interactive linking, GHCi couldn't find the following symbol:\n concatzmreduxzm0zi1zi0zi0zm21HUV9SKq6C6WOV8oQEGnT_Lib_plugin_closure\nThis may be due to you not asking GHCi to load extra object files,\narchives or DLLs needed by your current session. Restart GHCi, specifying\nthe missing library using the -L/path/to/object/dir and -lmissinglibname\nflags, or simply by naming the relevant files on the GHCi command line.\nAlternatively, this link failure might indicate a bug in GHCi.\nIf you suspect the latter, please send a bug report to:\n glasgow-haskell-bugs@haskell.org\n"
2020-01-03 19:58:28.816654 [ThreadId 35] - ghcDispatcher:Got error for a request: IdeError {ideCode = OtherError, ideMessage = "\"\\nByteCodeLink.lookupCE\\nDuring interactive linking, GHCi couldn't find the following symbol:\\n concatzmreduxzm0zi1zi0zi0zm21HUV9SKq6C6WOV8oQEGnT_Lib_plugin_closure\\nThis may be due to you not asking GHCi to load extra object files,\\narchives or DLLs needed by your current session. Restart GHCi, specifying\\nthe missing library using the -L/path/to/object/dir and -lmissinglibname\\nflags, or simply by naming the relevant files on the GHCi command line.\\nAlternatively, this link failure might indicate a bug in GHCi.\\nIf you suspect the latter, please send a bug report to:\\n glasgow-haskell-bugs@haskell.org\\n\"", ideInfo = Null} with mid: Nothing
2020-01-03 19:58:28.817314 [ThreadId 35] - New cradle: /Users/LeanderK/Downloads/compiling-to-categories-redux/src/Lib.hs
2020-01-03 19:58:28.833607 [ThreadId 35] - Cabal-Helper dirs: ["/Users/LeanderK/Downloads/compiling-to-categories-redux","/Users/LeanderK/Downloads/compiling-to-categories-redux/src/Lib.hs"]
2020-01-03 19:58:31.201309 [ThreadId 35] - Found cradle: Cradle {cradleRootDir = "/Users/LeanderK/Downloads/compiling-to-categories-redux", cradleOptsProg = CradleAction: Cabal-Helper-Stack}
2020-01-03 19:58:32.41782 [ThreadId 29] - Scheduler thread exited unexpectedly: expectJust getLinkDeps
CallStack (from HasCallStack):
error, called at compiler/utils/Maybes.hs:55:27 in ghc:Maybes
expectJust, called at compiler/ghci/Linker.hs:719:28 in ghc:Linker
EDIT: it sometimes just works, at least on the newly cloned project. not sure what's happening to be honest. I will reinstall HIE over night
I got the same error:
Dynamic linker not initialised
when using hie as the engine for vim and coc.nvim.
The problem was solved by making sure the resolver in my stack.yaml at the top level of the project directory matched that in ~/haskell-ide-engine/install/shake.yaml
i.e.
resolver: lts-14.11 # GHC 8.6.5
Did you install hie using:
stack install.hs hie
or did you choose a particular ghc version?
i chose a particular ghc version via stack ./install.hs hie-8.6.5
I'm pretty sure thats what I did (we are both use x86-64 apple darwin archs):
stack ./install.hs hie-8.6.5
stack ./install.hs data
You can double check that the --version on hie-wrapper is correct and use stack path
to make sure everything is using the right version of ghc.
I notice in the Hask torch project you have the resolver at
resolver: lts-14.19
You could try rolling back to resolver: lts-14.11 # GHC 8.6.5
And reinstalling haskell-ide-engine?
resolver: lts-14.19
You could try rolling back to resolver: lts-14.11 # GHC 8.6.5
This actually solved the problem! Maybe HIE could warn when this case occurs?
Same happened to me with s fresh started project. Downgraded to lts-14.11 from lts-15 and it worked!
This is the log:
The setup is quite complex, it's a project that depends on hasktorch. Create a new stack project with the hasktorch-project on the top-level as a git-submodule (
git submodule add here-hasktorch-link
),cd
into hasktorch and follow the setup-instructions for hasktorch. Then add this as the top-level stack.yaml .EDIT: one also needs to depend on:
in package.yaml