Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

can't load .so/.DLL for libHSghc-prim-0.5.3-ghc8.6.5.so #1781

Open
freeman42x opened this issue May 31, 2020 · 9 comments
Open

can't load .so/.DLL for libHSghc-prim-0.5.3-ghc8.6.5.so #1781

freeman42x opened this issue May 31, 2020 · 9 comments

Comments

@freeman42x
Copy link

freeman42x commented May 31, 2020

To reproduce clone: https://github.com/razvan-flavius-panda/LagdaMdToLagda/tree/948dbdeeddcc69e594c0cdb5bf23ffe49e180243

Enter nix-shell --pure and run hie:

[nix-shell:~/Projects/LagdaMdToLagda]$ hie
2020-05-31 02:16:29.286922422 [ThreadId 4] - run entered for hie-wrapper(hie) Version 1.1 x86_64 ghc-8.6.5
2020-05-31 02:16:29.296239444 [ThreadId 4] - Current directory:/home/neo/Projects/LagdaMdToLagda
2020-05-31 02:16:29.296332845 [ThreadId 4] - Operating system:linux
2020-05-31 02:16:29.296386115 [ThreadId 4] - args:[]
2020-05-31 02:16:29.397216057 [ThreadId 4] - Cabal-Helper decided to use: ProjLocV2Dir {plProjectDirV2 = "/home/neo/Projects/LagdaMdToLagda"}
Build profile: -w ghc-8.6.5 -O1
In order, the following would be built (use -v for more details):
 - LagdaMdToLagda-0.1.0.0 (exe:LagdaMdToLagda) (configuration changed)
2020-05-31 02:16:30.302817186 [ThreadId 4] - Module "/home/neo/Projects/LagdaMdToLagda/File.hs" is loaded by Cradle: Cradle {cradleRootDir = "/home/neo/Projects/LagdaMdToLagda", cradleOptsProg = CradleAction: Other CabalV2}
2020-05-31 02:16:30.302985118 [ThreadId 4] - Cradle directory:/home/neo/Projects/LagdaMdToLagda
2020-05-31 02:16:30.304647927 [ThreadId 4] - Executing GHC on path with args: --numeric-version
2020-05-31 02:16:30.345146351 [ThreadId 4] - Project GHC version:8.6.5
2020-05-31 02:16:30.345246329 [ThreadId 4] - hie exe candidates :["hie-8.6.5","hie-8.6","hie"]
2020-05-31 02:16:30.347408755 [ThreadId 4] - found hie exe at:/nix/store/5a6jp7xm8zgv39bhjd1gvvj651gnlvx4-haskell-ide-engine-combined/libexec/bin/hie-8.6.5
2020-05-31 02:16:30.347533413 [ThreadId 4] - args:[]
2020-05-31 02:16:30.347609999 [ThreadId 4] - launching ....



Running HIE(hie-8.6.5)
  Version 1.1 x86_64 ghc-8.6.5
To run as a LSP server on stdio, provide the '--lsp' argument
Current directory:/home/neo/Projects/LagdaMdToLagda

args:[]

Looking for project config cradle...

2020-05-31 02:16:31.442573684 [ThreadId 4] - Cabal-Helper decided to use: ProjLocV2Dir {plProjectDirV2 = "/home/neo/Projects/LagdaMdToLagda"}
Build profile: -w ghc-8.6.5 -O1
In order, the following would be built (use -v for more details):
 - LagdaMdToLagda-0.1.0.0 (exe:LagdaMdToLagda) (configuration changed)
2020-05-31 02:16:31.68426565 [ThreadId 4] - Module "/home/neo/Projects/LagdaMdToLagda/File.hs" is loaded by Cradle: Cradle {cradleRootDir = "/home/neo/Projects/LagdaMdToLagda", cradleOptsProg = CradleAction: Other CabalV2}
2020-05-31 02:16:31.685731901 [ThreadId 4] - Executing GHC on path with args: --numeric-version
2020-05-31 02:16:31.728045902 [ThreadId 4] - Executing GHC on path with args: --print-libdir


###################################################

Cradle: Cabal project
Project Ghc version: 8.6.5
Libdir: Just "/nix/store/v2irxsz710ghkw0whk3n36lkb31msw06-ghc-8.6.5/lib/ghc-8.6.5"
Searching for Haskell source files...
Found 2 Haskell source files.

###################################################

Found the following files:

/home/neo/Projects/LagdaMdToLagda/Main.hs
/home/neo/Projects/LagdaMdToLagda/Setup.hs


Load them all now. This may take a very long time.

