php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11209 compilation fails (detect static png lib failed) (redefinition of `uint')
Submitted: 2001-05-31 07:37 UTC Modified: 2001-05-31 12:53 UTC
From: croy at infiniweb dot ca Assigned:
Status: Not a bug Package: Installation problem
PHP Version: 4.0.5 OS: Linux RedHat 7.1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: croy at infiniweb dot ca
New email:
PHP Version: OS:

 

 [2001-05-31 07:37 UTC] croy at infiniweb dot ca
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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-31 12:53 UTC] sniper@php.net
This is not bug in PHP. If you want to compile something
you need to have the correct header files in your system.

 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Oct 27 03:03:34 2021 UTC