#50734 [Opn->Bgs]: GD won't complie against libpng 1.4.0
| From: | pajoye@php.net | Date: | Tue, 12 Jan 2010 22:47:42 +0000 |
| Subject: | #50734 [Opn->Bgs]: GD won't complie against libpng 1.4.0 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-146594@lists.php.net to get a copy of this message | ||
ID: 50734
Updated by: pajoye@php.net
Reported By: tsteiner at nerdclub dot net
-Status: Open
+Status: Bogus
Bug Type: Compile Failure
Operating System: Linux
PHP Version: 5.3.1
New Comment:
Already fixed in SVN.
Thanks for your report!
Previous Comments:
------------------------------------------------------------------------
[2010-01-12 22:31:18] tsteiner at nerdclub dot net
Description:
------------
From the libpng README at
ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.4.0-README.txt
:
"Removed the deprecated png_check_sig() function/macro."
The file ext/gd/libgd/gd_png.c currently uses this function and so will
not compile against libpng 1.4.0. The libpng man page notes the
following:
"The function
png_check_sig(sig, num) was replaced with
!png_sig_cmp(sig, 0, num) It has been deprecated since
libpng-0.90."
I made the following change in gd_png.c and php compiled successfully.
--- ext/gd/libgd/gd_png.c.bad 2010-01-12 16:16:18.000000000 -0600
+++ ext/gd/libgd/gd_png.c 2010-01-12 16:16:55.000000000 -0600
@@ -145,7 +145,7 @@
return NULL;
}
- if (!png_check_sig (sig, 8)) { /* bad signature */
+ if (png_sig_cmp (sig, 0, 8)) { /* bad signature */
return NULL;
}
Reproduce code:
---------------
Compile PHP with --with-gd and --with-libpng-dir pointing to a
libpng-1.4.0 install.
Expected result:
----------------
PHP should compile without error.
Actual result:
--------------
ext/gd/libgd/.libs/gd_png.o: In function
`php_gd_gdImageCreateFromPngCtx':
....../php-5.3.1/ext/gd/libgd/gd_png.c:148: undefined reference to
`png_check_sig'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50734&edit=1