2020-05-31 02:16:31.830770784 [ThreadId 4] - New cradle: /home/neo/Projects/LagdaMdToLagda/Main.hs
2020-05-31 02:16:31.834652653 [ThreadId 4] - Cabal-Helper decided to use: ProjLocV2Dir {plProjectDirV2 = "/home/neo/Projects/LagdaMdToLagda"}
Build profile: -w ghc-8.6.5 -O1
In order, the following would be built (use -v for more details):
 - LagdaMdToLagda-0.1.0.0 (exe:LagdaMdToLagda) (configuration changed)
2020-05-31 02:16:32.406967677 [ThreadId 4] - Module "/home/neo/Projects/LagdaMdToLagda/Main.hs" is loaded by Cradle: Cradle {cradleRootDir = "/home/neo/Projects/LagdaMdToLagda", cradleOptsProg = CradleAction: Other CabalV2}
2020-05-31 02:16:32.40707938 [ThreadId 4] - Found cradle: Cradle {cradleRootDir = "/home/neo/Projects/LagdaMdToLagda", cradleOptsProg = CradleAction: Other CabalV2}
Build profile: -w ghc-8.6.5 -O1
In order, the following will be built (use -v for more details):
 - LagdaMdToLagda-0.1.0.0 (exe:LagdaMdToLagda) (first run)
2020-05-31 02:16:32.728606552 [ThreadId 4] - Ghc error on cradle initialisation: "can't load .so/.DLL for: /nix/store/v2irxsz710ghkw0whk3n36lkb31msw06-ghc-8.6.5/lib/ghc-8.6.5/ghc-prim-0.5.3/libHSghc-prim-0.5.3-ghc8.6.5.so (/nix/store/c745s6cnnxy6c98bvhi0qsijrh3ikag1-glibc-2.27/lib/libm.so.6: version `GLIBC_2.29' not found (required by /nix/store/v2irxsz710ghkw0whk3n36lkb31msw06-ghc-8.6.5/lib/ghc-8.6.5/ghc-prim-0.5.3/libHSghc-prim-0.5.3-ghc8.6.5.so))"
2020-05-31 02:16:32.728808214 [ThreadId 4] - New cradle: /home/neo/Projects/LagdaMdToLagda/Setup.hs
2020-05-31 02:16:32.732474135 [ThreadId 4] - Cabal-Helper decided to use: ProjLocV2Dir {plProjectDirV2 = "/home/neo/Projects/LagdaMdToLagda"}
Build profile: -w ghc-8.6.5 -O1
In order, the following would be built (use -v for more details):
 - LagdaMdToLagda-0.1.0.0 (exe:LagdaMdToLagda) (configuration changed)
2020-05-31 02:16:32.974869567 [ThreadId 4] - Module "/home/neo/Projects/LagdaMdToLagda/Setup.hs" is loaded by Cradle: Cradle {cradleRootDir = "/home/neo/Projects/LagdaMdToLagda", cradleOptsProg = CradleAction: Other CabalV2}
2020-05-31 02:16:32.974991438 [ThreadId 4] - Found cradle: Cradle {cradleRootDir = "/home/neo/Projects/LagdaMdToLagda", cradleOptsProg = CradleAction: Other CabalV2}
Build profile: -w ghc-8.6.5 -O1
In order, the following will be built (use -v for more details):
 - LagdaMdToLagda-0.1.0.0 (exe:LagdaMdToLagda) (first run)
2020-05-31 02:16:33.101190483 [ThreadId 4] - Fail on cradle initialisation: (ExitFailure 2)["Could not obtain flags for: \"Setup.hs\".","","This module was not part of any component we are aware of.","","Component: ChExeName \"LagdaMdToLagda\" with source directory: [\".\"]","","","To expose a module, refer to:","https://www.haskell.org/cabal/users-guide/developing-packages.html",""]

###################################################
###################################################

Dumping diagnostics:


/home/neo/Projects/LagdaMdToLagda/Main.hs: FAILED
        "can't load .so/.DLL for: /nix/store/v2irxsz710ghkw0whk3n36lkb31msw06-ghc-8.6.5/lib/ghc-8.6.5/ghc-prim-0.5.3/libHSghc-prim-0.5.3-ghc8.6.5.so (/nix/store/c745s6cnnxy6c98bvhi0qsijrh3ikag1-glibc-2.27/lib/libm.so.6: version `GLIBC_2.29' not found (required by /nix/store/v2irxsz710ghkw0whk3n36lkb31msw06-ghc-8.6.5/lib/ghc-8.6.5/ghc-prim-0.5.3/libHSghc-prim-0.5.3-ghc8.6.5.so))"
/home/neo/Projects/LagdaMdToLagda/Setup.hs: FAILED
        Fail on initialisation for "/home/neo/Projects/LagdaMdToLagda/Setup.hs". Could not obtain flags for: "Setup.hs".


Note: loading of 'Setup.hs' is not supported.
2020-05-31 02:16:33.144940767 [ThreadId 4] - done
@freeman42x freeman42x changed the title TODO - VM mouse froze, will update after reboot can't load .so/.DLL for libHSghc-prim-0.5.3-ghc8.6.5.so May 31, 2020
@freeman42x
Copy link
Author

From what I understand, hie executable is calling cabal to build some Haskell packages.

If I could somehow get Nix to provide those packages required by the hie run, then it should use them instead of installing them globally. The problem is how to tell which packages I need to provide inside the nix-shell.

If I am not mistaken, hie is trying to build cabal-3.0.0.0, so if I add that to nix-shell, then hie when run should not install it globally but use the one provided successfully by Nix.

@jneira
Copy link
Member

jneira commented Jun 1, 2020

maybe using an explicit hie.yamlconfig would be a workaround, cause that way hie does not try to build Cabal

@freeman42x
Copy link
Author

freeman42x commented Jun 1, 2020

@jneira So, something like:

cradle: {cabal: {component: "exe:Screeps-Haskell"}}

in a hie.yaml?

@jneira
Copy link
Member

jneira commented Jun 1, 2020

yeah, it should work if you have only one component (lib, exe, test, etc), with more components you will need a "multi" cradle: see https://github.com/haskell/haskell-ide-engine#project-configuration

@freeman42x
Copy link
Author

@jneira I tried what I mentioned above and the errors multiplied haha

Dumping diagnostics:


/home/neo/Projects/Screeps-Haskell/Setup.hs: FAILED
        "can't load .so/.DLL for: /nix/store/v2irxsz710ghkw0whk3n36lkb31msw06-ghc-8.6.5/lib/ghc-8.6.5/ghc-prim-0.5.3/libHSghc-prim-0.5.3-ghc8.6.5.so (/nix/store/c745s6cnnxy6c98bvhi0qsijrh3ikag1-glibc-2.27/lib/libm.so.6: version `GLIBC_2.29' not found (required by /nix/store/v2irxsz710ghkw0whk3n36lkb31msw06-ghc-8.6.5/lib/ghc-8.6.5/ghc-prim-0.5.3/libHSghc-prim-0.5.3-ghc8.6.5.so))"
/home/neo/Projects/Screeps-Haskell/Main.hs: FAILED
        "panic! (the 'impossible' happened)\n  (GHC version 8.6.5 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"


Note: loading of 'Setup.hs' is not supported.
2020-06-01 22:43:07.360372938 [ThreadId 4] - done

@freeman42x
Copy link
Author

I tried with:

cradle:
  cabal:
  - path: "./Main.hs"
    component: "exe:Screeps-Haskell"

and it throws:

Dumping diagnostics:


/home/neo/Projects/Screeps-Haskell/Setup.hs: FAILED
        Fail on initialisation for "/home/neo/Projects/Screeps-Haskell/Setup.hs". Multi Cradle: No prefixes matched
/home/neo/Projects/Screeps-Haskell/Main.hs: FAILED
        "can't load .so/.DLL for: /nix/store/v2irxsz710ghkw0whk3n36lkb31msw06-ghc-8.6.5/lib/ghc-8.6.5/ghc-prim-0.5.3/libHSghc-prim-0.5.3-ghc8.6.5.so (/nix/store/c745s6cnnxy6c98bvhi0qsijrh3ikag1-glibc-2.27/lib/libm.so.6: version `GLIBC_2.29' not found (required by /nix/store/v2irxsz710ghkw0whk3n36lkb31msw06-ghc-8.6.5/lib/ghc-8.6.5/ghc-prim-0.5.3/libHSghc-prim-0.5.3-ghc8.6.5.so))"


Note: loading of 'Setup.hs' is not supported.
2020-06-01 22:54:26.022937588 [ThreadId 4] - done

@jneira
Copy link
Member

jneira commented Jun 1, 2020

Oh sorry for the failed workaround, there is a fundamental issue beyond compiling Cabal.
I think a nix user would help better, maybe @infinisil?

@lf-
Copy link

lf- commented Jul 14, 2020

I can't offer any assistance, but I am also encountering this issue.

@infinisil
Copy link
Contributor

That looks like infinisil/all-hies#32, which should be fixed with infinisil/all-hies#64

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants