--enable-memory-limit, compilation errors

php.internals

Cyprien Fulax Nicolas

21 years ago
Hi, I've tried to compile PHP with --enable-memory-limit, and it works well with PHP 4.3.9, PHP_4_3 Branch, PHP 5.0.2, but not with PHP_5_1 branch, I've tried with freebsd and gentoo, it fails when making the cgi or cli executable. I get this error : On FreeBSD 5.1, gcc version 3.2.2 [FreeBSD] 20030205 (release) ext/standard/basic_functions.o: In function `zif_getopt': /usr/src/php/php-5.1-cgi/ext/standard/basic_functions.c:1700: undefined reference to `zif_memory_get_usage' *** Error code 1 Stop in /usr/src/php/php-5.1-cgi. And on Gentoo 2004.1, gcc version 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6) ext/standard/basic_functions.lo(.data.rel+0x11ac): In function `zif_ip2long': /home/cvs/php/PHP_5_1/ext/standard/basic_functions.c:1366: undefined reference to `zif_memory_get_usage' collect2: ld returned 1 exit status make: *** [sapi/cli/php] Error 1 Can someone fix it ? Thanks in advance, Cyprien Fulax Nicolas fulax@naedev.org

Derick Rethans

21 years ago
On Sat, 20 Nov 2004, Cyprien Nicolas wrote:
> And on Gentoo 2004.1, gcc version 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, > ssp-3.3.2-2, pie-8.7.6) > ext/standard/basic_functions.lo(.data.rel+0x11ac): In function > `zif_ip2long': > /home/cvs/php/PHP_5_1/ext/standard/basic_functions.c:1366: undefined > reference to `zif_memory_get_usage' > collect2: ld returned 1 exit status > make: *** [sapi/cli/php] Error 1
Those mentioned lines make no sense (there is no call to memory_get_usage at all), there is no PHP_5_1 branch so I've no clue what you mean here. Check with the CVS branch HEAD and provide the actual lines too. Derick
-- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org

Cyprien Fulax Nicolas

21 years ago
Derick Rethans wrote:
> >Those mentioned lines make no sense (there is no call to >memory_get_usage at all), there is no PHP_5_1 branch so I've >no clue what you mean here. Check with the CVS branch HEAD and provide >the actual lines too. > >Derick > > >
Actually, by PHP_5_1 branch, I mean the HEAD branch. I know there is any reference to memory_get_usage at the lines mentioned by gcc... The lines pointed by gcc contain a call to convert_to_string_ex(), which allocates memory for the new converted variable I think. I've looked at the sources and I don't really understand why I get that error, but I get it... Cyprien

Curt Zirzow

21 years ago
* Thus wrote Cyprien Nicolas:
> Derick Rethans wrote: > > > > >Those mentioned lines make no sense (there is no call to > >memory_get_usage at all), there is no PHP_5_1 branch so I've > >no clue what you mean here. Check with the CVS branch HEAD and provide > >the actual lines too. > > > >Derick > > > > > > > Actually, by PHP_5_1 branch, I mean the HEAD branch. I know there is any > reference to memory_get_usage at the lines mentioned by gcc... > The lines pointed by gcc contain a call to convert_to_string_ex(), which > allocates memory for the new converted variable I think. I've looked at > the sources and I don't really understand why I get that error, but I > get it...
HEAD compiled fine for me on Nov 11 with --enable-memory-limit. Try cleaning up your cvs envrionment and rebuild: ./cvsclean ./buildconf ./configure ... make Curt
-- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid!

Cyprien Fulax Nicolas

21 years ago
Actually, it does work now... Thank you Curt, I will think about ./cvsclean next time. Cyprien Curt Zirzow wrote: