This does not happen every time I build python-3.5.0-r1, but it does keep reoccurring on random intervals. It fails to emerge dev-lang/python-3.5.0-r1 with the following : gcc -pthread -fPIC -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -march=native -mtune=amdfam10 -Os -pipe -ggdb -fwrapv -Werror=declaration-after-statement -I. -I/var/tmp/portage/dev-lang/python-3.5.0-r1/work/Python-3.5.0/Include -I/var/tmp/portage/dev-lang/python-3.5.0-r1/work/x86_64-pc-linux-gnu -c /var/tmp/portage/dev-lang/python-3.5.0-r1/work/Python-3.5.0/Modules/_ctypes/_ctypes_test.c -o build/temp.linux-x86_64-3.5/var/tmp/portage/dev-lang/python-3.5.0-r1/work/Python-3.5.0/Modules/_ctypes/_ctypes_test.o /var/tmp/portage/dev-lang/python-3.5.0-r1/work/Python-3.5.0/Modules/mathmodule.c: In function 'math_fsum': /var/tmp/portage/dev-lang/python-3.5.0-r1/work/Python-3.5.0/Modules/mathmodule.c:1229:5: warning: passing argument 1 of 'PyFPE_dummy' discards 'volatile' qualifier from pointer target type [enabled by default] /var/tmp/portage/dev-lang/python-3.5.0-r1/work/Python-3.5.0/Include/pyfpe.h:134:15: note: expected 'void *' but argument is of type 'volatile double *' : Failed to build these modules: math There is also the following output at the end : renaming build/scripts-3.5/pyvenv to build/scripts-3.5/pyvenv-3.5 Makefile:593: recipe for target 'sharedmods' failed make: *** [sharedmods] Error 1 : If that is relevant. Like I said this does not occur on every time I try to build. Posting build.log Reproducible: Sometimes
Created attachment 416750 [details] build.log
Created attachment 416752 [details] emerge-info
The real error is this: gcc -pthread -fPIC -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -march=native -mtune=amdfam10 -Os -pipe -ggdb -fwrapv -Werror=declaration-after-statement -I. -I/var/tmp/portage/dev-lang/python-3.5.0-r1/work/Python-3.5.0/Include -I/var/tmp/portage/dev-lang/python-3.5.0-r1/work/x86_64-pc-linux-gnu -c /var/tmp/portage/dev-lang/python-3.5.0-r1/work/Python-3.5.0/Modules/_pickle.c -o build/temp.linux-x86_64-3.5/var/tmp/portage/dev-lang/python-3.5.0-r1/work/Python-3.5.0/Modules/_pickle.o gcc -pthread -shared -Wl,-O1 -Wl,--as-needed -L. -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -march=native -mtune=amdfam10 -Os -pipe -ggdb -fwrapv build/temp.linux-x86_64-3.5/var/tmp/portage/dev-lang/python-3.5.0-r1/work/Python-3.5.0/Modules/mathmodule.o build/temp.linux-x86_64-3.5/var/tmp/portage/dev-lang/python-3.5.0-r1/work/Python-3.5.0/Modules/_math.o -L. -lm -lpython3.5 -o build/lib.linux-x86_64-3.5/math.cpython-35-x86_64-linux-gnu.so ... build/temp.linux-x86_64-3.5/var/tmp/portage/dev-lang/python-3.5.0-r1/work/Python-3.5.0/Modules/_math.o: file not recognized: File truncated collect2: ld returned 1 exit status If you look further up in the log, you can see that _math.o is being compiled twice for some reason. It probably gets truncated as two instances of gcc try to write to the same file.
It looks like both the cmath and math modules utilize _math.c and _math.o. As well Python 3.5.0 added support for building extension modules in parallel via distutils, which is likely the cause of this bug.
Mass closing of bugs reported against old versions of dev-lang/python. If the problem still occurs with the current versions (i.e. newest in each visible slot), feel free to reopen.