Haskell-ide-engine: Getting `can't load .so/.DLL` for `libHSrandom`

Created on 15 Nov 2019  路  1Comment  路  Source: haskell/haskell-ide-engine

Hey all,

This is on OSX, with an dev environment provided by Nix. Note that for this dev environment, we have library haddocks and profiling enabled. I'm using GHC 8.6.4 with HIE provided by all-hies with (all-hies.selection { selector = p: { inherit (p) ghc864; }; }). The issue I'm running into when loading HIE up in VSCode is:

<command line>: can't load .so/.DLL for: /nix/store/yb297ih6bbk45dl608blp6m22jv86n7w-ghc-8.6.4-with-packages/lib/links/libHSrandom-1.1-3ypV4EIycgb35PKjTYYr5q-ghc8.6.4.dylib (dlopen(/nix/store/yb297ih6bbk45dl608blp6m22jv86n7w-ghc-8.6.4-with-packages/lib/links/libHSrandom-1.1-3ypV4EIycgb35PKjTYYr5q-ghc8.6.4.dylib, 5): Symbol not found: _timezm1zi8zi0zi2_DataziTimeziClockziInternalziCTimespec_zdwclockGetTime_closure
  Referenced from: /nix/store/yb297ih6bbk45dl608blp6m22jv86n7w-ghc-8.6.4-with-packages/lib/links/libHSrandom-1.1-3ypV4EIycgb35PKjTYYr5q-ghc8.6.4.dylib
  Expected in: /nix/store/smf6dvcjjwy5pwc34r97gc8ccacadc84-ghc-8.6.4/lib/ghc-8.6.4/directory-1.3.3.0/../time-1.8.0.2/libHStime-1.8.0.2-ghc8.6.4.dylib
 in /nix/store/yb297ih6bbk45dl608blp6m22jv86n7w-ghc-8.6.4-with-packages/lib/links/libHSrandom-1.1-3ypV4EIycgb35PKjTYYr5q-ghc8.6.4.dylib)

which seems pretty similar to https://github.com/haskell/haskell-ide-engine/issues/1207. I have seen https://github.com/haskell/haskell-ide-engine#dyld-on-macos but am unsure if that's the issue or how to fix it if it is (adding that export doesn't fix it).

Based off the comments in #1207, I am wondering: if I have haddocks/profiling enabled for my libaries, do I need to build HIE with haddocks/profiling enabled too? If yes, I'm assuming this would not be provided by all-hies and I would have to do a custom build from source. I'm not sure how to do this via nix (would love pointers), but would it theoretically work if I built with stack with the correct options enabled and used that in my nix project?

macOS vscode nix

Most helpful comment

got a similar issue on nixos.

>All comments

got a similar issue on nixos.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fendor picture fendor  路  3Comments

alanz picture alanz  路  3Comments

IvanMalison picture IvanMalison  路  5Comments

fendor picture fendor  路  4Comments

JorisBlanken picture JorisBlanken  路  4Comments