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

Getting can't load .so/.DLL for libHSrandom #1454

Open
cah6 opened this issue Nov 15, 2019 · 1 comment
Open

Getting can't load .so/.DLL for libHSrandom #1454

cah6 opened this issue Nov 15, 2019 · 1 comment

Comments

@cah6
Copy link

cah6 commented Nov 15, 2019

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 #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?

@teto
Copy link

teto commented Feb 25, 2020

got a similar issue on nixos.

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

3 participants