Skip to content

Commit 56fb1dc

Browse files
authored
Merge pull request #9939 from haskell/mergify/bp/3.12/pr-9775
Tell zlib not to use pkg-config (backport #9775)
2 parents 59fd014 + 527daee commit 56fb1dc

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.gitlab/ci.sh

+16
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,22 @@ if [ "$(getconf LONG_BIT)" = "32" -o "${PLATFORM:=xxx}" = "x86_64-linux-centos7"
3434
echo 'constraints: lukko -ofd-locking' >> cabal.project.release.local
3535
fi
3636

37+
# In February 2024, cabal started using zlib-0.7.0.0, which uses pkg-config by
38+
# default. The GitLab CI environment doesn't (yet) supply pkg-config, and zlib
39+
# does just fine without it on modern GHCs. That said, the CI environment
40+
# probably *should* have pkg-config installed. See
41+
# https://github.com/haskell/cabal/issues/9774.
42+
echo 'constraints: zlib -pkg-config' >> cabal.project.release.local
43+
# Furthermore, on Windows, zlib claims that libz is shipped with GHC, so it just
44+
# uses @extra-libraries: z@ if pkg-config is False. If you are reading this
45+
# comment, however, this didn't work. Thus we switch to using the bundled libz,
46+
# as was done in zlib <0.7.0.0.
47+
case "$(uname)" in
48+
MSYS_*|MINGW*)
49+
echo 'constraints: zlib +bundled-c-zlib' >> cabal.project.release.local
50+
;;
51+
esac
52+
3753
args=(
3854
--disable-profiling
3955
--enable-executable-stripping

0 commit comments

Comments
 (0)