Closed andreasabel closed 2 months ago
@andreasabel, the Stack-supplied MSYS2 is, indeed, a 'plain vanilla'/'out of the box' version. If users need specific MSYS2 packages, as you identify, they can install them with pacman
in the Stack environment. This is documented at https://docs.haskellstack.org/en/stable/developing_on_windows/#developing-on-windows.
I am reluctant to change that basic approach, but I can extend the online documentation to give zlib >=0.7
as a specific example.
The problem is that Stack does not distinguish between manual and automatic flags and - for the sake of reproducibility - refuses to do any solving. The only solution I can think of is to bake constraints: zlib -pkg-config
into Stackage snapshots. It's not cool, but not a regression in comparison to zlib-0.6
(where pkg-config
was off by default).
FWIW I second the suggestion for Stack to preinstall pkg-config
into its MSYS environment. pkg-config
is a more secure and sane way to do things and more packages will benefit from its existence in future.
@Bodigrim, in that case (your seconding), I'll consult more widely. EDIT: In April 2022, I was of the same mind: https://github.com/commercialhaskell/stack/issues/1586#issuecomment-1107449752.
bake
constraints: zlib -pkg-config
into Stackage snapshots.
That would be:
When bumping to latest Stackage nightly, which has upgraded
zlib
to0.7
, it seems that on Windows I now need to install thezlib
library into MSYS2.Bumping Stackage nightly to 2024-04-20 upgrades
zlib
to0.7
, and this needs apkgconf
-supported installation of thezlib
system library. From the changelog at https://hackage.haskell.org/package/zlib-0.7.0.0/changelog:https://github.com/haskell/zlib/blob/16571cb9731de4be121c729b6b00544b013bd9a2/zlib.cabal#L66-L69
With Stack on Windows, this triggered a build error: https://github.com/agda/agda/actions/runs/8763153892/job/24051720397#step:10:2869
Installing the
zlib
library withstack exec -- pacman -S ...-zlib
fixed the problem.b6e154c
(#7229) https://github.com/agda/agda/actions/runs/8763585687/job/24052629583?pr=7229#step:6:122Can this be fixed by updating the MSYS2 installation shipped with Stack?
Or should this be fixed elsewhere? E.g. one could turn off the pkg-config flag for zlib in the Stackage snapshots. But this seems not very future-oriented, since the
pkgconfig-depends
mechanism was to make package descriptions more complete.Downstream:
See also: