-
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
Build-tools not detected when not using Stackage snapshot #595
Comments
The build tool discovery is fragile at best, because of the way Cabal specifies these things. Currently, the tool map is only capable of finding things in the snapshot build plan. I can't think of an efficient way of making this work well, but if you (or someone else) is interested in taking a stab at this, I can work through the issue with you. grep the codebase for |
It's documented in Stack.Build.ConstructPlan that only the snapshot is used to find build tools. This is so, if I understand correctly, basically for circularity reasons. The mapping from tool names to providing packages is needed in the It looks like our behavior is to silently accept the inability to satisfy a built-tool requirement. The general solution would be to make two passes over the build plan, directly or indirectly, so that extra packages are available in the second pass. To work around this problem, you can manually This problem is particularly pernicuous because a package maintainer may have the required tools available on the global $PATH and therefore never encounter this problem. |
Another use case described in #1427. |
Considering that another instance of this has come up, bumping to P2. |
Another detail of this is that if you have a dependency of a build-tool in In 4fb0b06, I added some warnings that link to this issue. Once the issue is fixed, the suggested cause should be removed. |
Includes workaround to stack.yaml config to auto install alex/happy: commercialhaskell/stack#595 (comment) Uses lts-5.11 (GHC 7.10) for El Capitan compatibility: commercialhaskell/stack#563
Includes workaround to stack.yaml config to auto install alex/happy: commercialhaskell/stack#595 (comment) Uses lts-5.11 (GHC 7.10) for El Capitan compatibility: commercialhaskell/stack#563
Includes workaround to stack.yaml config to auto install alex/happy: commercialhaskell/stack#595 (comment) Uses lts-5.11 (GHC 7.10) for El Capitan compatibility: commercialhaskell/stack#563
This will be resolved as a consequence of #1265 |
I got »No packages found in snapshot which provide a "hsc2hs" executable, which is a build-tool dependency of« and was pointed here. However, I am using a snapshot (lts-5.18). Anything I am doing wrong? |
hsc2hs should be included with ghc-7.10.3. Are you using a system installed ghc? If not, perhaps put |
Thanks for the suggestion, but the error seems to be independent of where ghc comes from. I took a fresh minimal Debian Jessie system, only installed stack and cloned my project. After "stack setup" I have |
I also just hit this error message, all I did was update a project from
This is with stack v1.1 on OS X 10.10. |
Just got this same error also on lts-2.22 with freshly install stack on ubuntu 14.04 |
I have the same |
I get this here too with
|
I got this message
|
Got this while trying to build
|
I've never seen ghc declared as a build-tool (which doesn't necessarily mean that it's wrong). If you want to have a constraint on the compiler version used, you'd usually do that via a constraint on the base package which is (still) tightly linked to the ghc version. For |
There's no need to worry about the build tools warning as long as you actually have that build tool on your PATH. The dependency resolution errors are more worrying. You could try to relax the bounds that you define yourself or scrutinize your dependencies for overly strict bounds. This is not the right place to discuss this though. |
Something I still don't understand: Why do I get a warning sending me here even if I am using a resolver? The problem seems to be that hsc2hs is not on stackage. Which makes sense because it comes with ghc already. So maybe the actual bug is that stack still thinks hsc2hs needs to be installed? (Okay, so this is tracked in #2235 already, sorry for the noise.) |
For me this issue is making Yesod completely unusable:
And that's it... No Yesod for me 😞 Edit: |
+1 Having this problem with |
+1 Having this problem with Idris. |
@mgsloan Can you clarify what you mean by this? I read through the thread and I don't quite understand the resolver/no resolver distinction. I have a repo with a |
What I really meant there is that usually folks use a snapshot. If the required build-tool is in the snapshot, then it will be installed. |
@mgsloan In my case |
Hadrian also exhibits this problem. The resolver: lts-8.21
packages:
- '.'
- '../libraries/Cabal/Cabal' I'm not sure |
See #3249 |
input-output-hk/cardano-sl#1921 stack build --ghc-options="-DGITREV=747e091ba72f81d2f0c73650a4f89fe93b09fc84 -Wwarn +RTS -A256m -n2m -RTS" --test --no-haddock-deps --bench --jobs=4 --flag cardano-sl:with-wallet --no-run-tests --no-run-benchmarks --fast --allow-different-user cardano-sl-core No packages found in snapshot which provide a "cpphs" executable, which is a build-tool dependency of "cardano-sl-core" cardano-sl-core-1.0.3: configure (lib) -- While building package cardano-sl-core-1.0.3 using: |
This issue has been resolved in Stack 1.6, which is currently in prerelease. |
Issue commercialhaskell/stack#595 was fixed in stack 1.6.1.
Issue commercialhaskell/stack#595 was fixed in stack 1.6.1.
This shows up with the gtk libraries; unsure how general it is.
With a dummy project depending on cairo, a normal
stack.yaml
depending on a snapshot correctly (somehow?) infers thatgtk2hs-buildtools
must be installed to buildcairo
:But with
resolver: ghc-7.10
and manually specified dependencies, it it doesn't figure that out:That build would fail. Adding
gtk2hs-buildtools-0.13.0.4
to theextra-deps
field does not solve the problem.How does
stack
determine that gtk2hs-buildtools is required, and why doesn't that work with theghc-*
resolver?The text was updated successfully, but these errors were encountered: