php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28607 --with-gd doesn't work: "problem with libpng.(a|so)"
Submitted: 2004-06-02 03:32 UTC Modified: 2004-06-04 15:34 UTC
From: tuxedobob at mac dot com Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 4.3.6 OS: Mac OS X 10.3.4
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tuxedobob at mac dot com
New email:
PHP Version: OS:

 

 [2004-06-02 03:32 UTC] tuxedobob at mac dot com
Description:
------------
Tried to run configure using this line (which works 
without the --with-gd and --with-jpeg-dir options):

./configure --with-apxs --with-zlib=/usr --with-mysql --
enable-cgi --with-gd --with-jpeg-dir --with-ldap --with-
xml --with-iodbc --enable-sockets --enable-dbx --enable-
dbase --enable-trans-sid --enable-exif --enable-wddx --
enable-ftp --enable-mbstring --with-iconv

configure told me this:

checking for png_write_image in -lpng... no
configure: error: Problem with libpng.(a|so) or 
libz.(a|so). Please check config.log for more 
information.

config.log has this to say:

configure:30316: checking for png_write_image in -lpng
configure:30335: gcc -o conftest -g -O2  -no-cpp-precomp 
-L/usr/local/lib -L/usr/local/lib  -L/usr/local/lib -L/
usr/local/lib -lz conftest.c -lpng  -ljpeg -lz -lm  1>&5
ld: table of contents for archive: /usr/local/lib/
libpng.a is out of date; rerun ranlib(1) (can't load 
from it)
configure: failed program was:
#line 30324 "configure"
#include "confdefs.h"/* Override any gcc2 internal 
prototype to avoid an error.  */
/* We use char because int might match the return type 
of a gcc2
    builtin and then its argument prototype would still 
apply.  */char png_write_image();

int main() {
png_write_image(); return 0; }


I also get this error trying to compile/configure PHP 
4.3.7RC1. The strange thing is, I have 4.3.6 running 
already with GD included. I have somewhat changed my 
system since last install, but even reinstalling zlib 
and libpng, this persists, and since the GD stuff 
supposedly comes bundled with PHP, I don't see how I 
could've messed things up.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-06-04 15:34 UTC] iliaa@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

The issue is a broken libpng or header confusion on your 
system, this is not a PHP bug. 
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 02 12:01:36 2025 UTC