From owner-freebsd-ports@FreeBSD.ORG Wed Feb 24 15:07:24 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 E5CBA1065672; Wed, 24 Feb 2010 15:07:24 +0000 (UTC) (envelope-from kamikaze@bsdforen.de) Received: from mail.bsdforen.de (bsdforen.de [212.204.60.79]) by mx1.freebsd.org (Postfix) with ESMTP id 6D1358FC1D; Wed, 24 Feb 2010 15:07:24 +0000 (UTC) Received: from mobileKamikaze.norad (vpn-cl-164-120.rz.uni-karlsruhe.de [141.3.164.120]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bsdforen.de (Postfix) with ESMTP id 6DB5E8A16F0; Wed, 24 Feb 2010 16:07:23 +0100 (CET) Message-ID: <4B8540AB.9040807@bsdforen.de> Date: Wed, 24 Feb 2010 16:07:23 +0100 From: Dominic Fandrey User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-GB; rv:1.9.1.7) Gecko/20100216 Thunderbird/3.0.1 MIME-Version: 1.0 To: freebsd-ports@freebsd.org References: <4ADFFB1D.2070003@bsdforen.de> In-Reply-To: <4ADFFB1D.2070003@bsdforen.de> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: ale@FreeBSD.org Subject: Re: php5-gd PNG support broken 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: Wed, 24 Feb 2010 15:07:25 -0000 On 22/10/2009 08:26, Dominic Fandrey wrote: > I've got the following problem with php5-gd: > > Warning: imagecreatefrompng() [function.imagecreatefrompng]: gd-png: fatal libpng error: [00][00][00][00]: unknown critical chunk in /usr/home/kamikaze/devel/workspace/realmsofsorrow/nightmare/core/nmTemplate.class.php on line 385 > > Warning: imagecreatefrompng() [function.imagecreatefrompng]: gd-png error: setjmp returns error condition in /usr/home/kamikaze/devel/workspace/realmsofsorrow/nightmare/core/nmTemplate.class.php on line 385 > > Warning: imagecreatefrompng() [function.imagecreatefrompng]: './templates/neo/layout/header_stretch.png' is not a valid PNG file in /usr/home/kamikaze/devel/workspace/realmsofsorrow/nightmare/core/nmTemplate.class.php on line 385 > > > I get this message for all PNGs. I checked the files with Firefox, > and Gimp, they are all whole. They are also displayed by the e17 > file browser, which relies on libpng. The problem still persists! > My system: > FreeBSD mobileKamikaze.norad 7.2-STABLE FreeBSD 7.2-STABLE #0: Fri Jul 3 10:26:33 CEST 2009 root@mobileKamikaze.norad:/usr/obj/HP6510b/amd64/usr/src/sys/HP6510b amd64 My system, now: FreeBSD mobileKamikaze.norad 8.0-STABLE FreeBSD 8.0-STABLE #1: Tue Feb 23 10:37:52 CET 2010 root@mobileKamikaze.norad:/usr/obj/HP6510b-8/amd64/usr/src/sys/HP6510b-8 amd64 > libpng: > png-1.2.40 libpng, now: png-1.2.42 > php5-gd: > php5-gd-5.2.11_1 php5-gd, now: php5-gd-5.2.12 I have found a workaround: # env LD_PRELOAD=/usr/local/lib/libpng.so.5 /usr/local/etc/rc.d/apache22 restart I find the implications deeply troubling. Note that ldd has no problems locating the library: # ldd /usr/local/lib/php/20060613/gd.so /usr/local/lib/php/20060613/gd.so: ... libpng.so.5 => /usr/local/lib/libpng.so.5 (0x80120d000) ... So why does the apache module fail to load it? Why do I have to force the runtime linker to do so? -- A: Because it fouls the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail?