-
Notifications
You must be signed in to change notification settings - Fork 842
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
--profile and -dynamic builds fail #1691
Comments
I'm seeing a similar error when building the stack project with
There's no
Is there any reason to believe that this is a GHC or Cabal issue or is this likely a bug in stack itself? |
Hmm, that's very strange! I have a similar stack version, same ghc, same Cabal, but it doesn't repro. It's a long shot, but is it solved by the most recent HEAD? It'd be helpful to have a dockerfile repo + ideally an uploaded container |
I'll give this a try in the next days. |
I've also reproduced this locally with Using |
I've run into another instance of this bug, this time closer to what @blitzcode experienced: In this case the missing profiling libraries are supposed to come from a procompiled package! I think this might be a hint at the root of the problem. BTW, during this run I had set
|
IIRC, |
It seems I'm also running into this.
My build was failing like so
The executable that was failing in this case is math-bench. The file seems to have some template haskell in it - I'm not sure if that is the issue, but math-bench also has some
Since I have access to the cabal file I just set |
I've hit this problem trying to build HaRe with --profile on both Mac and Windows. |
Could this be related? haskell/cabal#2827 |
I also just hit this while building stack HEAD (078cfad) with --executable-profiling. Kind of annoying, since I wasn't getting it just earlier today. :) I don't have useful report info yet, I'm just pinging the thread. I'm going to blow away .stack-work and see what changes. |
My repro steps were:
|
@mgsloan I would say most likely. Interesting in this case that it's the Paths_<lib>.hs module that causes the trouble, which is autogenerated (but I forget who does the autogeneration). |
The autogeneration of Paths_ is part of Cabal. No TH involved. It is rather curious that it's failing due to that. |
I was getting similar error messages with the above in my stack.yaml - had to set the values to false to successfully build. Not too sure how relevant this is.. |
This appears to be an upstream issue, either in Cabal or GHC. Closing in favor of haskell/cabal#5961 |
And I remembered the resolution for this problem: can you try adding |
I frequently use
-dynamic
in my GHC options to reduce link times during development. Profile builds seem to first rebuild their dependencies properly, but then fail to find them during compilation of the actual project. It seems like only static versions of the profile libraries are build.Here's a project of mine with quite a few dependencies and
-dynamic
set in the Cabal file:The text was updated successfully, but these errors were encountered: