Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Mar 2010 10:06:21 +1100
From:      Dima Panov <fluffy@freebsd.org>
To:        kde-freebsd@kde.org, d@delphij.net
Cc:        Dirk Meyer <dirk.meyer@dinoex.sub.org>, Doug Barton <dougb@freebsd.org>, kde@freebsd.org, freebsd-ports@freebsd.org
Subject:   Re: [kde-freebsd] x11-toolkits/qt4-gui fails with png and/or zlib.h off64_t
Message-ID:  <201003311006.24714.fluffy@freebsd.org>
In-Reply-To: <4BB251D1.80505@delphij.net>
References:  <4BB23953.7000606@FreeBSD.org> <4BB24F6F.2080908@FreeBSD.org> <4BB251D1.80505@delphij.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 31 March 2010 06:32:33 Xin LI wrote:
> -----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));
> 

Confirmed, with this patch all qt4 builds fine now.

FreeBSD Fluffy.Khv.RU 9.0-900010-CURRENT FreeBSD 9.0-900010-CURRENT #0 r205776M:
Sun Mar 28 15:56:58 VLAST 2010     fluffy@Fluffy.Khv.RU:/usr/obj/usr/src/sys/Spot  amd64


Dima "Red Fox" Panov @ Home | C73E 2B72 1FFD 61BD E206 1234 A626 76ED 93E3 B018
Khabarovsk, Russia          | 2D30 2CCB 9984 130C 6F87 BAFC FB8B A09D D539 8F29
KDE@FreeBSD Team | FreeBSD committer since 10.08.2009 | FreeBSD since Sept 1995
Twitter.com:fluffy_khv | Skype:dima.panov | Jabber.org:fluffy.khv | ICQ:1745024



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003311006.24714.fluffy>