[darcs-devel] [issue813] configure script can falsely believe that -lz is working when it isn't

Zooko bugs at darcs.net
Wed Apr 23 14:24:33 UTC 2008


New submission from Zooko <zooko at zooko.com>:

Yay!  We have a windows buildslave!

http://allmydata.org/buildbot-darcs/waterfall

But the Windows build fails, in a funny way that I could use some help improving.

I know what's going wrong, and I know how I could configure my Windows machine
to fix it, but then the next person who tries to build on Windows might
encounter this same error and not know what is going wrong. 

The problem is that the autoconf/configure script -- see the log here: 

http://allmydata.org/buildbot-darcs/builders/zooko%20windows/builds/10/steps/configure/logs/stdio


detects that gcc can successfully use -lz to link to the zlib.
but the build: 

http://allmydata.org/buildbot-darcs/builders/zooko%20windows/builds/10/steps/compile/logs/stdio


fails, because ghc cannot link to zlib.  Or more precisely, the gcc that comes
with ghc and is used internally by ghc cannot link to zlib. 

So the technique used in the configure script to determine whether ghc will be
able to use zlib by testing whether gcc can use zlib is to falsely passing.

Which leaves the hypothetical next-person who builds on Windows with a 
build failure: "c:\ghc\ghc-6.8.2\gcc-lib\ld.exe: cannot find -lz"
 
instead of with a configure script message saying "We require libz to build
darcs.", or whatever it says.

----------
messages: 4317
nosy: beschmi, eivuokko, jaredj, kowey, rgm, tommy, wglozer, zooko
priority: bug
status: chatting
title: configure script can falsely believe that -lz is working when it isn't
topic: IncludesExampleOrTest, Windows

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue813>
__________________________________


More information about the darcs-devel mailing list