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

GHC crashes when building with stack build --fast #72

Open
nh2 opened this issue Nov 12, 2016 · 3 comments
Open

GHC crashes when building with stack build --fast #72

nh2 opened this issue Nov 12, 2016 · 3 comments

Comments

@nh2
Copy link
Collaborator

nh2 commented Nov 12, 2016

When I stack build with a package that has opencv as a dependency like

- location:
    git: https://github.com/chpatrick/haskell-opencv
    commit: 52a3898b95e899609a942245b32a8e5561cb240a
  extra-dep: true

in stack.yml everything runs through nicely.

If then I run stack build --fast I get the utterly disturbing

    Configuring opencv-0.0.0...
    Preprocessing library opencv-0.0.0...
    [29 of 58] Compiling OpenCV.Core.Types.Mat.Internal ( src/OpenCV/Core/Types/Mat/Internal.hs, .stack-work/dist/x86_64-linux-nix-custom-tuneable-addr/Cabal-1.24.0.0/build/OpenCV/Core/Types/Mat/Internal.o ) [flags changed]
    ghc: panic! (the 'impossible' happened)
      (GHC version 8.0.1 for x86_64-unknown-linux):
    	Loading temp shared object failed: /run/user/1000/ghc16696_0/libghc_23.so: undefined symbol: inline_c_OpenCV_Exception_Internal_0_9c662f8b58a9de54c461812288a8567063b02b4d

after this has happened, even stack build without --fast doesn't work anymore, I have to stack clean opencv and then stack build works again.

stack build --fast never seems to work, even after a clean.

I have no idea why it happens, but I observed that sometimes (e.g. when I do stack build after stack clean myproject) I get:

➤ stack build 
opencv-0.0.0: unregistering (local file changes: src/OpenCV/Core/Types/Mat/Internal.cpp)
opencv-0.0.0: build
opencv-0.0.0: copy/register
serkezet-0.1.0.0: configure
Configuring myproject...

Where would the local file changes: src/OpenCV/Core/Types/Mat/Internal.cpp come from? Given that I location: haskell-opencv in stack.yml, I don't even have a way to change it, so where do the file changes come from? Maybe these file changes are related to the --fast ghc error?

@basvandijk
Copy link
Contributor

This might be related to: #65. Are you running this on Nix? If so, you should try out the latest revision of haskell-opencv.

I don't use stack myself. Does it have a verbosity flag? If so, could you share the output of stack build --fast -v?

@nh2
Copy link
Collaborator Author

nh2 commented Nov 17, 2016

Are you running this on Nix?

@basvandijk No, I was running that without nix.

@nh2
Copy link
Collaborator Author

nh2 commented Feb 19, 2017

This might also be a general inline-c problem. We should check it out again when addCStub support has landed (fpco/inline-c#21 (comment)), maybe it helps somehow with this issue.

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

No branches or pull requests

2 participants