You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Take into account installed pkg-config versions when resolving dependencies #3016
When constructing the installation plan, it seems like pkg-config does not take into account the versions of the installed system packages, and it always chooses the latest available version from hackage. This makes distributing bindings in hackage for the latest version of a given library fairly difficult, as far as I can tell. (Maybe there is a way? I would be happy to learn if so.)
The latest version of the gi-glib package, 0.2.46.10, has a pkgconfig-depends; glib-2.0 >= 2.46 line in the cabal file. This version of GLib is fairly recent, and is not included in Fedora 22 for example. The version there is 2.44, which would work with version 0.2.44.10 of gi-glib.
So when I try to do cabal install gi-glib in Fedora 22 the install fails with
Configuring gi-glib-0.2.46.10...
setup-Simple-Cabal-1.22.4.0-x86_64-linux-ghc-7.10.2: The pkg-config package
'glib-2.0' version >=2.46 is required but the version installed on the system
is version 2.44.1
cabal: Error: some packages failed to install:
since cabal always tries to install the latest version in hackage, gi-glib-0.2.46.10, which needs a too new GLib.
What would be ideal is if in this situation cabal chose the latest version of gi-glibcompatible with the GLib version in the system, as specified in the pkgconfig-depends field in the cabal file.
Would this be possible?
Otherwise I see (as maintainer of gi-glib) no useful way of having bindings to the latest released version of GLib in hackage (I would have to wait until most users have upgraded their systems, which may take a few years...). Is there perhaps a different way of achieving this?
Activity
ezyang commentedon Jan 1, 2016
This is #335! Some implementation guidance is in that ticket.
Tighten generated version bounds
Make the solver aware of pkg-config constraints
Make the solver aware of pkg-config constraints
Make the solver aware of pkg-config constraints
Make the solver aware of pkg-config constraints
Make the solver aware of pkg-config constraints
Make the solver aware of pkg-config constraints
Make the solver aware of pkg-config constraints
Make the solver aware of pkg-config constraints
Make the solver aware of pkg-config constraints
Make the solver aware of pkg-config constraints
Make the solver aware of pkg-config constraints
Make the solver aware of pkg-config constraints
Make the solver aware of pkg-config constraints
Make the solver aware of pkg-config constraints