php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21241 make gd_png.lo error when compiled php with-gd
Submitted: 2002-12-28 07:16 UTC Modified: 2003-01-20 04:59 UTC
From: iconmans at yahoo dot com Assigned:
Status: Not a bug Package: GD related
PHP Version: 4.3.0 OS: RedHat Linux 8.0
Private report: No CVE-ID: None
 [2002-12-28 07:16 UTC] iconmans at yahoo dot com
Apache 2.0.43 --enable-so
php 4.3.0 --with-gd --with-zlib --with-mysql=/usr (4.0.7 gamma)

/usr/src/coulera/php-4.3.0/ext/gd/libgd/gd_png.c:737: parse error before '}' token
/usr/src/coulera/php-4.3.0/ext/gd/libgd/gd_png.c:740: parse error before '&' token
/usr/src/coulera/php-4.3.0/ext/gd/libgd/gd_png.c:740: warning: data definition has no type or storage class
/usr/src/coulera/php-4.3.0/ext/gd/libgd/gd_png.c:394: storage size of `open' isn't known
make: *** [ext/gd/libgd/gd_png.lo] Error 1

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-28 07:29 UTC] rasmus@php.net
We'll need a bit more data on this one from you.  It compiles just fine on my RH8 box.  Of course, I don't use Apache2.  But if you build just with the flags you specified you are building the CGI version anyway and the Apache version doesn't matter.  Is that the case?  Also, could you try it with just:
--with-gd --with-zlib --without-mysql
?
 [2002-12-28 07:43 UTC] iconmans at yahoo dot com
flag used originally:
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-gd --with-zlib --with-mysql=/usr

flag used now for the feedback:
*cleared the config.cache
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-gd --with-zlib --without-mysql

same error

Box: RH8.0 kernel 2.4.18-19.8.0 256 MB RAM / 512 SWAP / PIV 1.6 GHz

Fresh install, up2date and currently making a webdev system based on LAMP

Thanks for the quick look, let me know if need more feedback.
 [2002-12-28 08:12 UTC] rasmus@php.net
No, I meant build it as a standalone, so remove the --with-apxs2 from your flags and see if that changes things.
 [2002-12-28 08:25 UTC] iconmans at yahoo dot com
No Change in the error... For now, giving up, going to have my dinner and work on it 2morrow morning.. its 2000 hrs in india.
 [2002-12-28 08:27 UTC] rasmus@php.net
Hrm...  Your errors don't make much sense to me.  It certainly builds fine on my RedHat8 box with those flags and I would have expected many more reports similar to this one if this was a general problem.  I suspect something odd on your machine.
 [2002-12-28 11:24 UTC] iliaa@php.net
I cannot replicate the error either.
It is possible that your png library headers may be corrupt, try using the --with-png-dir to specify the path where the PNG library can be found on your system.
 [2003-01-20 04:23 UTC] j dot valroff at wanadoo dot fr
I have a quite similar problem while trying to compile with gd supprt...

Here are the errors that occure:
/usr/src/php-4.3.0/ext/gd/libgd/gd_png.c:11:67: png.h: No such file or directory
/usr/src/php-4.3.0/ext/gd/libgd/gd_png.c:42: parse error before "jmp_buf"
/usr/src/php-4.3.0/ext/gd/libgd/gd_png.c:42: warning: no semicolon at end of struct or union
/usr/src/php-4.3.0/ext/gd/libgd/gd_png.c:44: warning: data definition has no type or storage class
/usr/src/php-4.3.0/ext/gd/libgd/gd_png.c:46: parse error before "gdPngJmpbufStruct"
/usr/src/php-4.3.0/ext/gd/libgd/gd_png.c:46: warning: data definition has no type or storage class
/usr/src/php-4.3.0/ext/gd/libgd/gd_png.c:49: parse error before "png_ptr"
/usr/src/php-4.3.0/ext/gd/libgd/gd_png.c: In function `gdPngErrorHandler':
/usr/src/php-4.3.0/ext/gd/libgd/gd_png.c:51: `jmpbuf_ptr' undeclared (first use in this function)
/usr/src/php-4.3.0/ext/gd/libgd/gd_png.c:51: (Each undeclared identifier is reported only once
/usr/src/php-4.3.0/ext/gd/libgd/gd_png.c:51: for each function it appears in.)
/usr/src/php-4.3.0/ext/gd/libgd/gd_png.c:62: `msg' undeclared (first use in this function)
/usr/src/php-4.3.0/ext/gd/libgd/gd_png.c:65: `png_ptr' undeclared (first use in this function)
/usr/src/php-4.3.0/ext/gd/libgd/gd_png.c: At top level:
[....................]
make: *** [ext/gd/libgd/gd_png.lo] Erreur 1


RH 8 / Apache 2.0.43

Configure flags:
./configure --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --target=i386-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --prefix=/usr --with-config-file --enable-force-cgi-redirect --disable-debug --enable-pic --disable-rpath --enable-inline-optimization --with-db3 --with-kerberos --with-ldap --with-imap --with-curl --with-dom=/usr --with-exec-dir=/usr/bin --with-openssl --with-zlib --with-layout=GNU --enable-ftp --enable-track-vars --enable-trans-sid --with-gd --with-pear=/usr/share/pear --with-mysql --disable-mbstr-enc-trans --with-apxs2=/usr/sbin/apxs

I tried to compile as a stand alone, and the same error occurs...
 [2003-01-20 04:35 UTC] sniper@php.net
Is there png.h anywhere in your system?

 [2003-01-20 04:45 UTC] j dot valroff at wanadoo dot fr
No! that's the problem... I have libgd and libgd-devel installed.

Anyway, with older versions of PHP, it has always worked. What could be wrong?
 [2003-01-20 04:47 UTC] sniper@php.net
When you use --with-gd, then the bundled GD library
is used, which REQUIRES png.

Just use '--with-gd=/usr' to get the old behaviour,
or install the png-devel package.

 [2003-01-20 04:49 UTC] j dot valroff at wanadoo dot fr
What are the differences between the old behavior and the new bundled library?

So, what should I do?
 [2003-01-20 04:59 UTC] derick@php.net
I would recommend to use the bundled library, and thus you should install libpng-devel

The bundled library has some more bugs fixed and support for antialiased lines.

Derick
 [2003-01-20 05:01 UTC] j dot valroff at wanadoo dot fr
OK thanks ;-)
It is hard for a newbie to understand all that stuff.
Thank you very much for your quick answers...
 [2003-05-06 03:46 UTC] paul at cnt dot com dot sg
Hi, 
We encountered the similar errrors
make: *** [ext/gd/libgd/gd_png.lo] Error 1 
and some libjpeg related during make process.

It was fixed by Derick's suggestion suggestion to install the libpng-devel, not just libpng.  The same applies to libjpeg-devel.

Thanks Derick !
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 11:01:37 2024 UTC