Re: BUG (v1.5.6.1): ./configure missing check for zlib.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 27 Jun 2008, tom fogal wrote:
> Jakub Narebski <jnareb@xxxxxxxxx> writes:
>> Mircea Bardac <dev@xxxxxxxxxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux