x11-toolkits/qt4-gui fails with png and/or zlib.h off64_t

Xin LI delphij at delphij.net
Tue Mar 30 19:32:46 UTC 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2010/03/30 12:22, Doug Barton wrote:
> Testing it again I see that I didn't go far enough up to find the real
> error, sorry Dirk.
> 
> The actual problem seems to be with zlib.h. This is from qt4-gui:
[...]
> -DQ_INTERNAL_QAPP_SRC -DQT_CORE_LIB -D_LARGEFILE64_SOURCE
> -D_LARGEFILE_SOURCE -I/usr/local/share/qt4/mkspecs/freebsd-g++ -I.

There are some discussion about these _LARGEFILE64_SOURCE usage on zlib
developers' mailing list.

To put it short, it's now believed that the usage of _LARGEFILE64_SOURCE
on FreeBSD is wrong.  I'm not quite sure though, if I should use some
workaround over this, like Mac OS X did (newer zlib has a similar change
by requiring _LFS64_SOURCE):

Index: zconf.h
===================================================================
- --- zconf.h	(revision 205883)
+++ zconf.h	(working copy)
@@ -375,7 +375,7 @@
 #  endif
 #endif

- -#ifdef _LARGEFILE64_SOURCE
+#if defined(_LARGEFILE64_SOURCE) && !defined(__FreeBSD__)
 #  include <sys/types.h>
 #endif

Index: zlib.h
===================================================================
- --- zlib.h	(revision 205883)
+++ zlib.h	(working copy)
@@ -1556,7 +1556,7 @@
         inflateBackInit_((strm), (windowBits), (window), \
                                             ZLIB_VERSION, sizeof(z_stream))

- -#ifdef _LARGEFILE64_SOURCE
+#if defined(_LARGEFILE64_SOURCE) && !defined(__FreeBSD__)
    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));

Cheers,
- -- 
Xin LI <delphij at delphij.net>	http://www.delphij.net/
FreeBSD - The Power to Serve!	       Live free or die
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iQEcBAEBAgAGBQJLslHRAAoJEATO+BI/yjfBXOUIAKW6UkjU8JGw2CQyNWVhqxXg
dz1OKJVk5iS1abpPANZPPWRnl/XK2MiDIVdkc5HQCCbFIuodR4nWlbZN21yGMJvf
DZX3L15nhXE7LSMLxOgrfzqlgIRxnu6P/7mjlZq/y/TERrpHh48lN7HcHfRrWZd4
H/dFdSQbL81T7/LGPmrHOsR9uXPOmlaa1hUMCgJhNl2S6AahfyfcEj5hQeCBXqHd
ms9gORkFuMb9LStS3kaTSpb6/D81ci+WbGpHozIA1zGyTazyj9AJjFkYHhC9VZLF
9kSGF3yuD95pGHrOrZJQSyTNBMtWFAoLm1qMMZu+D8b1vpP3AnVdSGVhTR8QrM8=
=vFcJ
-----END PGP SIGNATURE-----


More information about the freebsd-ports mailing list