Hi!
I’m having trouble building one of my cabal projects, receiving this build error from cabal:
Failed to build zlib-0.7.1.0. The failure occurred during the configure step.
Build log (
/home/ola/.cache/cabal/logs/ghc-9.4.8/zlib-0.7.1.0-ea2ccc2f93d951d84a88c78a7b4f196fea6a3780cdafe6f13025c03d6aaa9dce.log
):
Configuring library for zlib-0.7.1.0..
Error: .cabal-wrapped: Missing dependency on a foreign library:
* Missing (or bad) header file: zlib.h
* Missing (or bad) C library: z
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags...
I have tried installing zlib and variations, but that hasn’t worked. I figured something could have changed, and sure enough in April this happened:
0.7.1.0 Bodigrim andrew.lelechenko@gmail.com April 2024
Split zlib C sources into zlib-clib package (thanks @hasufell).
Use zlib-clib on Windows, unless pkg-config is available.
So something that might be worth testing is to use an older version, but since the project is only indirectly depending on zlib
, how do I pinpoint an earlier version in my .cabal
?
It could be worth mentioning that I switched to NixOS some time ago.