Re: Re: 5.3.0 stable release
| From: | jvlad | Date: | Tue, 23 Jun 2009 16:31:53 +0000 |
| Subject: | Re: Re: 5.3.0 stable release | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-44437@lists.php.net to get a copy of this message | ||
>>>> Further investigation shown that compiler takes about 1GB(!) of memory
>>>> when
>>>> it compiles php5.3-200906221030/ext/fileinfo/libmagic/apprentice.c
>>>> On some systems this amount of memory is not available and may lead to
>>>> errors such as hangs or crashes.
>>>>
>>>> Is it a known problem?
>>>> Is this requirement specified somewhere?
>>>> Can it be fixed or improved?
>>> Try compiling with -O0
>>
>> unfortunately, it did not help (tried with fresh sources):
>
> There really isn't much we can do about this. Restructuring perfectly
> valid code because certain old versions of gcc use a lot of memory
> compiling it isn't something I am very keen on. Compile on a box with
> more memory or move to gcc4.
>
This is a good suggestion, but can hardly be followed.
Even the most recent OpenBSD (ver 4.5) comes with gcc 2.95 and 3.3.5 (see
http://www.openbsd.org/45.html#new)
Ver4 is no an option under this platform.
I just tried on another hardware with 1GB RAM. It successfully passed
ext/fileinfo/libmagic/apprentice.c.
Now the problem is:
/bin/sh
/home/jvlad/php/php5.3-200906221030/libtool --silent --preserve-dup-deps --mode=compile
gcc -Iext/phar/ -I/home/jvlad/php/php5.3-200906221030/ext/phar/ -DPHP_ATOM_INC
-I/home/jvlad/php/php5.3-200906221030/include -I/home/jvlad/php/php5.3-200906221030/main
-I/home/jvlad/php/php5.3-200906221030 -I/home/jvlad/php/php5.3-200906221030/ext/date/lib
-I/home/jvlad/php/php5.3-200906221030/ext/ereg/regex -I/home/jvlad/php/install/include/libxml2
-I/usr/local/include -I/home/jvlad/php/php5.3-200906221030/ext/sqlite3/libsqlite
-I/home/jvlad/php/php5.3-200906221030/TSRM -I/home/jvlad/php/php5.3-200906221030/Zend
-I/usr/local/include -O0 -c
/home/jvlad/php/php5.3-200906221030/ext/phar/util.c -o ext/phar/util.lo
In file included from
/home/jvlad/php/php5.3-200906221030/ext/spl/spl_array.h:25,
from
/home/jvlad/php/php5.3-200906221030/ext/phar/phar_internal.h:59,
from
/home/jvlad/php/php5.3-200906221030/ext/phar/util.c:23:
/home/jvlad/php/php5.3-200906221030/ext/spl/php_spl.h:68: error: syntax
error before "intptr_t"
*** Error code 1
Stop in /home/jvlad/php/php5.3-200906221030 (line 750 of Makefile).
As I mentioned in bug#48593 replacing intptr_t with zend_intptr_t fixes the
problem completely.