From: Jakub Narebski <jnareb@gmail.com>
To: Mircea Bardac <dev@mircea.bardac.net>
Cc: "Tom Fogal" <tfogal@alumni.unh.edu>, git@vger.kernel.org
Subject: Re: BUG (v1.5.6.1): ./configure missing check for zlib.h
Date: Sat, 28 Jun 2008 01:03:18 +0200 [thread overview]
Message-ID: <200806280103.19302.jnareb@gmail.com> (raw)
In-Reply-To: <20080627150732.D88F64B4002@artemis.sr.unh.edu>
On Fri, 27 Jun 2008, tom fogal wrote:
> Jakub Narebski <jnareb@gmail.com> writes:
>> Mircea Bardac <dev@mircea.bardac.net> writes:
>>
>>> $ ./configure
>> [...]
>>> configure: CHECKS for header files
>>> In file included from daemon.c:1:
>>> cache.h:9:18: error: zlib.h: No such file or directory
>>> make: *** [daemon.o] Error 1
>>>
>>> (installing zlib1g-dev on Ubuntu 7.10 fixed the problem)
>>
>> What should ./configure do (what ./configure for other programs
>> or packages do)?
>>
>> You cannot compile git without zlib!
>
> If one can determine during configure time that a required library is
> not found, it (IMHO) is nice to give an error message and bomb out (via
> AC_MSG_ERROR).
>
> The AC macro archive has a zlib macro which does this, as an example:
>
> http://autoconf-archive.cryp.to/check_zlib.html
>
> I should note, however, that I disagree with that macro's logic in that
> it `searches' for zlib if the user does not specify it. IMO, if the
> user does not give a --with option, and it doesn't work `out of the
> box' (without hacking FLAGS), macros should die with an error rather
> than retry with changed FLAGS.
On Fri, 27 Jun 2008, Mircea Bardac wrote:
>
> Well, as far as I know, if a program depends on any external headers,
> they should *all* be checked, not only "those that can be skipped by
> defining some macro" (I personally do not know which are these).
In git (not like usually in other projects) ./configure script (autoconf)
is used *only* to generate Makefile configuration. It tries to configure
compile (build) process in such a way that building git is possible even
if some features are missing or are found not in standard place (and also
use compat version of functions if they are not in library). It helps you
build system.
I'm not sure if checking if prerequisites exists and failing loudly
otherwise would be a good feature to have. Git would fail anyway during
build process, so it is not some new feature. The only advantage is that
required and unavoidable dependency would be found earlier; on the other
hand there is now disadvantage of build process (./configure process)
if it misdetects lack of needed header files, i.e. it is possible to
compile (build) git, but ./configure detects that it is not so. This
happened once to me, and is very annoying...
But as they say, "code speaks louder than words"
--
Jakub Narebski
Poland
next prev parent reply other threads:[~2008-06-27 23:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-27 12:30 BUG (v1.5.6.1): ./configure missing check for zlib.h Mircea Bardac
2008-06-27 14:46 ` Jakub Narebski
2008-06-27 15:07 ` tom fogal
2008-06-27 23:03 ` Jakub Narebski [this message]
2008-06-29 3:13 ` Ian Hilt
2008-06-27 15:15 ` Mircea Bardac
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200806280103.19302.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=dev@mircea.bardac.net \
--cc=git@vger.kernel.org \
--cc=tfogal@alumni.unh.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).