zlib, missing zlib.h

Tried to install http://hackage.haskell.org/cgi-bin/hackage-scripts/package/zlib which is required for http://darcs.haskell.org/cabal-branches/cabal-1.4 which is required for cabal-install. Got the following error. apt-get installed zlibc on a stab in the dark, but same result. advice? thartman@thartman-laptop:~/haskellInstalls/smallInstalls/cabal-install/zlib-0.4.0.4>runghc Setup.hs configure Configuring zlib-0.4.0.4... thartman@thartman-laptop:~/haskellInstalls/smallInstalls/cabal-install/zlib-0.4.0.4>runghc Setup.hs build &>out thartman@thartman-laptop:~/haskellInstalls/smallInstalls/cabal-install/zlib-0.4.0.4>head out Preprocessing library zlib-0.4.0.4... Stream.hsc:74:18: error: zlib.h: No such file or directory Stream.hsc: In function 'main': Stream.hsc:254:0: error: 'z_stream' undeclared (first use in this function) Stream.hsc:254:0: error: (Each undeclared identifier is reported only once thartman@thartman-laptop:~/haskellInstalls/smallInstalls/cabal-install/zlib-0.4.0.4>

You need to install the C zlib library. Cabal is currently unable to warn about missing C library dependencies, but they manifest as undeclared identifiers in .hsc files when that's the case. -- Don tphyahoo:
Tried to install
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/zlib
which is required for
http://darcs.haskell.org/cabal-branches/cabal-1.4
which is required for cabal-install.
Got the following error. apt-get installed zlibc on a stab in the dark, but same result. advice?
thartman@thartman-laptop:~/haskellInstalls/smallInstalls/cabal-install/zlib-0.4.0.4>runghc Setup.hs configure Configuring zlib-0.4.0.4...
thartman@thartman-laptop:~/haskellInstalls/smallInstalls/cabal-install/zlib-0.4.0.4>runghc Setup.hs build &>out
thartman@thartman-laptop:~/haskellInstalls/smallInstalls/cabal-install/zlib-0.4.0.4>head out Preprocessing library zlib-0.4.0.4...
Stream.hsc:74:18: error: zlib.h: No such file or directory Stream.hsc: In function 'main':
Stream.hsc:254:0: error: 'z_stream' undeclared (first use in this function)
Stream.hsc:254:0: error: (Each undeclared identifier is reported only once thartman@thartman-laptop:~/haskellInstalls/smallInstalls/cabal-install/zlib-0.4.0.4> _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On Thu, May 29, 2008 at 03:51:56PM -0700, Thomas Hartman wrote: echo " extra-lib-dirs: ${zlib}/lib" >> zlib.cabal echo " include-dirs: ${zlib}/include" >> zlib.cabal''; Try patching the cabal file using something like that. Marc

On Fri, 2008-05-30 at 01:10 +0200, Marc Weber wrote:
On Thu, May 29, 2008 at 03:51:56PM -0700, Thomas Hartman wrote:
echo " extra-lib-dirs: ${zlib}/lib" >> zlib.cabal echo " include-dirs: ${zlib}/include" >> zlib.cabal''; Try patching the cabal file using something like that.
Actually the .cabal file is fine, the machine is probably just missing zlib.h which is in zlib-devel on debian based systems. As don says, Cabal does not currently check that all required .h files and C libs are available at configure time so you bump into them as compile or linker errors. Obviously it should check for these things at configure time and produce more helpful explanations. If anyone wants to implement that for us that'd be a great service. The ticket is here: http://hackage.haskell.org/trac/hackage/ticket/262 Duncan

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 apt-get install zlib1g-dev Tony Morris http://tmorris.net/ Real-world problems are simply degenerate cases of pure mathematical problems. Thomas Hartman wrote:
Tried to install
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/zlib
which is required for
http://darcs.haskell.org/cabal-branches/cabal-1.4
which is required for cabal-install.
Got the following error. apt-get installed zlibc on a stab in the dark, but same result. advice?
thartman@thartman-laptop:~/haskellInstalls/smallInstalls/cabal-install/zlib-0.4.0.4>runghc Setup.hs configure Configuring zlib-0.4.0.4...
thartman@thartman-laptop:~/haskellInstalls/smallInstalls/cabal-install/zlib-0.4.0.4>runghc Setup.hs build &>out
thartman@thartman-laptop:~/haskellInstalls/smallInstalls/cabal-install/zlib-0.4.0.4>head out Preprocessing library zlib-0.4.0.4...
Stream.hsc:74:18: error: zlib.h: No such file or directory Stream.hsc: In function 'main':
Stream.hsc:254:0: error: 'z_stream' undeclared (first use in this function)
Stream.hsc:254:0: error: (Each undeclared identifier is reported only once thartman@thartman-laptop:~/haskellInstalls/smallInstalls/cabal-install/zlib-0.4.0.4> _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIP8GgmnpgrYe6r60RAjGGAKDCpiIE9IGv5Madf2jMhEZCDuuEhgCdGljK ztH9XwTczFX7ABBrh3TuT8I= =jR/y -----END PGP SIGNATURE-----
participants (5)
-
Don Stewart
-
Duncan Coutts
-
Marc Weber
-
Thomas Hartman
-
Tony Morris