Hello,
I found what I believe is a bug in the gmp-4.1-r1 ebuild.
Here are my basic system specs:
pentium3 700mhz, 128ram + 1Gb swap

I recently built a new Gentoo system using the 1.3a,
and was attempting step 7 of the desktop conf guide, "apache and squirrelmail webmail".
I've successfully installed these programs in similar Gentoo systems, so I believe it must be a bug in the ebuild, due to a change in the "mechanics" of the compilation process of gmp.
I typed the following emerge command:

Code:

emerge apache php mod_ssl

The installation went normally until it tried to merge gmp-4.1-r1. Here's the output:

Well, I got the same error as you, and I fixed it the same way. On my build, though, it had another error later on. It claimed in /usr/sbin/ebuild.sh that there was a line reading --localstatedir=/var/state/gmp and that this was not a directory. So, I created the directory for it, no dice. I edited out the line in the .sh, no luck there either. In fact, it then gave me an error "--build=i686-linux-gnu-pc" is not a recognized command. The strange part is that neither of these lines are actually in the .sh file. So, I just pulled back to version 4.1 (non r1), and it looks like it's working so far. I guess the r1 package needs a bit of work still, though.

Edit: Correction, 4.1 had OTHER errors, this time with no clear cause. Fortunately rolling back to 3.1.1r1 doesn't kill php.