-
Notifications
You must be signed in to change notification settings - Fork 805
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
Is it intended that pkg-config
be a prerequisite to use Stackage with Stack?
#7387
Comments
Prettty much no distro includes it by default. E. g., for Ubuntu
is empty
Correct. As a maintainer of |
Why does it matter what Linux distributions include by default? They don't even ship a C compiler per default. I would posit that pkg-config is effectively standard on Linux, since if you install headers for an arbitrary library, that package is likely to include a pkg-config configuration. For example, on Debian 11 if I do I do have many results for cmake configuration files, if I search using |
Maybe I didn't understand the implications of the two ecosystems, but why should the default behaviour for stack be different? Can't that be confusing? I still not understand why using the system library makes sense for the pure package, but not if used in conjunction with stack. |
Re #7387: turn off pkg-config flag for zlib
@ysangkok, I think it (pkg-config on the PATH 'by default') matters in this sense: if Stackage assumes that pkg-config is on the PATH then the Stack project will want to do what it can to ensure that assumption is a good one. It is helpful to know what operating systems and Linux distributions are affected. |
The proximate cause of my raising this issue (the However, I think the question asked is still relevant as a matter of principle. |
Although I mention Windows/MSYS2 above, if |
According to Hackage, over 7,700 Haskell packages depend on
zlib-0.7.0.0
. So, it seems to me that its non-Haskell dependencies have practical consequences. Unlike earlier versions of the package, by default,zlib-0.7.0.0
requires the executablepkg-config
to be on the PATH to be built with Stack (it can, however, be built with--flag zlib:-pkg-config
).pkg-config
is not provided by MSYS2 on Windows 'out of the box' and I understand from @Bodigrim that it is also not included with all Linux distributions 'by default' (EDIT: I think Alpine Linux is one example). EDIT2: I think that macOS also does not includepkg-config
by default and (EDIT3) it is not a tool included in the Xcode Command Line Tools.Is it intended that
pkg-config
be a de facto prerequisite to use Stackage package sets with Stack? If 'yes', should that be documented? If 'no', shouldzlib-0.7.0.0
only be included in package sets if itspkg-config
Cabal flag is specified asfalse
?The text was updated successfully, but these errors were encountered: