git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* BUG (v1.5.6.1): ./configure missing check for zlib.h
@ 2008-06-27 12:30 Mircea Bardac
  2008-06-27 14:46 ` Jakub Narebski
  0 siblings, 1 reply; 6+ messages in thread
From: Mircea Bardac @ 2008-06-27 12:30 UTC (permalink / raw)
  To: git

$ ./configure
configure: CHECKS for programs
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ANSI C... none needed
checking for gar... no
checking for ar... ar
checking for gtar... no
checking for tar... tar
checking for asciidoc... no
configure: CHECKS for libraries
checking for SHA1_Init in -lcrypto... no
checking for SHA1_Init in -lssl... no
checking for curl_global_init in -lcurl... no
checking for XML_ParserCreate in -lexpat... no
checking for iconv in -lc... yes
checking for deflateBound in -lz... no
checking for socket in -lc... yes
configure: CHECKS for header files
checking how to run the C preprocessor... cc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking for old iconv()... no
configure: CHECKS for typedefs, structures, and compiler characteristics
checking for struct dirent.d_ino... yes
checking for struct dirent.d_type... yes
checking for struct sockaddr_storage... yes
checking for struct addrinfo... yes
checking for getaddrinfo... yes
checking whether formatted IO functions support C99 size specifiers... yes
checking whether system succeeds to read fopen'ed directory... no
checking whether snprintf() and/or vsnprintf() return bogus value... no
configure: CHECKS for library functions
checking for strcasestr... yes
checking for memmem... yes
checking for strlcpy... no
checking for strtoumax... yes
checking for setenv... yes
checking for unsetenv... yes
checking for mkdtemp... yes
configure: CHECKS for site configuration
configure: creating ./config.status
config.status: creating config.mak.autogen

$ make
GIT_VERSION = 1.5.6.1
     * new build flags or prefix
     CC daemon.o
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)

--
Mircea
http://mircea.bardac.net

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: BUG (v1.5.6.1): ./configure missing check for zlib.h
  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 15:15   ` Mircea Bardac
  0 siblings, 2 replies; 6+ messages in thread
From: Jakub Narebski @ 2008-06-27 14:46 UTC (permalink / raw)
  To: Mircea Bardac; +Cc: git

Mircea Bardac <dev@mircea.bardac.net> writes:

> $ ./configure
[...]
> configure: CHECKS for header files

Here ./configure check for existence of heder files, but only those
that can be skipped by defining some macro...

> configure: CHECKS for site configuration

...and here is check for --with-zlib=<path to zlib>

> configure: creating ./config.status
> config.status: creating config.mak.autogen
> 
> $ make
> GIT_VERSION = 1.5.6.1
>      * new build flags or prefix
>      CC daemon.o
> 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!
-- 
Jakub Narebski
Poland
ShadeHawk on #git

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: BUG (v1.5.6.1): ./configure missing check for zlib.h
  2008-06-27 14:46 ` Jakub Narebski
@ 2008-06-27 15:07   ` tom fogal
  2008-06-27 23:03     ` Jakub Narebski
  2008-06-29  3:13     ` Ian Hilt
  2008-06-27 15:15   ` Mircea Bardac
  1 sibling, 2 replies; 6+ messages in thread
From: tom fogal @ 2008-06-27 15:07 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: git

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)?

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.

-tom

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: BUG (v1.5.6.1): ./configure missing check for zlib.h
  2008-06-27 14:46 ` Jakub Narebski
  2008-06-27 15:07   ` tom fogal
@ 2008-06-27 15:15   ` Mircea Bardac
  1 sibling, 0 replies; 6+ messages in thread
From: Mircea Bardac @ 2008-06-27 15:15 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: git

Jakub Narebski wrote:
> Mircea Bardac <dev@mircea.bardac.net> writes:
> 
>> $ ./configure
> [...]
>> configure: CHECKS for header files
> 
> Here ./configure check for existence of heder files, but only those
> that can be skipped by defining some macro...

> [...]
>>
>> (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!

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).

Mircea

--
http://mircea.bardac.net

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: BUG (v1.5.6.1): ./configure missing check for zlib.h
  2008-06-27 15:07   ` tom fogal
@ 2008-06-27 23:03     ` Jakub Narebski
  2008-06-29  3:13     ` Ian Hilt
  1 sibling, 0 replies; 6+ messages in thread
From: Jakub Narebski @ 2008-06-27 23:03 UTC (permalink / raw)
  To: Mircea Bardac; +Cc: Tom Fogal, git

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: BUG (v1.5.6.1): ./configure missing check for zlib.h
  2008-06-27 15:07   ` tom fogal
  2008-06-27 23:03     ` Jakub Narebski
@ 2008-06-29  3:13     ` Ian Hilt
  1 sibling, 0 replies; 6+ messages in thread
From: Ian Hilt @ 2008-06-29  3:13 UTC (permalink / raw)
  To: tom fogal; +Cc: Jakub Narebski, git

On Fri, 27 Jun 2008 at 11:07am -0000, tom fogal wrote:

> 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.
> 
> -tom

Or, one could read the INSTALL file included with git,

 - Git is reasonably self-sufficient, but does depend on a few external
   programs and libraries:

	- "zlib", the compression library. Git won't build without it.

-- 
Ian Hilt
Ian.Hilt (at) gmx.com
GnuPG key: 0x4AFC1EE3

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-06-29  3:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2008-06-29  3:13     ` Ian Hilt
2008-06-27 15:15   ` Mircea Bardac

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).