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.
assigning to maintainer
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?
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!
I've just committed the eclass change as suggested.