Skip to content

wrong dylib name using GHC package

> import qualified GHC
> import qualified GHC.Paths
>
> main = GHC.runGhcT (Just GHC.Paths.libdir) $ do
>       -- begin initialize
>       df0 <- GHC.getSessionDynFlags
>       let df1 = df0{GHC.ghcMode    = GHC.CompManager,
>                     GHC.hscTarget  = GHC.HscInterpreted,
>                     GHC.ghcLink    = GHC.LinkInMemory,
>                     GHC.verbosity  = 0}
>       _ <- GHC.setSessionDynFlags df1
>       -- begin reset
>       GHC.setContext [] []
>       GHC.setTargets []
>       _ <- GHC.load GHC.LoadAllTargets
>       return ()

compiling this on ubuntu with ghc 7.0.3

$ ghc --make test.lhs -dynamic -package ghc

[1 of 1] Compiling Main             ( test.lhs, test.o )
Linking test ...
vagrant@lucid64:~$ ./test
test: <command line>: can't load .so/.DLL for: /usr/local/lib/ghc-7.0.3/ghc-prim-0.2.0.0/libHSghc-prim-0.2.0.0-ghc7.0.3.so (lib/usr/local/lib/ghc-7.0.3/ghc-prim-0.2.0.0/libHSghc-prim-0.2.0.0-ghc7.0.3.so.so: cannot open shared object file: No such file or directory)

notice the -so.so link.

Trac metadata
Trac field Value
Version 7.0.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component GHC API
Test case
Differential revisions
BlockedBy
Related
Blocking
CC jcpetruzza@gmail.com
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information