Re: [Haskell-cafe] zlib, missing zlib.h

2008-05-30 Thread Tony Morris
-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?
 
 [EMAIL 
 PROTECTED]:~/haskellInstalls/smallInstalls/cabal-install/zlib-0.4.0.4runghc
 Setup.hs configure
 Configuring zlib-0.4.0.4...
 
 [EMAIL 
 PROTECTED]:~/haskellInstalls/smallInstalls/cabal-install/zlib-0.4.0.4runghc
 Setup.hs build out
 
 [EMAIL 
 PROTECTED]:~/haskellInstalls/smallInstalls/cabal-install/zlib-0.4.0.4head
 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
 [EMAIL PROTECTED]:~/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-
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] zlib, missing zlib.h

2008-05-29 Thread Don Stewart
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?
 
 [EMAIL 
 PROTECTED]:~/haskellInstalls/smallInstalls/cabal-install/zlib-0.4.0.4runghc
 Setup.hs configure
 Configuring zlib-0.4.0.4...
 
 [EMAIL 
 PROTECTED]:~/haskellInstalls/smallInstalls/cabal-install/zlib-0.4.0.4runghc
 Setup.hs build out
 
 [EMAIL 
 PROTECTED]:~/haskellInstalls/smallInstalls/cabal-install/zlib-0.4.0.4head
 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
 [EMAIL PROTECTED]:~/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
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] zlib, missing zlib.h

2008-05-29 Thread Marc Weber
On Thu, May 29, 2008 at 03:51:56PM -0700, Thomas Hartman wrote:

echoextra-lib-dirs: ${zlib}/lib  zlib.cabal
echoinclude-dirs: ${zlib}/include  zlib.cabal'';
Try patching the cabal file using something like that.

Marc
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] zlib, missing zlib.h

2008-05-29 Thread Duncan Coutts

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:
 
 echoextra-lib-dirs: ${zlib}/lib  zlib.cabal
 echoinclude-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

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe