{"action":"created","issue":{"url":"https://api.github.com/repos/haskell/cabal/issues/3023","repository_url":"https://api.github.com/repos/haskell/cabal","labels_url":"https://api.github.com/repos/haskell/cabal/issues/3023/labels{/name}","comments_url":"https://api.github.com/repos/haskell/cabal/issues/3023/comments","events_url":"https://api.github.com/repos/haskell/cabal/issues/3023/events","html_url":"https://github.com/haskell/cabal/pull/3023","id":124643653,"number":3023,"title":"Make the solver aware of pkg-config constraints","user":{"login":"garetxe","id":1238558,"avatar_url":"https://avatars.githubusercontent.com/u/1238558?v=3","gravatar_id":"","url":"https://api.github.com/users/garetxe","html_url":"https://github.com/garetxe","followers_url":"https://api.github.com/users/garetxe/followers","following_url":"https://api.github.com/users/garetxe/following{/other_user}","gists_url":"https://api.github.com/users/garetxe/gists{/gist_id}","starred_url":"https://api.github.com/users/garetxe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garetxe/subscriptions","organizations_url":"https://api.github.com/users/garetxe/orgs","repos_url":"https://api.github.com/users/garetxe/repos","events_url":"https://api.github.com/users/garetxe/events{/privacy}","received_events_url":"https://api.github.com/users/garetxe/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/haskell/cabal/labels/post-1.24","name":"post-1.24","color":"f7c6c7"},{"url":"https://api.github.com/repos/haskell/cabal/labels/solver","name":"solver","color":"009800"}],"state":"open","locked":false,"assignee":{"login":"kosmikus","id":293191,"avatar_url":"https://avatars.githubusercontent.com/u/293191?v=3","gravatar_id":"","url":"https://api.github.com/users/kosmikus","html_url":"https://github.com/kosmikus","followers_url":"https://api.github.com/users/kosmikus/followers","following_url":"https://api.github.com/users/kosmikus/following{/other_user}","gists_url":"https://api.github.com/users/kosmikus/gists{/gist_id}","starred_url":"https://api.github.com/users/kosmikus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kosmikus/subscriptions","organizations_url":"https://api.github.com/users/kosmikus/orgs","repos_url":"https://api.github.com/users/kosmikus/repos","events_url":"https://api.github.com/users/kosmikus/events{/privacy}","received_events_url":"https://api.github.com/users/kosmikus/received_events","type":"User","site_admin":false},"milestone":null,"comments":20,"created_at":"2016-01-03T11:13:10Z","updated_at":"2016-03-05T19:38:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/haskell/cabal/pulls/3023","html_url":"https://github.com/haskell/cabal/pull/3023","diff_url":"https://github.com/haskell/cabal/pull/3023.diff","patch_url":"https://github.com/haskell/cabal/pull/3023.patch"},"body":"This pull request fixes https://github.com/haskell/cabal/issues/3016 (it does not entirely fix https://github.com/haskell/cabal/issues/335, but it goes in that direction). As explained in more detail in https://github.com/haskell/cabal/issues/3016, having the solver aware of available pkg-config dependencies is important for bindings for recent versions of external APIs.\r\n\r\nThe implementation is fairly similar to that in https://github.com/haskell/cabal/pull/2873, the only noteworthy point is that on startup we scan the list of all installed pkg-config packages in order to obtain their versions. Obtaining the list of installed packages is straightforward (`pkg-config --list-all`), based on this list we then call `pkg-config --modversion pkg1 pkg2...`.\r\n\r\nIf there are a lot of packages the commandline can get somewhat long (4-10 KB), but this should not be a problem in modern operating systems. An alternative would be to call `pkg-config --modversion` repeatedly for each package, but from quick testing this makes things much slower (0.02s vs 0.5s in my system)."},"comment":{"url":"https://api.github.com/repos/haskell/cabal/issues/comments/192714948","html_url":"https://github.com/haskell/cabal/pull/3023#issuecomment-192714948","issue_url":"https://api.github.com/repos/haskell/cabal/issues/3023","id":192714948,"user":{"login":"23Skidoo","id":47439,"avatar_url":"https://avatars.githubusercontent.com/u/47439?v=3","gravatar_id":"","url":"https://api.github.com/users/23Skidoo","html_url":"https://github.com/23Skidoo","followers_url":"https://api.github.com/users/23Skidoo/followers","following_url":"https://api.github.com/users/23Skidoo/following{/other_user}","gists_url":"https://api.github.com/users/23Skidoo/gists{/gist_id}","starred_url":"https://api.github.com/users/23Skidoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/23Skidoo/subscriptions","organizations_url":"https://api.github.com/users/23Skidoo/orgs","repos_url":"https://api.github.com/users/23Skidoo/repos","events_url":"https://api.github.com/users/23Skidoo/events{/privacy}","received_events_url":"https://api.github.com/users/23Skidoo/received_events","type":"User","site_admin":false},"created_at":"2016-03-05T19:38:37Z","updated_at":"2016-03-05T19:38:37Z","body":"@garetxe Windows binaries for `pkg-config` and its dependencies are available [here](http://ftp.gnome.org/pub/gnome/binaries/win64/dependencies/); installation instructions are available [here(http://stackoverflow.com/a/22363820/242169)."}}