Skip to content

stack build fails to pass haskell-gi to cabal #1436

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

Closed
koterpillar opened this issue Nov 26, 2015 · 3 comments
Closed

stack build fails to pass haskell-gi to cabal #1436

koterpillar opened this issue Nov 26, 2015 · 3 comments

Comments

@koterpillar
Copy link
Contributor

When haskell-gi and haskell-gi-base are both specified as extra-deps in stack.yaml:

extra-deps:
- haskell-gi-base-0.10
- haskell-gi-0.10.1
- xdg-basedir-0.2.2

The project fails to build with:

$ stack build
xdg-basedir-0.2.2: configure
xdg-basedir-0.2.2: build
haskell-gi-base-0.10: configure
haskell-gi-base-0.10: build
xdg-basedir-0.2.2: copy/register
haskell-gi-base-0.10: copy/register
haskell-gi-0.10.1: configure
haskell-gi-0.10.1: build
haskell-gi-0.10.1: copy/register
hgitest-0.1.0.0: configure
Configuring hgitest-0.1.0.0...
setup-Simple-Cabal-1.22.4.0-x86_64-linux-ghc-7.10.2: At least the following
dependencies are missing:
haskell-gi -any

Note that stack exec -- ghc-pkg list | grep haskell-gi only lists haskell-gi-base-0.10 and not haskell-gi.

Steps to reproduce:

  • Create a new project with stack new.
  • Add haskell-gi to build-depends in the .cabal file.
  • Add the following to extra-deps in stack.yaml:
- haskell-gi-base-0.10
- haskell-gi-0.10.1
- xdg-basedir-0.2.2
  • Run stack build.

Expected result: The project builds without errors.
Actual result: The project fails to build, see above.

Here's the full project demonstrating the issue: https://github.com/koterpillar/hgitest

@koterpillar
Copy link
Contributor Author

I found that the problem is haskell-gi not providing a library, only an executable. Not sure whether this is something either Stack or Cabal can warn about, closing.

@rvion
Copy link
Contributor

rvion commented Nov 27, 2015

@koterpillar I wish it would work anyway, could you reopen just to let someone comment about if it's normal or not ?

@koterpillar koterpillar reopened this Nov 27, 2015
@mgsloan
Copy link
Contributor

mgsloan commented Nov 27, 2015

This is normal, the error message is occurring while configuring hgitest, because it can't find the haskell-gi library - see this cabal issue. You probably want to add haskell-gi the build-tools list in your cabal file.

@mgsloan mgsloan closed this as completed Nov 27, 2015
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

3 participants