I've tried several times to emerge gcc-4.6.3 on a Pentium MMX 200, 160M ram, 512M swap, but I keep getting the same errors. (In case you're wondering why I might want to do this, this is a new install, and I'm trying to set up distcc (with crossdev) so that my shiny new i7 can help with compling. Since it already has gcc-4.6.3 installed, I need it on my old system as well -- or at least that's my understanding from the distcc documentation.)

I've tried changing the -march flag from native to i586 to pentium-mmx, but none of these worked. I also tried EXTRA_ECONF="--disable-frame-pointer" as suggested in comment 18, but no joy.

This bug seems most similar to my issue, but no solution has been proposed.

I did notice some emerge errors when emerging other packages in parallel, so I've disabled the parallel merge feature of portage, and that seemed to fix the emerge errors with other packages. The flags I picked were from the Safe Cflags page. I have not tried to merge gcc with -j1 or -Os flags. I'll try the flags you suggested.

In the meantime (it takes a little more than 2 days to compile gcc on this machine), here's the config.log from the last build attempt.

Just curious what is your goal with this mmx box? You had some php and apache use flags are you making a mini server?

triquetra wrote:

160M ram, 512M swap

Is that the max ram you can get in that?
When I mess around with old hardware I use a spare USB or other older drive as swap and the portage build dir.
I have a External USB 250G drive that my friend was throwing away cause it would break with windows.
I have 10G swap and the rest as a spare ext4 file system.
With grub2 you can also put a boot partition on it with your live cd image.

An approach if your not in a hurry is using crossdev
http://en.gentoo-wiki.com/wiki/Crossdev
and doing a bin host on your stronger machine.
Once again you could use a spare drive to store the binpackage dir.
Just compile the 586 gentoo on your new box save it as packages to the drive and move it over to the mmx box, set up make.conf to use bin packages from the drive._________________Donate to Gentoo

@turtles: This is an old laptop that my daughter asked to use. The goal is general desktop/laptop use -- mostly internet surfing and word processing. Yes, the ram is at max. I'm actually trying to use crossdev with distcc, which is why I need to upgrade gcc -- so that it is the same version as my i7 machine is using. If I can't get this to work, I may look more into attempting a crossdev binhost, but at the moment I lack the external storage to make that simple -- maybe if I just emerged gcc crosssdev binhost, then I could set up distcc? BTW, the emerge attempt with the flags you suggested failed with what appears to be the same error.

@NeddySeagoon: Yes, I did change the CHOST before attempting the gcc upgrade. I followed the Gentoo directions for doing so. I did have a question about this, though (and maybe this is my problem). Those directions indicate to build packages in a given order "emerge -av1 binutils gcc glibc". I issued that command explicitly, but portage built the packages in the following order: binutils, glibc, gcc. Should I have built each package individually in order rather than issuing the directed portage command?

@krinn: I've looked through the somewhat lengthy config.log, but since I'm not sure what I'm looking for, I didn't find anything useful. I will remove the -pipe flag, but would that have caused emerge errors?

@krinn: I've looked through the somewhat lengthy config.log, but since I'm not sure what I'm looking for, I didn't find anything useful. I will remove the -pipe flag, but would that have caused emerge errors?

emerge errors are errors
this don't gave you what kind of error you get. Low memory + big program to build couple with -pipe might get you out of memory errors, hence why -pipe isn't really safe with low memory, i know it's hard to go on a slower path with an already slow cpu, but if slower mean safer, at end, you will get faster build time, it's better to build one time a program than building it two time because you fail the first time as you run out of memory.

The CHOST guide has been well tested. It was written when glibc dropped support for i386, leaving i686 users that had installed the i386 stage3 no upgrade path.
If you followed that guide, you are good.

If you wish to use crossdev to build a suitable toolchain on your i7, you can hab it build the old gcc. Hwever, That won't fix your problem as from the error, gcc on the laptop won't build anything.

The -pipe option should be harmless. Memory is only used if its available. In any case for the configure tests which failed, we are looking at very small test programs.

Build wgetpaste (I suspect you cannot) and use it to put the config log on a pastebin.

What does

Code:

gcc-config -l

tell?_________________Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.

Sorry i didn't saw you already provide the config.log, anyway, the one config.log we should get is the stage 2 one.
So this one /var/tmp/portage/sys-devel/gcc-4.6.3/work/build/i586-pc-linux-gnu/libgcc/config.log

And yes, this is a real bug as previous invocation use -march=i586 while this one use -march=native, something your corei7 won't care, something your pentium-mmx will.
One or the other, this is a bug as gcc shouldn't alter your cflags, ignore them or use them, but not changing them like that, even it seems safe to switch to -march=native, it's a pitty for cross building, distcc usage.

filebug that with that config.log, as gcc maintainer will be glad to have a look at it.

edit: i'm not sure how you build it, and if it's a bug with gcc handling -march=native with your cputype, but if you have build it with distcc, discard distcc and retry (and distcc is not parallel building, even using it, so disabling parallel is not enough).
try

@krinn: I apologize. I think I posted confusing data. The stage2 config file was posted after an additional merge attempt in which I changed my CFLAGS per turtles suggestion ("-Os -j1 -march=native"). I see only -march=native in the stage2 config, which is consistent with the flags that attempt was called with. Although curiously I don't see the -Os flag anywhere -- it seems to have been replaced by -O2.

With all of the partial multi builds, we cannit be sure of what we are looking at, as make will reuse binary files if it can.

Please clean out /var/tmp/portage so there is no danger of any binary files being left over from other builds.
Turn off distcc. You must not use it anyway as your helper is a different gcc version to your laptop. That will produce broken code.

Make up your mind what -march you will set. If you really want to use -march=native and distcc, you need to run a one liner to see what march=native really means and mut that in your CFLAGS.
Using -march=native with distcc will get your i7 code for the parts it compiles, not the pentium code you need.

-Os produces broken code on some version of gcc on some platforms.
-j1 will not help the test programs used in configure as they are very small.
If you use ccache turn that off too. Its a well known source of compile errors.

In short, clean out the workspace, turn off all the potential speedups, set your -march the way you like, then have exactly one attempt to build gcc.
If it works, good, if not we will know what we are looking at when we see your logs._________________Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.

With all of the partial multi builds, we cannit be sure of what we are looking at, as make will reuse binary files if it can. Please clean out /var/tmp/portage so there is no danger of any binary files being left over from other builds.

I apologize. I didn't realize. I'll try it again and post consistent logs from a single build attempt after cleaning out /var/tmp/portage. I haven't enabled (or emerged) distcc yet because of the gcc disparity, and I don't use ccache, so those should not be an issue.

BTW, just so you guys don't think I abandoned this, I'll be out of town and away from the old laptop for the next week, so I don't expect to be posting again until after October 15th.