GHCi cannot load .so in ./
|Reported by:||crockeea||Owned by:|
|Type of failure:||Other||Test Case:|
|Related Tickets:||Differential Revisions:||Phab:D593|
Description (last modified by crockeea)
In my directory ./ I have an empty file Foo.hs and a shared object file mylib.so. From that directory in the shell,
$ ghci Foo *.so
GHCi, version 7.8.2: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading object (dynamic) mylib.so ... failed.
<command line>: user specified .o/.so/.DLL could not be loaded (mylib.so: cannot open shared object file: No such file or directory)
Whilst trying to load: (dynamic) mylib.so
Additional directories searched: (none)
It's interesting that GHCi searches ./ and identifies the correct object file, but then fails to load it. I have also tried the path ./*.so, mylib.so and ./mylib.so for the GHCi option.
However, if I move mylib.so to a directory ./Temp,
$ ghci Foo Temp/*.so
loads without issue.
Change History (12)
comment:1 Changed 11 months ago by crockeea
- Summary changed from GHCi cannot load .so in same ./ to GHCi cannot load .so in ./
comment:4 Changed 8 months ago by crockeea
- Cc hvr added
- Component changed from Compiler to GHCi
- Status changed from infoneeded to new
- Type of failure changed from GHCi crash to Other
- Version changed from 7.8.2 to 7.8.3