Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 565558 - dev-lang/python-3.5.0-r1 : fails emerge : Failed to build these modules: math
Summary: dev-lang/python-3.5.0-r1 : fails emerge : Failed to build these modules: math
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL: https://bugs.python.org/issue24421
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-12 03:24 UTC by Jason Mours
Modified: 2018-04-21 21:45 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (python-3.5.0-r1.build.log,174.38 KB, text/plain)
2015-11-12 03:25 UTC, Jason Mours
Details
emerge-info (python-3.5.0-r1.emerge.info,18.52 KB, text/plain)
2015-11-12 03:25 UTC, Jason Mours
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Mours 2015-11-12 03:24:35 UTC
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
Comment 1 Jason Mours 2015-11-12 03:25:07 UTC
Created attachment 416750 [details]
build.log
Comment 2 Jason Mours 2015-11-12 03:25:31 UTC
Created attachment 416752 [details]
emerge-info
Comment 3 Mike Gilbert gentoo-dev 2015-11-12 04:47:44 UTC
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.
Comment 4 Mike Gilbert gentoo-dev 2015-11-12 04:58:10 UTC
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.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-04-21 21:45:24 UTC
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.