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

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

Open
reactormonk opened this issue Nov 21, 2019 · 4 comments
Open

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

reactormonk opened this issue Nov 21, 2019 · 4 comments

Comments

@reactormonk
Copy link

reactormonk commented Nov 21, 2019

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 (924de7c)

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

To reproduce:

  • Optional: https://github.com/input-output-hk/plutus#how-to-set-up-the-iohk-binary-caches
  • git clone https://github.com/input-output-hk/plutus.git && cd plutus && git checkout hie-bios
  • nix-shell (have a coffee, or lunch if you didn't do the optional step)
  • use any HIE client, point it to e.g. a file in plutus-contract. I use vscode + the HIE extension (set the hie log file in settings to receive debug logging)
@mpickering
Copy link
Owner

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
Copy link
Author

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
Copy link

I can reproduce.

@michaelpj
Copy link

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

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

3 participants