mpickering / haskell-ide-engine

The engine for haskell ide-integration. Not an IDE
BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

GhcException on cradle initialisation: can't load .so/.DLL #63

Open reactormonk opened 4 years ago

reactormonk commented 4 years ago

As mentioned in IRC, the HIE as set up in https://github.com/input-output-hk/plutus/tree/hie-bios by nix-shell produces the following output:

2019-11-21 11:27:10.754101886 [ThreadId 17] - GhcException on cradle initialisation: "can't load .so/.DLL for: /home/tass/dev/iohk/plutus/dist-newstyle/build/x86_64-linux/ghc-8.6.4/plutus-tx-0.1.0.0/l/plutus-tx-compiler/opt/build/plutus-tx-compiler/libHSplutus-tx-0.1.0.0-inplace-plutus-tx-compiler-ghc8.6.4.so (/home/tass/dev/iohk/plutus/dist-newstyle/build/x86_64-linux/ghc-8.6.4/plutus-tx-0.1.0.0/l/plutus-tx-compiler/opt/build/plutus-tx-compiler/libHSplutus-tx-0.1.0.0-inplace-plutus-tx-compiler-ghc8.6.4.so: undefined symbol: ghc_CoreMonad_zdfApplicativeCoreM7_closure)"

2019-11-21 11:27:10.756497484 [ThreadId 9] - ghcDispatcher:Got error for a request: IdeError {ideCode = OtherError, ideMessage = "\"can't load .so/.DLL for: /home/tass/dev/iohk/plutus/dist-newstyle/build/x86_64-linux/ghc-8.6.4/plutus-tx-0.1.0.0/l/plutus-tx-compiler/opt/build/plutus-tx-compiler/libHSplutus-tx-0.1.0.0-inplace-plutus-tx-compiler-ghc8.6.4.so (/home/tass/dev/iohk/plutus/dist-newstyle/build/x86_64-linux/ghc-8.6.4/plutus-tx-0.1.0.0/l/plutus-tx-compiler/opt/build/plutus-tx-compiler/libHSplutus-tx-0.1.0.0-inplace-plutus-tx-compiler-ghc8.6.4.so: undefined symbol: ghc_CoreMonad_zdfApplicativeCoreM7_closure)\"", ideInfo = Null} with mid: Nothing

No chances with a -dynamic HIE nor with trying the commit before the Friday fixes (924de7c5b)

The .so mentioned does contain these symbols, so it's gotta be something different.

To reproduce:

mpickering commented 4 years ago

I think there is something off with the all-hies packaged version of hie as I can start the session correctly and loads all the modules just using just the hie-bios executable.

However I am a bit worried that hie will not work well on your code base as changing the -w option causes a lot of packages to be reconfigured which takes a while. It isn't a problem for most projects. The multi-component support as well is not well tested.

reactormonk commented 4 years ago

I correctly specified it using external HIE, now I'm getting

2019-11-22 09:10:50.914760554 [ThreadId 17] - GhcException on cradle initialisation: "can't load .so/.DLL for: /nix/store/pnd2kl27sag76h23wa5kl95a76n3k9i3-glibc-2.27/lib/libpthread.so (/nix/store/pnd2kl27sag76h23wa5kl95a76n3k9i3-glibc-2.27/lib/libpthread.so.0: undefined symbol: libc_vfork, version GLIBC_PRIVATE)" 2019-11-22 09:10:50.914888304 [ThreadId 9] - ghcDispatcher:Got error for a request: IdeError {ideCode = OtherError, ideMessage = "\"can't load .so/.DLL for: /nix/store/pnd2kl27sag76h23wa5kl95a76n3k9i3-glibc-2.27/lib/libpthread.so (/nix/store/pnd2kl27sag76h23wa5kl95a76n3k9i3-glibc-2.27/lib/libpthread.so.0: undefined symbol: libc_vfork, version GLIBC_PRIVATE)\"", ideInfo = Null} with mid: Nothing 2019-11-22 09:10:50.915308918 [ThreadId 9] - New cradle: /home/tass/dev/iohk/plutus/plutus-contract/src/Data/Row/Extras.hs 2019-11-22 09:10:50.916420351 [ThreadId 9] - Found cradle: Cradle {cradleRootDir = "/home/tass/dev/iohk/plutus", cradleOptsProg = CradleAction: multi} 2019-11-22 09:11:47.76082341 [ThreadId 52] - GhcException on cradle initialisation: "panic! (the 'impossible' happened)\n (GHC version 8.6.4 for x86_64-unknown-linux):\n\tDynamic linker not initialised\n\nPlease report this as a GHC bug: http://www.haskell.org/ghc/reportabug\n" 2019-11-22 09:11:47.760944748 [ThreadId 9] - ghcDispatcher:Got error for a request: IdeError {ideCode = OtherError, ideMessage = "\"panic! (the 'impossible' happened)\n (GHC version 8.6.4 for x86_64-unknown-linux):\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 2019-11-22 09:11:47.761379012 [ThreadId 9] - New cradle: /home/tass/dev/iohk/plutus/plutus-contract/src/Data/Row/Extras.hs 2019-11-22 09:11:47.762521879 [ThreadId 9] - Found cradle: Cradle {cradleRootDir = "/home/tass/dev/iohk/plutus", cradleOptsProg = CradleAction: multi}

Maybe related to nix.

michaelpj commented 4 years ago

I can reproduce.

michaelpj commented 4 years ago

It would be good to validate on some other multi-package project that also defines and uses a plugin.