php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35863 Compile error at parse_date.lo
Submitted: 2005-12-31 18:56 UTC Modified: 2006-01-06 10:06 UTC
From: webmaster at zloba dot ath dot cx Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 5.1.1 OS: Linux 2.4.31 (Slackware)
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: webmaster at zloba dot ath dot cx
New email:
PHP Version: OS:

 

 [2005-12-31 18:56 UTC] webmaster at zloba dot ath dot cx
Description:
------------
PHP 5.1.1 can't be compiled on Linux 2.4.31 as module of Apache 2.2 (using apxs).
gcc version 3.4.5
glibc version 2.3.5

Reproduce code:
---------------
root@DaffY:/data/php-5.1.1# ./configure--with-apxs=/usr/httpd/bin/apxs
...
root@DaffY:/data/php-5.1.1# make

Expected result:
----------------
Successful compilation of PHP

Actual result:
--------------
root@DaffY:/data/php-5.1.1# make
...
/bin/sh /data/php-5.1.1/libtool --silent --preserve-dup-deps
--mode=compile gcc -Iext/date/lib -Iext/date/
-I/data/php- 5.1.1/ext/date/ -DPHP_ATOM_INC -I/data/php-5.1.1/include
-I/data/php-5.1.1/main -I/data/php-5.1.1 -I/usr/include/libxml2
-I/data/php-5.1.1/ext/date/lib -I/data/php-5.1.1/TSRM
-I/data/php-5.1.1/Zend    -g -O2  -prefer-non-pic -c
/data/php-5.1.1/ext/date/lib/parse_date.c -o ext/date/lib/parse_date.lo

cc1: out of memory allocating 47411156 bytes after a total of 2941088 bytes
make: *** [ext/date/lib/parse_date.lo] Error 1
root@DaffY :/data/php-5.1.1#

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-31 19:26 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.1-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.1-win32-latest.zip


 [2006-01-06 10:01 UTC] fly dot captain at free dot fr
I'll have the same error on a Gentoo (x86, gcc-3.4.4, glibc-2.3.5, kernel 2.6.14). 

I solved the problem by changing GCC's options.

First, i had "-Os -march=pentium2 -pipe" and compilation failed with the same error.

cc1: out of memory allocating 31244920 bytes after a total of 9990144 bytes
make: *** [ext/date/lib/parse_date.lo] Error 1

!!! ERROR: dev-lang/php-5.1.1 failed.
!!! Function php5_1-sapi_src_compile, Line 548, Exitcode 2
!!! make failed
!!! If you need support, post the topmost build error, NOT this status message.

I change GCC options to "-O2 -march=pentium2 -pipe" and compilation works successfully.
 [2006-01-06 10:06 UTC] derick@php.net
You shouldn't try to outsmart our configure by specifying your own CFLAGS. Apparently GCC does some very heavy optimizations with -Os that use a lot of memory for our complex parser for date and time strings, and you don't have enough memory for this.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Nov 27 22:00:01 2025 UTC