danza danza - 1 year ago 137
Linux Question

Missing native library to build an Haskell package with Cabal, on Linux

i get an error when trying to build an Haskell package which depends on a native C library, even though the header file seems to be at its place. The error says:

Missing (or bad) header file

What is the meaning of this error? How can i find out more? The file is not missing since i can find it in my system, under
. I tried to use the
option in order to point Cabal to the header file which is present in my system, but i still get the error. So the file is not missing, how can it be bad?

This is really a generic question about how to troubleshoot this kind of issues, but here are the details about my system:

  • Package to install:

  • Missing header:

  • Header position in my system:

  • Operative system: Ubuntu 16.04

I installed any possible Ubuntu
package i could find, including 32 bit versions

Answer Source

If you increase build verbosity with say -v3, you will get actual compiler error messages. In this case

/usr/include/zlib.h:34:19: fatal error: zconf.h: No such file or directory

A quick googling of the name zlib.h reveals that this is a confirmed open Ubuntu bug.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download