Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 265413 - dev-php/PEAR-PEAR has too strict memory_limit during compilation
Summary: dev-php/PEAR-PEAR has too strict memory_limit during compilation
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-08 09:14 UTC by Heiko Rehder
Modified: 2010-03-31 20:39 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Heiko Rehder 2009-04-08 09:14:31 UTC
During installation of phpDocumentor-1.4.2 both ebuild from php-experimental overlay and PEAR repository failed to build with the following error:

/usr/share/php/PEAR/Registry.php(1051) : Fatal error - Allowed memory size of 33554432 bytes exhausted at /var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/main/streams/streams.c:550 (tried to allocate 524288 bytes)



Reproducible: Always

Steps to Reproduce:
1. emerge PEAR-PhpDocumentor
OR
1. pear upgrade PhpDocumentor       


Actual Results:  
/usr/share/php/PEAR/Registry.php(1051) : Fatal error - Allowed memory size of 33554432 bytes exhausted at /var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/main/streams/streams.c:550 (tried to allocate 524288 bytes)

Expected Results:  
Installs without problems

After a little research, because my php.ini showed a memory_limit of 128M, I found that during the compilation of the PEAR-PEAR package the memory_limit is set to 32M after changing it to 64M and recompiling it works fine.


It may be, that this error is due to the suhosin-extension installed on my system.
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-04-10 22:55:47 UTC
assigning to maintainer
Comment 2 Richard Scott 2009-12-10 15:47:46 UTC
Try and edit your /usr/bin/pear file and increase the "memory_limit" option.

I have found that with the memory_limit set at 32M its just too low for symfony/symfony to install and I get an error something like this:

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 16 bytes) in /usr/share/php/PEAR/Registry.php on line 1145

Editing my /usr/bin/pear script worked for me, perhaps this can be included in the next release?
Comment 3 Matti Bickel (RETIRED) gentoo-dev 2010-03-30 22:13:44 UTC
The real solution is to use peardev instead of the pear command to install packages as suggested here:
http://pear.php.net/bugs/bug.php?id=1596

I'm going to change this in the eclass after consulting with the php team, but i'm positive that we can change this in the next two or three days.

For those of you that don't want to wait: modify php-pear-r1.eclass to call peardev instead of pear and report back, please!
Comment 4 Matti Bickel (RETIRED) gentoo-dev 2010-03-31 20:39:05 UTC
I've just committed the eclass change as suggested.