{"thread":{"id":"14182","subject":"BUG (v1.5.6.1): ./configure missing check for zlib.h","startedAt":"2008-06-27T12:30:29Z","lastAt":"2008-06-29T03:13:55Z","messageCount":6,"participants":["Mircea Bardac","Jakub Narebski","tom fogal","Ian Hilt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"81382","messageId":"4864DD65.1080402@mircea.bardac.net","threadId":"14182","inReplyTo":null,"subject":"BUG (v1.5.6.1): ./configure missing check for zlib.h","fromName":"Mircea Bardac","fromEmail":"dev@mircea.bardac.net","sentAt":"2008-06-27T12:30:29Z","receivedAt":"2008-06-27T12:30:29Z","isPatch":false,"sender":{"key":"dev@mircea.bardac.net","avatar":"https://gravatar.com/avatar/9cf887bf86f677aafb60f450e5898c0342283ebf3633c9bdbec1233256f2510f?d=mp&s=160"},"body":"$ ./configure\nconfigure: CHECKS for programs\nchecking for cc... cc\nchecking for C compiler default output file name... a.out\nchecking whether the C compiler works... yes\nchecking whether we are cross compiling... no\nchecking for suffix of executables...\nchecking for suffix of object files... o\nchecking whether we are using the GNU C compiler... yes\nchecking whether cc accepts -g... yes\nchecking for cc option to accept ANSI C... none needed\nchecking for gar... no\nchecking for ar... ar\nchecking for gtar... no\nchecking for tar... tar\nchecking for asciidoc... no\nconfigure: CHECKS for libraries\nchecking for SHA1_Init in -lcrypto... no\nchecking for SHA1_Init in -lssl... no\nchecking for curl_global_init in -lcurl... no\nchecking for XML_ParserCreate in -lexpat... no\nchecking for iconv in -lc... yes\nchecking for deflateBound in -lz... no\nchecking for socket in -lc... yes\nconfigure: CHECKS for header files\nchecking how to run the C preprocessor... cc -E\nchecking for egrep... grep -E\nchecking for ANSI C header files... yes\nchecking for sys/types.h... yes\nchecking for sys/stat.h... yes\nchecking for stdlib.h... yes\nchecking for string.h... yes\nchecking for memory.h... yes\nchecking for strings.h... yes\nchecking for inttypes.h... yes\nchecking for stdint.h... yes\nchecking for unistd.h... yes\nchecking sys/select.h usability... yes\nchecking sys/select.h presence... yes\nchecking for sys/select.h... yes\nchecking for old iconv()... no\nconfigure: CHECKS for typedefs, structures, and compiler characteristics\nchecking for struct dirent.d_ino... yes\nchecking for struct dirent.d_type... yes\nchecking for struct sockaddr_storage... yes\nchecking for struct addrinfo... yes\nchecking for getaddrinfo... yes\nchecking whether formatted IO functions support C99 size specifiers... yes\nchecking whether system succeeds to read fopen'ed directory... no\nchecking whether snprintf() and/or vsnprintf() return bogus value... no\nconfigure: CHECKS for library functions\nchecking for strcasestr... yes\nchecking for memmem... yes\nchecking for strlcpy... no\nchecking for strtoumax... yes\nchecking for setenv... yes\nchecking for unsetenv... yes\nchecking for mkdtemp... yes\nconfigure: CHECKS for site configuration\nconfigure: creating ./config.status\nconfig.status: creating config.mak.autogen\n\n$ make\nGIT_VERSION = 1.5.6.1\n     * new build flags or prefix\n     CC daemon.o\nIn file included from daemon.c:1:\ncache.h:9:18: error: zlib.h: No such file or directory\nmake: *** [daemon.o] Error 1\n\n(installing zlib1g-dev on Ubuntu 7.10 fixed the problem)\n\n--\nMircea\nhttp://mircea.bardac.net\n"},{"id":"81406","messageId":"m3prq3hr6n.fsf@localhost.localdomain","threadId":"14182","inReplyTo":"4864DD65.1080402@mircea.bardac.net","subject":"Re: BUG (v1.5.6.1): ./configure missing check for zlib.h","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-06-27T14:46:50Z","receivedAt":"2008-06-27T14:46:50Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Mircea Bardac <dev@mircea.bardac.net> writes:\n\n> $ ./configure\n[...]\n> configure: CHECKS for header files\n\nHere ./configure check for existence of heder files, but only those\nthat can be skipped by defining some macro...\n\n> configure: CHECKS for site configuration\n\n...and here is check for --with-zlib=<path to zlib>\n\n> configure: creating ./config.status\n> config.status: creating config.mak.autogen\n> \n> $ make\n> GIT_VERSION = 1.5.6.1\n>      * new build flags or prefix\n>      CC daemon.o\n> In file included from daemon.c:1:\n> cache.h:9:18: error: zlib.h: No such file or directory\n> make: *** [daemon.o] Error 1\n> \n> (installing zlib1g-dev on Ubuntu 7.10 fixed the problem)\n\nWhat should ./configure do (what ./configure for other programs\nor packages do)?\n\nYou cannot compile git without zlib!\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"81412","messageId":"20080627150732.D88F64B4002@artemis.sr.unh.edu","threadId":"14182","inReplyTo":"m3prq3hr6n.fsf@localhost.localdomain","subject":"Re: BUG (v1.5.6.1): ./configure missing check for zlib.h","fromName":"tom fogal","fromEmail":"tfogal@alumni.unh.edu","sentAt":"2008-06-27T15:07:32Z","receivedAt":"2008-06-27T15:07:32Z","isPatch":false,"sender":{"key":"tfogal@alumni.unh.edu","avatar":"https://gravatar.com/avatar/a2f71bfbe12b2b73cad0be2386d554aa403fff7a89df2f79e812c97c7eab0498?d=mp&s=160"},"body":"Jakub Narebski <jnareb@gmail.com> writes:\n> Mircea Bardac <dev@mircea.bardac.net> writes:\n> \n> > $ ./configure\n> [...]\n> > configure: CHECKS for header files\n> > In file included from daemon.c:1:\n> > cache.h:9:18: error: zlib.h: No such file or directory\n> > make: *** [daemon.o] Error 1\n> > \n> > (installing zlib1g-dev on Ubuntu 7.10 fixed the problem)\n> \n> What should ./configure do (what ./configure for other programs\n> or packages do)?\n\nIf one can determine during configure time that a required library is\nnot found, it (IMHO) is nice to give an error message and bomb out (via\nAC_MSG_ERROR).\n\nThe AC macro archive has a zlib macro which does this, as an example:\n\n   http://autoconf-archive.cryp.to/check_zlib.html\n\nI should note, however, that I disagree with that macro's logic in that\nit `searches' for zlib if the user does not specify it.  IMO, if the\nuser does not give a --with option, and it doesn't work `out of the\nbox' (without hacking FLAGS), macros should die with an error rather\nthan retry with changed FLAGS.\n\n-tom\n"},{"id":"81411","messageId":"48650413.2080001@mircea.bardac.net","threadId":"14182","inReplyTo":"m3prq3hr6n.fsf@localhost.localdomain","subject":"Re: BUG (v1.5.6.1): ./configure missing check for zlib.h","fromName":"Mircea Bardac","fromEmail":"dev@mircea.bardac.net","sentAt":"2008-06-27T15:15:31Z","receivedAt":"2008-06-27T15:15:31Z","isPatch":false,"sender":{"key":"dev@mircea.bardac.net","avatar":"https://gravatar.com/avatar/9cf887bf86f677aafb60f450e5898c0342283ebf3633c9bdbec1233256f2510f?d=mp&s=160"},"body":"Jakub Narebski wrote:\n> Mircea Bardac <dev@mircea.bardac.net> writes:\n> \n>> $ ./configure\n> [...]\n>> configure: CHECKS for header files\n> \n> Here ./configure check for existence of heder files, but only those\n> that can be skipped by defining some macro...\n\n> [...]\n>>\n>> (installing zlib1g-dev on Ubuntu 7.10 fixed the problem)\n> \n> What should ./configure do (what ./configure for other programs\n> or packages do)?\n> \n> You cannot compile git without zlib!\n\nWell, as far as I know, if a program depends on any external headers, \nthey should *all* be checked, not only \"those that can be skipped by \ndefining some macro\" (I personally do not know which are these).\n\nMircea\n\n--\nhttp://mircea.bardac.net\n"},{"id":"81509","messageId":"200806280103.19302.jnareb@gmail.com","threadId":"14182","inReplyTo":"20080627150732.D88F64B4002@artemis.sr.unh.edu","subject":"Re: BUG (v1.5.6.1): ./configure missing check for zlib.h","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-06-27T23:03:18Z","receivedAt":"2008-06-27T23:03:18Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"On Fri, 27 Jun 2008, tom fogal wrote:\n> Jakub Narebski <jnareb@gmail.com> writes:\n>> Mircea Bardac <dev@mircea.bardac.net> writes:\n>> \n>>> $ ./configure\n>> [...]\n>>> configure: CHECKS for header files\n>>> In file included from daemon.c:1:\n>>> cache.h:9:18: error: zlib.h: No such file or directory\n>>> make: *** [daemon.o] Error 1\n>>> \n>>> (installing zlib1g-dev on Ubuntu 7.10 fixed the problem)\n>> \n>> What should ./configure do (what ./configure for other programs\n>> or packages do)?\n>> \n>> You cannot compile git without zlib!\n> \n> If one can determine during configure time that a required library is\n> not found, it (IMHO) is nice to give an error message and bomb out (via\n> AC_MSG_ERROR).\n> \n> The AC macro archive has a zlib macro which does this, as an example:\n> \n>    http://autoconf-archive.cryp.to/check_zlib.html\n> \n> I should note, however, that I disagree with that macro's logic in that\n> it `searches' for zlib if the user does not specify it.  IMO, if the\n> user does not give a --with option, and it doesn't work `out of the\n> box' (without hacking FLAGS), macros should die with an error rather\n> than retry with changed FLAGS.\n\nOn Fri, 27 Jun 2008, Mircea Bardac wrote:\n>\n> Well, as far as I know, if a program depends on any external headers, \n> they should *all* be checked, not only \"those that can be skipped by \n> defining some macro\" (I personally do not know which are these).\n\nIn git (not like usually in other projects) ./configure script (autoconf)\nis used *only* to generate Makefile configuration.  It tries to configure\ncompile (build) process in such a way that building git is possible even\nif some features are missing or are found not in standard place (and also\nuse compat version of functions if they are not in library).  It helps you\nbuild system.\n\nI'm not sure if checking if prerequisites exists and failing loudly\notherwise would be a good feature to have.  Git would fail anyway during\nbuild process, so it is not some new feature.  The only advantage is that\nrequired and unavoidable dependency would be found earlier; on the other\nhand there is now disadvantage of build process (./configure process)\nif it misdetects lack of needed header files, i.e. it is possible to\ncompile (build) git, but ./configure detects that it is not so.  This\nhappened once to me, and is very annoying...\n\nBut as they say, \"code speaks louder than words\"\n\n-- \nJakub Narebski\nPoland\n"},{"id":"81594","messageId":"alpine.LFD.1.10.0806282311100.3218@sys-0.hiltweb.site","threadId":"14182","inReplyTo":"20080627150732.D88F64B4002@artemis.sr.unh.edu","subject":"Re: BUG (v1.5.6.1): ./configure missing check for zlib.h","fromName":"Ian Hilt","fromEmail":"ian.hilt@gmx.com","sentAt":"2008-06-29T03:13:55Z","receivedAt":"2008-06-29T03:13:55Z","isPatch":false,"sender":{"key":"ian.hilt@gmx.com","avatar":null},"body":"On Fri, 27 Jun 2008 at 11:07am -0000, tom fogal wrote:\n\n> I should note, however, that I disagree with that macro's logic in that\n> it `searches' for zlib if the user does not specify it.  IMO, if the\n> user does not give a --with option, and it doesn't work `out of the\n> box' (without hacking FLAGS), macros should die with an error rather\n> than retry with changed FLAGS.\n> \n> -tom\n\nOr, one could read the INSTALL file included with git,\n\n - Git is reasonably self-sufficient, but does depend on a few external\n   programs and libraries:\n\n\t- \"zlib\", the compression library. Git won't build without it.\n\n-- \nIan Hilt\nIan.Hilt (at) gmx.com\nGnuPG key: 0x4AFC1EE3\n"}]}