
#9386: GHCi cannot load .so in ./ -------------------------------------+------------------------------------- Reporter: crockeea | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 7.8.3 Resolution: | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: Other | Blocked By: Test Case: | Related Tickets: Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by crockeea): * cc: hvr (added) * failure: GHCi crash => Other * status: infoneeded => new * component: Compiler => GHCi * version: 7.8.2 => 7.8.3 Comment: I'm still experiencing this issue with ghc-7.8.3-x86-64-unknown-linux and gcc-4.8.2. Consider the following C file, mul.c: {{{#!c //zipWith (*) void mul (int* a, int* b, int n) { int i; for(i = 0; i < n; i++) { a[i] = a[i]*b[i]; } } }}} At the terminal (where Foo.hs is empty): {{{
gcc -c mul.c gcc -shared -o mylib.so *.o ghci Foo *.o GHCi, version 7.8.3: 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) mkdir Temp cp *.so Temp/ ghci Foo Temp/*.o GHCi, version 7.8.3: 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 (static) Temp/*.o ... not found final link ... done [1 of 1] Compiling Main ( Foo.hs, interpreted ) Ok, modules loaded: Main. *Main> }}}
-- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9386#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler