Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

With the new FFI demo, repeated runs of cabal repl haskell-demo fails #14

Open
CMCDragonkai opened this issue Mar 30, 2019 · 0 comments

Comments

@CMCDragonkai
Copy link
Member

It is failing with this error:

Preprocessing library for haskell-demo-0.1.0.0..
GHCi, version 8.4.3: http://www.haskell.org/ghc/  :? for help
ghc: panic! (the 'impossible' happened)
  (GHC version 8.4.3 for x86_64-unknown-linux):
        Loading temp shared object failed: /tmp/ghc7803_0/libghc_1.so: undefined symbol: get_pi

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

Even though nix-build succeeds. The first time you run cabal repl haskell-demo, it works. But the second time it fails. It feels like this is something to do with the cabal repl settings maybe loading the wrong shared object.

To solve this change the order of c-sources in the haskell-demo.cabal file.

It is mentioned here: https://gitlab.haskell.org/ghc/ghc/issues/12152

And after doing so, it works.

This may also be solved by doing #10. Seems like a bug to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant