php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #50538 php_date.c compliation fails
Submitted: 2009-12-20 15:28 UTC Modified: 2009-12-22 22:11 UTC
From: david at davidfavor dot com Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 5.3.1 OS: Ubuntu 9.10
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: david at davidfavor dot com
New email:
PHP Version: OS:

 

 [2009-12-20 15:28 UTC] david at davidfavor dot com
Description:
------------
The same problem appears with all stable versions of php
(5.2.12, 5.3.0, 5.3.1) and Ubuntu Karmic with gcc-4.4.1
where php_date.c compilation fails.

Reproduce code:
---------------

root@hive1:# ./configure
root@hive1:# make
/bin/sh /home/dfavor/work/php-5.3.1/libtool --silent --preserve-dup-deps --mode=compile gcc
-Iext/date/lib -Iext/date/ -I/home/dfavor/work/php-5.3.1/ext/date/ -DPHP_ATOM_INC
-I/home/dfavor/work/php-5.3.1/include -I/home/dfavor/work/php-5.3.1/main
-I/home/dfavor/work/php-5.3.1 -I/home/dfavor/work/php-5.3.1/ext/date/lib
-I/home/dfavor/work/php-5.3.1/ext/ereg/regex -I/usr/include/libxml2
-I/home/dfavor/work/php-5.3.1/ext/sqlite3/libsqlite -I/home/dfavor/work/php-5.3.1/TSRM
-I/home/dfavor/work/php-5.3.1/Zend -I/usr/include -g -O2 -fvisibility=hidden -c
/home/dfavor/work/php-5.3.1/ext/date/php_date.c -o ext/date/php_date.lo
In file included from /usr/include/stdlib.h:33,
from /home/dfavor/work/php-5.3.1/include/../main/php_config.h:2845,
from /home/dfavor/work/php-5.3.1/Zend/zend_config.h:1,
from /home/dfavor/work/php-5.3.1/Zend/zend.h:51,
from /home/dfavor/work/php-5.3.1/main/php.h:34,
from /home/dfavor/work/php-5.3.1/ext/date/php_date.c:21:
/usr/lib/gcc/i486-linux-gnu/4.4.1/include/stddef.h:211: error: duplicate 'unsigned'
In file included from /usr/include/stdlib.h:320,
from /home/dfavor/work/php-5.3.1/include/../main/php_config.h:2845,
from /home/dfavor/work/php-5.3.1/Zend/zend_config.h:1,
from /home/dfavor/work/php-5.3.1/Zend/zend.h:51,
from /home/dfavor/work/php-5.3.1/main/php.h:34,
from /home/dfavor/work/php-5.3.1/ext/date/php_date.c:21:
/usr/include/sys/types.h:151: error: duplicate 'unsigned'
/usr/include/sys/types.h:153: error: duplicate 'unsigned'
/usr/include/sys/types.h:153: error: two or more data types in declaration specifiers
make: *** [ext/date/php_date.lo] Error 1

root@hive1:# uname -a
Linux hive1.coolsurf.com 2.6.31-10-generic #35-Ubuntu SMP Tue Sep 22 17:33:42 UTC 2009 i686 GNU/Linux

root@hive1:# gcc --version
gcc (Ubuntu 4.4.1-4ubuntu8) 4.4.1

root@hive1:# libtool --version
ltmain.sh (GNU libtool) 2.2.6

There are many ways of hacking this to work and I'd prefer someone in the know tell
me the correct way to fix this.

Thanks.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-12-20 20:34 UTC] degeberg@php.net
Hi David,

This is a problem with building PHP, not with building the documentation. I've reclassified the bug report for you so it will get to the right people.

Personally, I have built PHP 5.3.1 from source on my Ubuntu 9.10 install, so it's probably your setup that is missing something. See http://www.php.net/support.php for support options.

- Daniel
 [2009-12-21 02:41 UTC] aharvey@php.net
This appears to be a problem with your build environment, rather than a PHP bug: PHP 5.3.1 builds fine on a stock Ubuntu 9.10 install, and the error you're getting is being generated deep within the system headers, rather than in anything specific to PHP. I suspect you'll have trouble compiling just about anything if including stdlib.h is causing problems.

I would suggest following this up either with the PHP support options linked to by Daniel, or probably more productively, with one of Ubuntu's support options, such as their forums.

Closing bug.
 [2009-12-22 22:11 UTC] david at davidfavor dot com
This bug can be closed.

I've opened a new bug 50556 to debug the real problem which is where main/php_config.h gets generated differently from main/php_config.h.in on multiple Ubuntu 9.10 machines where 'dpkg -l' reports identical packages installed.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 21 13:00:02 2025 UTC