Date: Thu, 01 Apr 2010 13:11:14 -0700 From: Xin LI <delphij@delphij.net> To: Doug Barton <dougb@FreeBSD.org> Cc: "freebsd-ports@FreeBSD.org" <freebsd-ports@FreeBSD.org>, multimedia@FreeBSD.org Subject: Re: multimedia/gpac-libgpac fails with zlib problem on -current Message-ID: <4BB4FDE2.5050200@delphij.net> In-Reply-To: <4BB4ECE5.6080204@FreeBSD.org> References: <4BB4ECE5.6080204@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------080608030207030203060804 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2010/04/01 11:58, Doug Barton wrote: > I'm running today's -current r206052 which includes the latest zlib > update. I'm getting the following error. I tried rebuilding libxml2 just > in case, didn't help. Sorry it's a regression I think. zlib is trying to enforce too strict check which I didn't found a clue at e.g. glibc's manual, I'll post a patch to fix this issue. In the meantime I think the attached patch (zlib-freebsd.diff) would fix this exact problem. I'll send the zlib.diff for upstream's review. > cc -O3 -pipe -g -I/usr/local/include -g -fno-strict-aliasing > -Wno-pointer-sign > -I/usr/local/tmp/usr/local/ports/multimedia/gpac-libgpac/work/gpac/include > -I../ -DGPAC_HAVE_CONFIG_H -c -o utils/xml_parser.o utils/xml_parser.c > In file included from /usr/include/zlib.h:34, > from utils/xml_parser.c:30: > /usr/include/zconf.h:367:53: error: operator '||' has no right operand > In file included from utils/xml_parser.c:30: > /usr/include/zlib.h:1559:25: error: operator '==' has no left operand > gmake: *** [utils/xml_parser.o] Error 1 > *** Error code 1 > > Stop in /usr/local/ports/multimedia/gpac-libgpac. > *** Error code 1 > > - -- Xin LI <delphij@delphij.net> http://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iQEcBAEBAgAGBQJLtP3iAAoJEATO+BI/yjfBwmIIAMZj6PcSa64ky6Wul6of0YSd /onpT3oL3+E6j8c5u3wlJka8L5Deczx8nkhem2bg8Vy7WaToraHzXCJj9aWdz03Y 8Uj7kheJE3uyaV3LbZmrCrp4stgZzwMAgsYP09p9XQ1d3PrTLvAs9C3jo06FR1xu OJIk3y0YW/8OMKmIE3sTnE2AOahODqDQYAVYsb25jDaoug7h4unQSTqn+H8e6EVM d1RtemMNsIJaZ/FmgHrpUeS/hEtIaAGq8arzrF1U5aIF6SL5RG94e0eXvC89hv/m cWE/8GXeqDrXceevv9IzmE/wfEmMYTBMDEGnMccHOUrW4nJ1EwXelDt6cUAvWlo= =S+Wp -----END PGP SIGNATURE----- --------------080608030207030203060804 Content-Type: text/plain; name="zlib-freebsd.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="zlib-freebsd.diff" Index: zconf.h =================================================================== --- zconf.h (revision 206052) +++ zconf.h (working copy) @@ -364,7 +364,7 @@ # define Z_HAVE_UNISTD_H #endif -#if defined(Z_HAVE_UNISTD_H) || _LARGEFILE64_SOURCE == 1 +#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) # include <sys/types.h> /* for off_t */ # include <unistd.h> /* for SEEK_* and off_t */ # ifdef VMS Index: zlib.h =================================================================== --- zlib.h (revision 206052) +++ zlib.h (working copy) @@ -1556,7 +1556,7 @@ inflateBackInit_((strm), (windowBits), (window), \ ZLIB_VERSION, sizeof(z_stream)) -#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1 +#if defined(_LARGEFILE64_SOURCE) && defined(_LFS64_LARGEFILE) ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); ZEXTERN off64_t ZEXPORT gzseek64 OF((gzFile, off64_t, int)); ZEXTERN off64_t ZEXPORT gztell64 OF((gzFile)); @@ -1565,7 +1565,7 @@ ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off64_t)); #endif -#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS == 64 && _LFS64_LARGEFILE == 1 +#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS == 64 && defined(_LFS64_LARGEFILE) # define gzopen gzopen64 # define gzseek gzseek64 # define gztell gztell64 --------------080608030207030203060804 Content-Type: text/plain; name="zlib.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="zlib.diff" diff -r 51ec3753a4e7 gzguts.h --- a/gzguts.h Wed Mar 31 10:38:51 2010 -0700 +++ b/gzguts.h Thu Apr 01 13:05:31 2010 -0700 @@ -3,7 +3,7 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ -#if _LARGEFILE64_SOURCE == 1 +#if defined(_LARGEFILE64_SOURCE) # ifndef _LARGEFILE_SOURCE # define _LARGEFILE_SOURCE 1 # endif @@ -56,7 +56,7 @@ # endif #endif -#if _LARGEFILE64_SOURCE == 1 +#if defined(_LARGEFILE64_SOURCE) # define z_off64_t off64_t #else # define z_off64_t z_off_t diff -r 51ec3753a4e7 gzlib.c --- a/gzlib.c Wed Mar 31 10:38:51 2010 -0700 +++ b/gzlib.c Thu Apr 01 13:05:31 2010 -0700 @@ -5,7 +5,7 @@ #include "gzguts.h" -#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1 +#if defined(_LARGEFILE64_SOURCE) && defined(_LFS64_LARGEFILE) # define LSEEK lseek64 #else # define LSEEK lseek diff -r 51ec3753a4e7 zconf.h --- a/zconf.h Wed Mar 31 10:38:51 2010 -0700 +++ b/zconf.h Thu Apr 01 13:05:31 2010 -0700 @@ -364,7 +364,7 @@ # define Z_HAVE_UNISTD_H #endif -#if defined(Z_HAVE_UNISTD_H) || _LARGEFILE64_SOURCE == 1 +#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) # include <sys/types.h> /* for off_t */ # include <unistd.h> /* for SEEK_* and off_t */ # ifdef VMS diff -r 51ec3753a4e7 zconf.h.cmakein --- a/zconf.h.cmakein Wed Mar 31 10:38:51 2010 -0700 +++ b/zconf.h.cmakein Thu Apr 01 13:05:31 2010 -0700 @@ -366,7 +366,7 @@ # define Z_HAVE_UNISTD_H #endif -#if defined(Z_HAVE_UNISTD_H) || _LARGEFILE64_SOURCE == 1 +#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) # include <sys/types.h> /* for off_t */ # include <unistd.h> /* for SEEK_* and off_t */ # ifdef VMS diff -r 51ec3753a4e7 zconf.h.in --- a/zconf.h.in Wed Mar 31 10:38:51 2010 -0700 +++ b/zconf.h.in Thu Apr 01 13:05:31 2010 -0700 @@ -364,7 +364,7 @@ # define Z_HAVE_UNISTD_H #endif -#if defined(Z_HAVE_UNISTD_H) || _LARGEFILE64_SOURCE == 1 +#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) # include <sys/types.h> /* for off_t */ # include <unistd.h> /* for SEEK_* and off_t */ # ifdef VMS diff -r 51ec3753a4e7 zlib.h --- a/zlib.h Wed Mar 31 10:38:51 2010 -0700 +++ b/zlib.h Thu Apr 01 13:05:31 2010 -0700 @@ -1556,7 +1556,7 @@ inflateBackInit_((strm), (windowBits), (window), \ ZLIB_VERSION, sizeof(z_stream)) -#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1 +#if defined(_LARGEFILE64_SOURCE) && defined(_LFS64_LARGEFILE) ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); ZEXTERN off64_t ZEXPORT gzseek64 OF((gzFile, off64_t, int)); ZEXTERN off64_t ZEXPORT gztell64 OF((gzFile)); @@ -1565,14 +1565,14 @@ ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off64_t)); #endif -#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS == 64 && _LFS64_LARGEFILE == 1 +#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS == 64 && defined(_LFS64_LARGEFILE) # define gzopen gzopen64 # define gzseek gzseek64 # define gztell gztell64 # define gzoffset gzoffset64 # define adler32_combine adler32_combine64 # define crc32_combine crc32_combine64 -# if _LARGEFILE64_SOURCE != 1 +# if !defined(_LARGEFILE64_SOURCE) ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); ZEXTERN off_t ZEXPORT gzseek64 OF((gzFile, off_t, int)); ZEXTERN off_t ZEXPORT gztell64 OF((gzFile)); diff -r 51ec3753a4e7 zutil.h --- a/zutil.h Wed Mar 31 10:38:51 2010 -0700 +++ b/zutil.h Thu Apr 01 13:05:31 2010 -0700 @@ -154,14 +154,14 @@ #pragma warn -8066 #endif -#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1 +#if defined(_LARGEFILE64_SOURCE) && defined(_LFS64_LARGEFILE) # define z_off64_t off64_t #else # define z_off64_t z_off_t #endif /* provide prototypes for these when building zlib without LFS */ -#if _LARGEFILE64_SOURCE != 1 || _LFS64_LARGEFILE != 1 +#if !defined(_LARGEFILE64_SOURCE) || !defined(_LFS64_LARGEFILE) ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); ZEXTERN off_t ZEXPORT gzseek64 OF((gzFile, off_t, int)); ZEXTERN off_t ZEXPORT gztell64 OF((gzFile)); --------------080608030207030203060804--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4BB4FDE2.5050200>