From owner-freebsd-ports@FreeBSD.ORG Tue Mar 30 23:20:58 2010 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A323B106564A; Tue, 30 Mar 2010 23:20:58 +0000 (UTC) (envelope-from fluffy@freebsd.org) Received: from ns.ael.RU (ns.ael.ru [62.76.207.226]) by mx1.freebsd.org (Postfix) with ESMTP id 053238FC1B; Tue, 30 Mar 2010 23:20:57 +0000 (UTC) Received: from Fluffy.Khv.RU (dhcp-14.local.ael [192.168.100.14]) by ns.ael.RU (8.14.3/8.14.3/Fluffy/5.3) with ESMTP id o2UN8WjB045655; Wed, 31 Mar 2010 10:08:33 +1100 (VLAST) (envelope-from fluffy@freebsd.org) Received: from Fluffy.Khv.RU (localhost [127.0.0.1]) by Fluffy.Khv.RU (8.14.4/8.14.4/Fluffy/5.4.1) with ESMTP id o2UN7Lfl049202; Wed, 31 Mar 2010 10:07:27 +1100 (VLAST) (envelope-from fluffy@freebsd.org) Received: (from fluffy@localhost) by Fluffy.Khv.RU (8.14.4/8.14.4/Submit) id o2UN6STM049138; Wed, 31 Mar 2010 10:06:28 +1100 (VLAST) (envelope-from fluffy@freebsd.org) From: Dima Panov Organization: The FreeBSD Project To: kde-freebsd@kde.org, d@delphij.net Date: Wed, 31 Mar 2010 10:06:21 +1100 User-Agent: KMail/1.13.1 (FreeBSD/9.0-900010-CURRENT; KDE/4.4.2; amd64; ; ) References: <4BB23953.7000606@FreeBSD.org> <4BB24F6F.2080908@FreeBSD.org> <4BB251D1.80505@delphij.net> In-Reply-To: <4BB251D1.80505@delphij.net> X-Face: "RE-2'yS-N:*/7DHOjQ%Az<.+SG>K7B'k(&; qb0K4]Hv>J}"l9,=:m2_]-3S/}`b\]yA-g !y3en*Zl(i-86iM?Q[w@!=rW&JdT>KHW@dri>+qMcy42O, 5#izEqa-K+=B<@A X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (ns.ael.RU [192.168.1.1]); Wed, 31 Mar 2010 10:08:33 +1100 (VLAST) X-Spam-Status: No, score=-104.4 required=3.0 tests=ALL_TRUSTED,BAYES_00, USER_IN_WHITELIST autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on ns.ael.RU Cc: Dirk Meyer , Doug Barton , kde@freebsd.org, freebsd-ports@freebsd.org Subject: Re: [kde-freebsd] x11-toolkits/qt4-gui fails with png and/or zlib.h off64_t X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 23:20:58 -0000 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 > #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