|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2001-05-31 12:53 UTC] sniper@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 16:00:01 2025 UTC | 
The compilation fails due to detection problem of the static png library in ./configure. OS: RedHat 7.1 configure line : ./configure --with-gd I just installed RedHat 7.1 and tried to compile PHP. I had the libpng RPM installed, but not libpng-devel. When config tried to detect if uint was defined on my operating system, the configtest.c program failed to compile because it coudn't find -lpng, and not because uint wasn't defined. So the configure script continued, thinking it had to define uint.. When it was time to compile libmysql.c, it chooked, saying uint was previously declared in sys/types.h. Which is the case... I think that either configure should make sure the static libpng is available before checking those things, or it shouldn't try to link with that lib when checking if uint is defined by my system... Here's the config.log : configure:27063: checking for type uint configure:27082: gcc -o conftest -g -O2 conftest.c -lz -lpng -lgd -lresolv -lm -ldl -lcrypt -lnsl -lresolv 1>&5 /usr/bin/ld: cannot find -lpng collect2: ld returned 1 exit status configure: failed program was: #line 27071 "configure" #include "confdefs.h" #include <stdio.h> #include <sys/types.h> main() { uint foo; foo++; exit(0); } Here's the compilation output : gcc -I. -I/usr/local/src/web/php-4.0.5/ext/mysql/libmysql -I/usr/local/src/sweb/php-4.0.5/main -I/usr/local/src/web/php-4.0.5 -I/usr/local/src/web/php-4.0.5/Zend -I/usr/local/src/web/php-4.0.5/ext/mysql/libmysql -I/usr/local/src/web/php-4.0.5/ext/xml/expat/xmltok -I/usr/local/src/web/php-4.0.5/ext/xml/expat/xmlparse -I/usr/local/src/web/php-4.0.5/TSRM -DSUPPORT_UTF8 -DXML_BYTE_ORDER=12 -g -O2 -c libmysql.c && touch libmysql.lo In file included from libmysql.c:9: global.g:240: warning: redefinition of `uint' /usr/incluxde/sys/types.h:146: warning: `uint' previously declared here global.h:241: warning: redefiniyion of `ushort' /usr/include/sys/types.h:145: warning: `ushort' previously declared here In file included from libmysql.c:12: m_string.h:180: parse error before `__extention__' m_string.h:180: parse error before `&&' make[4]: *** [libmysql.lo] Error 1 make[4]: Leaving directory `/usr/local/src/web/php-4.0.5/ext/mysql/libmysql' I hope you have everything you need to reproduce the problem and find a solution. I fixed my problem simply by installing libpng-devel-1.0.9-1 I downloaded from `http://rpmfind.net/'. Thank you.