Re: [Bug-wget] Cannot compile current bzr trunk: undefined reference to `gzwrite' / `gzclose' / `gzdopen'
Gijs van Tulder gvtul...@gmail.com writes: Hi all, The attached patch should hopefully fix Evgenii's problem. The patch changes the configure script to always use libz, unless it is explicitly disabled. In that case, the patch makes sure that the WARC functions do not use gzip but write to uncompressed files instead. Thanks for the contribution, the patch looks correct, I am going to apply it. Cheers, Giuseppe
Re: [Bug-wget] Cannot compile current bzr trunk: undefined reference to `gzwrite' / `gzclose' / `gzdopen'
Hi all, The attached patch should hopefully fix Evgenii's problem. The patch changes the configure script to always use libz, unless it is explicitly disabled. In that case, the patch makes sure that the WARC functions do not use gzip but write to uncompressed files instead. The funny thing is that libz was already included with the SSL support. Unless you compiled wget with --without-ssl, libz was always compiled in (even if you configured with --without-zlib). Regards, Gijs Op 09-01-12 02:15 schreef Evgenii Philippov: Actually I currently close my work on wget. So these messages are just bug reports for wget collaborators. Some additional info: export PS1=Ok\ Ok uname -asm Linux host_name 2.6.38-13-generic #53-Ubuntu SMP Mon Nov 28 19:33:45 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux Ok lsb_release -dr Description: Ubuntu 11.04 Release: 11.04 Ok With best regards, Thank you for a wonderful utility, -- Evgeniy === modified file 'ChangeLog' --- ChangeLog 2011-12-12 20:30:39 + +++ ChangeLog 2012-01-09 13:40:01 + @@ -1,3 +1,7 @@ +2012-01-09 Gijs van Tulder gvtul...@gmail.com + + * configure.ac: Always try to use libz, even without SSL. + 2011-12-12 Giuseppe Scrivano gscriv...@gnu.org * Makefile.am (EXTRA_DIST): Add build-aux/bzr-version-gen. === modified file 'configure.ac' --- configure.ac 2011-11-04 21:25:00 + +++ configure.ac 2012-01-09 13:40:01 + @@ -65,6 +65,9 @@ [[ --without-ssl disable SSL autodetection --with-ssl={gnutls,openssl} specify the SSL backend. GNU TLS is the default.]]) +AC_ARG_WITH(zlib, +[[ --without-zlib disable zlib ]]) + AC_ARG_ENABLE(opie, [ --disable-opie disable support for opie or s/key FTP login], ENABLE_OPIE=$enableval, ENABLE_OPIE=yes) @@ -234,6 +237,10 @@ dnl Checks for libraries. dnl +AS_IF([test x$with_zlib != xno], [ + AC_CHECK_LIB(z, compress) +]) + AS_IF([test x$with_ssl = xopenssl], [ dnl some versions of openssl use zlib compression AC_CHECK_LIB(z, compress) === modified file 'src/ChangeLog' --- src/ChangeLog 2012-01-08 23:03:23 + +++ src/ChangeLog 2012-01-09 13:40:01 + @@ -1,3 +1,10 @@ +2012-01-09 Gijs van Tulder gvtul...@gmail.com + + * init.c: Disable WARC compression if zlib is disabled. + * main.c: Do not show the 'no-warc-compression' option if zlib is + disabled. + * warc.c: Do not compress WARC files if zlib is disabled. + 2012-01-09 Sasikantha Babu sasikanth@gmail.com (tiny change) * connect.c (connect_to_ip): properly formatted ipv6 address display. (socket_family): New function - returns socket family type. === modified file 'src/init.c' --- src/init.c 2011-11-04 21:25:00 + +++ src/init.c 2012-01-09 13:40:01 + @@ -267,7 +267,9 @@ { waitretry,opt.waitretry, cmd_time }, { warccdx, opt.warc_cdx_enabled, cmd_boolean }, { warccdxdedup, opt.warc_cdx_dedup_filename, cmd_file }, +#ifdef HAVE_LIBZ { warccompression, opt.warc_compression_enabled, cmd_boolean }, +#endif { warcdigests, opt.warc_digests_enabled, cmd_boolean }, { warcfile, opt.warc_filename, cmd_file }, { warcheader, NULL, cmd_spec_warc_header }, @@ -374,7 +376,11 @@ opt.show_all_dns_entries = false; opt.warc_maxsize = 0; /* 1024 * 1024 * 1024; */ +#ifdef HAVE_LIBZ opt.warc_compression_enabled = true; +#else + opt.warc_compression_enabled = false; +#endif opt.warc_digests_enabled = true; opt.warc_cdx_enabled = false; opt.warc_cdx_dedup_filename = NULL; === modified file 'src/main.c' --- src/main.c 2011-11-04 21:25:00 + +++ src/main.c 2012-01-09 13:40:01 + @@ -289,7 +289,9 @@ { wait, 'w', OPT_VALUE, wait, -1 }, { waitretry, 0, OPT_VALUE, waitretry, -1 }, { warc-cdx, 0, OPT_BOOLEAN, warccdx, -1 }, +#ifdef HAVE_LIBZ { warc-compression, 0, OPT_BOOLEAN, warccompression, -1 }, +#endif { warc-dedup, 0, OPT_VALUE, warccdxdedup, -1 }, { warc-digests, 0, OPT_BOOLEAN, warcdigests, -1 }, { warc-file, 0, OPT_VALUE, warcfile, -1 }, @@ -674,8 +676,10 @@ --warc-cdxwrite CDX index files.\n), N_(\ --warc-dedup=FILENAME do not store records listed in this CDX file.\n), +#ifdef HAVE_LIBZ N_(\ --no-warc-compression do not compress WARC files with GZIP.\n), +#endif N_(\ --no-warc-digests do not calculate SHA1 digests.\n), N_(\ === modified file 'src/warc.c' --- src/warc.c 2011-11-20 17:28:19 + +++ src/warc.c 2012-01-09 13:40:01 + @@ -14,7 +14,9 @@ #include sha1.h #include base32.h #include unistd.h +#ifdef HAVE_LIBZ #include zlib.h +#endif #ifdef HAVE_LIBUUID #include uuid/uuid.h #endif @@ -42,6 +44,7 @@ /* The current WARC file (or NULL, if WARC is disabled). */ static FILE *warc_current_file; +#ifdef HAVE_LIBZ /* The gzip stream for the current WARC file (or NULL, if WARC or gzip is disabled). */ static gzFile
Re: [Bug-wget] Cannot compile current bzr trunk: undefined reference to `gzwrite' / `gzclose' / `gzdopen'
On 03.01.2012 02:55, Evgenii Philippov wrote: Hi wget folks, The make fails[...] I've redone the installation process from the very scratch: * ran bzr branch in a newly created folder, * ran bootstrap script. The bootstrap script told warnings: on stdout: Notice from module pipe: This module is deprecated. Use the module 'spawn-pipe' instead. Don't forget to - add ._bootmp/lib/Makefile to AC_CONFIG_FILES in ./configure.ac, - mention lib in SUBDIRS in ._bootmp/Makefile.am, - mention -I ._bootmp/m4 in ACLOCAL_AMFLAGS in Makefile.am, - mention ._bootmp/m4/gnulib-cache.m4 in EXTRA_DIST in Makefile.am, - invoke gl_EARLY in ./configure.ac, right after AC_PROG_CC, - invoke gl_INIT in ./configure.ac. on stderr: ./bootstrap: no version control for build-aux/*? //10 files were hidden by * above cmp: lib/gnulib.mk: No such file or directory ./bootstrap: no version control for lib/*? //204 files were hidden by * above ./bootstrap: no version control for m4/*? //152 files were hidden by * above ./bootstrap: no version control for ./ABOUT-NLS? ./bootstrap: no version control for m4/*? //approx. 15 files were hidden by * above ./bootstrap: no version control for po/*? //approx. 10 files were hidden by * above configure.ac:99: installing `build-aux/compile' configure.ac:56: installing `build-aux/config.guess' configure.ac:56: installing `build-aux/config.sub' configure.ac:51: installing `build-aux/install-sh' configure.ac:51: installing `build-aux/missing' doc/Makefile.am:49: installing `build-aux/mdate-sh' doc/Makefile.am:49: installing `build-aux/texinfo.tex' lib/Makefile.am: installing `build-aux/depcomp' Makefile.am: installing `./INSTALL' * ./configure --without-ssl cat ../configure_out | grep -i gz no lines with gz cat ../configure_out | grep -i zl no lines with zl * make [...warnings skipped] warc.o: In function `warc_write_buffer': warc.c:(.text+0x20): undefined reference to `gzwrite' warc.o: In function `warc_write_end_record': warc.c:(.text+0x6af): undefined reference to `gzclose' warc.o: In function `warc_write_start_record': warc.c:(.text+0x1415): undefined reference to `gzdopen' * Edited trunk/Makefile; changed a line LIBS = -lidn into a line LIBS = -lidn -lz. * Edited trunk/src/Makefile; changed a line LIBS =-lidn $(LIB_CLOCK_GETTIME) into a line LIBS =-lidn $(LIB_CLOCK_GETTIME) -lz. * make It performed OK. * make check tail ../make_check_err warc.c:(.text+0x20): undefined reference to `gzwrite' ../src/libunittest.a(libunittest_a-warc.o): In function `warc_write_end_record': warc.c:(.text+0x6af): undefined reference to `gzclose' ../src/libunittest.a(libunittest_a-warc.o): In function `warc_write_start_record': warc.c:(.text+0x1415): undefined reference to `gzdopen' [skip] * src/wget --version GNU Wget 1.13.4-2578 built on linux-gnu. [skip] So it compiled to a completion, though make check gave errors. I'm too cautious to install such a wget systemwide. -- wbr, e.
Re: [Bug-wget] Cannot compile current bzr trunk: undefined reference to `gzwrite' / `gzclose' / `gzdopen'
Actually I currently close my work on wget. So these messages are just bug reports for wget collaborators. Some additional info: export PS1=Ok\ Ok uname -asm Linux host_name 2.6.38-13-generic #53-Ubuntu SMP Mon Nov 28 19:33:45 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux Ok lsb_release -dr Description:Ubuntu 11.04 Release:11.04 Ok With best regards, Thank you for a wonderful utility, -- Evgeniy
Re: [Bug-wget] Cannot compile current bzr trunk: undefined reference to `gzwrite' / `gzclose' / `gzdopen'
On 02/01/12 19:55, Evgenii Philippov wrote: Hi wget folks, The make fails (see logs below). What can I do to compile wget? Is this case known? Those are provided by zlib (which is however not being linked in, adding -lz probably fixes it). What did configure decide about linking zlib? I think I have done configure --without-zlib, and didn't face those problems.