Created attachment 452582 [details] build.log The problem occurs on both python-3.4.5 and python-3.5.2. Also it's the same behaviour within a qemu-user environment and a native armv7-a environment. emerge python works fine until the install stage. It comes to the point: Compiling '/var/tmp/portage/dev-lang/python-3.5.2/image//usr/lib/python3.5/test/test_audioop.py'... Compiling '/var/tmp/portage/dev-lang/python-3.5.2/image//usr/lib/python3.5/test/test_augassign.py'... Compiling '/var/tmp/portage/dev-lang/python-3.5.2/image//usr/lib/python3.5/test/test_base64.py'... Compiling '/var/tmp/portage/dev-lang/python-3.5.2/image//usr/lib/python3.5/test/test_bigaddrspace.py'... Compiling '/var/tmp/portage/dev-lang/python-3.5.2/image//usr/lib/python3.5/test/test_bigmem.py'... Compiling '/var/tmp/portage/dev-lang/python-3.5.2/image//usr/lib/python3.5/test/test_binascii.py'... Compiling '/var/tmp/portage/dev-lang/python-3.5.2/image//usr/lib/python3.5/test/test_binhex.py'... Compiling '/var/tmp/portage/dev-lang/python-3.5.2/image//usr/lib/python3.5/test/test_binop.py'... Compiling '/var/tmp/portage/dev-lang/python-3.5.2/image//usr/lib/python3.5/test/test_bisect.py'... Compiling '/var/tmp/portage/dev-lang/python-3.5.2/image//usr/lib/python3.5/test/test_bool.py'... Compiling '/var/tmp/portage/dev-lang/python-3.5.2/image//usr/lib/python3.5/test/test_buffer.py'... And here it stops. The cpu runs a almost 100%. The cpu last isn't constant, hence python is doing something. Ctrl+C doesn't break the install process, you have to kill it with kill -9. I left it running for more than 5 hours. Nothing changes.
Found a workaround: At the point it hangs, I can kill the install process. Then I remove the following files: /var/tmp/portage/dev-lang/python-3.5.2/work/Python-3.5.2/Lib/test/test_math.py /var/tmp/portage/dev-lang/python-3.5.2/work/Python-3.5.2/Lib/test/test_fractions.py /var/tmp/portage/dev-lang/python-3.5.2/work/Python-3.5.2/Lib/test/test_float.py /var/tmp/portage/dev-lang/python-3.5.2/work/Python-3.5.2/Lib/test/test_complex.py /var/tmp/portage/dev-lang/python-3.5.2/work/Python-3.5.2/Lib/test/test_buffer.py The the install phase succeeds. With: ebuild python-3.5.2.ebuild install ebuild python-3.5.2.ebuild qmerge I get it installed.
Created attachment 452616 [details] emerge --info
Some more information: The install process hangs, when I'm compiling python3.4/python3.5 native or in a qemu-user environment. If I compile python via cross-compiler on my host machine (amd64), then python builds successfully. Nevertheless, there are some files missing: /usr/lib/python3.4/lib2to3/PatternGrammar3.4.5.final.0.pickle /usr/lib/python3.4/lib2to3/Grammar3.4.5.final.0.pickle which causes a access violation, when building other python packages. See here: https://bugs.gentoo.org/show_bug.cgi?id=599066
I encountered this issue on my system as well around a month ago on all installed python packages (2.7, 3.4, 3.5, 3.6) after I'd switched my GCC optimization CFLAGS from "-O2" to "-Ofast". The build process would hang at test_buffer.py (on all python packages) and the CPU usage would remain 100% and the whole thing required a manual "SIGKILL" as I wasn't able to terminate the process... I created a "package.env" that applies "-O3" instead of "-Ofast" to all my python packages and that solved the problem for me temporarly (that is until they all work with "-Ofast". As of today (26/12/2017), python:2.7 seems to be working (compiled with "-Ofast"). On the other hand, it seems that the 3.x python versions (or at least 3.4, 3.5, 3.6) are still hanging at "test_buffer.py" (when being compiled with "-Ofast" and not "-O3", at least on my system).
Tried it today. Python 3.5 hangs with -Ofast and -O2. It worked with -O3.
On i686: -ffast-math => hang no -ffast-math => OK sys-devel/binutils-2.30, sys-devel/gcc-6.4.0-r1 here. I'm pretty much using -O2 plus a handful idiotic CFLAGS: CFLAGS="-O2 -fomit-frame-pointer -fprefetch-loop-arrays -fno-stack-protector -fstack-protector-explicit -pipe -march=pentium3 -mfpmath=sse,387 -fno-float-store -ffast-math" ... but -ffast-math is definitely the key offender.