Created attachment 478442 [details] dmesg output I ran into this quite some time ago and thought something was wrong with the flash card I am using to compile, or with the non-Gentoo host system of the chroot. Turns out all of this is sane, but genautomata uses high amounts of ram, so that I could not compile gcc-5.4.0-r3 even if I dropped MAKEOPTS to one job and got 900mb of 1gb of ram free before. I attached a log of dmesg to prove that it is genautomata which causes the out of memory failure.
Created attachment 478444 [details] gcc-5.4.0-r3-out-of-memory.log.gz
Created attachment 478446 [details] output of emerge --info
There is an upstream patch at https://gcc.gnu.org/viewcvs?rev=239772&root=gcc&view=rev I'm testing it right now, and it seems as if the use of memory is reduced (upstream bug report claims to 316mb) and therefore the critical part of genautomata has compiled succesfully. I will report later on if and when the compile was finished.
Patch works! Please bump the patchsets of both gcc-5.4.0-r3 and gcc-6.3.0, and since this is a compile failure it would not need a revbump, would it?
I pushed pr https://github.com/gentoo/musl/pull/56
Anthony - thank you for fixing the fix into the musl overlay, it saves musl users from messing around with different slots, etc. pp. However, this issue is not related to the libc! It is a gcc bug, therefore it affects glibc systems too and is not solved by commiting the fix to the musl overlay. @toolchain - please add the fix to the patches tarball and fix #622036 too, at the moment the stable! toolchain is badly broken on arm systems.
Why is this ignored? It is super easy to fix for gcc-5 and gcc-6, simply add the linked patch to the tarball and we are good to go. It is a compile failure, so not even in the need of a revbump. You'd only have to bump the patchset and the Manifest.
(In reply to tt_1 from comment #7) > Why is this ignored? It is super easy to fix for gcc-5 and gcc-6, simply add > the linked patch to the tarball and we are good to go. It is a compile > failure, so not even in the need of a revbump. You'd only have to bump the > patchset and the Manifest. Can't this wait until the next releases from upstream?
This is an upstream patch - without it gcc cannot be built on arm, not even with MAKEOPTS="-j1", shouldn't that be enough? I guess from gcc-7.1 or 7.2 on this got merged.
(In reply to tt_1 from comment #9) > This is an upstream patch - without it gcc cannot be built on arm, not even > with MAKEOPTS="-j1", shouldn't that be enough? I guess from gcc-7.1 or 7.2 > on this got merged. it works on arm systems with sufficient memory, or if you add swap. i'm just not sure how many such systems are affected which is why I hesitate doing all this work for a relatively small set of systems. anyhow, why can't you add swap?
(In reply to Anthony Basile from comment #10) > (In reply to tt_1 from comment #9) > > This is an upstream patch - without it gcc cannot be built on arm, not even > > with MAKEOPTS="-j1", shouldn't that be enough? I guess from gcc-7.1 or 7.2 > > on this got merged. > > it works on arm systems with sufficient memory, or if you add swap. i'm > just not sure how many such systems are affected which is why I hesitate > doing all this work for a relatively small set of systems. > > anyhow, why can't you add swap? Just to comment that adding swap does not help. I am not sure why, but it seems that only RAM can be consumed by genautomata. My test system was with 1GiB of RAM and 2GiB of swap, when genautomata occupied all the RAM system freezed and soon got rebooted.
I can test with swap, but if 2 Gigabyte + 1 Gigabyte of ram are not enough there is a chance it won't be enough until genautomata hits the maximum amount of ram which can be adressed by the chip. From what I read in the case of armv6, this is close to 3 Gigabyte. User also could download a fresh stage3, chroot into it and extract a fresh copy of gcc-5 via quickpkg. However, the stages for arm have not been updated for a longer time, they still have gcc-4.9.4 and I believe glibc-2.22? I don't really know what amount of work the bump of the patchset would mean from your side, but if it involves a lot of compile and runtime testing and you feel that not too many people would benefit from it, please consider to add the patch to the patchset of gcc-5.5 (if there ever should be) and gcc-6.5 (if there ever should be) so that people have an upgrade option at least.
To restrict jobs to one via MAKEOPTS="-j1" and 2GB of swap is enough to make it compile for gcc-5.4 and armv7. Still it would be desireable to see the patch inherited into the 5.5 or 6.5 patchset.
So yeah, I have been using the patch locally for three months now without any issues - is there a chance it is going to be included into the patchsets of gcc-5.4/6.4, or not?
additional patch/backport for genattrtab in gcc-6.4.0 https://github.com/gcc-mirror/gcc/commit/ef0792f1418d7d4b99858e7233cd91dfdf2ad9d0 this got fixed from gcc-7 on
gcc-7.3.0-r3 got stabilized for arm, please ping if there still trouble with this.