[Haskell-cafe] Passing a cabal flag to stack

Rustom Mody rustompmody at gmail.com
Sat Jul 16 04:32:19 UTC 2016


On Sat, Jul 16, 2016 at 9:48 AM, Simon Jakobi <simon.jakobi at googlemail.com>
wrote:

> Hi!
>
> > So whats the official way of putting the -fgtk3 flag into stack?
>
> To pass that flag to poppler, the syntax is
>
>     --flag poppler:gtk3
>

When I try stack build --flag poppler:gtk3
 I get
=================
--  Failure when adding dependencies:
      hoodle-core: needed (>=0.15.0 && <0.16), couldn't resolve its
dependencies
    needed for package hoodle-0.4.999

--  Failure when adding dependencies:
      hoodle-publish: needed (>=0.2), couldn't resolve its dependencies
      hoodle-render: needed (>=0.5.0 && <0.6), couldn't resolve its
dependencies
      poppler: needed (>=0.12.2.2), couldn't resolve its dependencies
    needed for package hoodle-core-0.15.999

--  Failure when adding dependencies:
      hoodle-render: needed (>=0.5.0), couldn't resolve its dependencies
    needed for package hoodle-publish-0.2.0

--  Failure when adding dependencies:
      poppler: needed (>=0.12.2.2), couldn't resolve its dependencies
    needed for package hoodle-render-0.5.999

--  Failure when adding dependencies:
      gtk3: needed (>=0.13 && <0.14), 0.14.2 found (latest applicable is
0.13.9)
    needed for package poppler-0.13.1 with flags:
      gtk3: True
=============
Happens whether I try more focussed:
$ stack build poppler --flag poppler:gtk3
get
=============
While constructing the BuildPlan the following exceptions were encountered:

--  Failure when adding dependencies:
      gtk3: needed (>=0.13 && <0.14), 0.14.2 found (latest applicable is
0.13.9)
    needed for package poppler-0.13.1 with flags:
      gtk3: True
================


[In cut pasting Ive elided oodles of stuff like:

No packages found in snapshot which provide a "gtk2hsC2hs" executable,
which is a build-tool dependency of "glib"
Missing build-tools may be caused by dependencies of the build-tool being
overridden by extra-deps.
This should be fixed soon - see this issue
https://github.com/commercialhaskell/stack/issues/595

]




>
> > 1. Delete every file/directory under .stack-work that has the word
> poppler
>
> That shouldn't be necessary.
>
> > 2. stack build poppler --flag gtk:gtk3
> > 3. stack build
>
> It's best to be consistent about flag settings. It might be easiest to
> put them in your stack.yaml:
> http://docs.haskellstack.org/en/stable/yaml_configuration/#flags
>
>
This is the stack.yaml (without comments)

=======================
# This file was automatically generated by stack init
# For more information, see:
http://docs.haskellstack.org/en/stable/yaml_configuration/

# Specifies the GHC version and set of packages available (e.g., lts-3.5,
nightly-2015-09-21, ghc-7.10.2)
resolver: lts-5.8

# Local packages, usually specified by relative directory name
packages:
- coroutine-object/
- hoodle/
- hoodle-builder/
- hoodle-core/
- hoodle-daemon/
- hoodle-extra/
- hoodle-manage/
- hoodle-parser/
- hoodle-publish/
- hoodle-render/
- hoodle-types/
- xournal-parser/
- xournal-types/
# Packages to be pulled from upstream that are not in the resolver (e.g.,
acme-missiles-0.3)
extra-deps:
- TypeCompose-0.9.11
- aeson-0.11.1.1
- attoparsec-conduit-1.1.0
- gtk-0.13.9
- handa-gdata-0.7.0.3
- persistent-sqlite-2.2.1
- poppler-0.13.1
- svgcairo-0.13.0.4
- text-1.2.2.0
- transformers-free-1.0.1
- zlib-conduit-1.1.0

# Override default flag values for local packages and extra-deps
flags: {}

# Extra package databases containing global packages
extra-package-dbs: []
========================

What do you recommend to try to change?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20160716/c4091233/attachment.html>


More information about the Haskell-Cafe mailing list