Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 630636 - dev-lang/python-2.7.13 Failed to build these modules: _multiprocessing due to missing getrandom() syscall
Summary: dev-lang/python-2.7.13 Failed to build these modules: _multiprocessing due to...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-11 07:56 UTC by Anton Kochkov
Modified: 2017-09-20 04:41 UTC (History)
3 users (show)

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


Attachments
full build log (py27_build.log,150.34 KB, text/x-log)
2017-09-11 07:56 UTC, Anton Kochkov
Details
emerge --info output (emerge2017_info.log,4.47 KB, text/x-log)
2017-09-11 07:59 UTC, Anton Kochkov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Kochkov 2017-09-11 07:56:09 UTC
Created attachment 493820 [details]
full build log

building '_multiprocessing' extension
creating build/temp.linux-x86_64-2.7/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Modules/_multiprocessing
x86_64-pc-linux-gnu-gcc -pthread -fPIC -fno-strict-aliasing -march=core2 -mtune=generic -O2 -pipe -fwrapv -DNDEBUG -IModules/_multiprocessing -I. -IInclude -I/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Include -I/var/tmp/portage/dev-lang/python-2.7.13/work/x86_64-pc-linux-gnu -c /var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Modules/_multiprocessing/multiprocessing.c -o build/temp.linux-x86_64-2.7/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Modules/_multiprocessing/multiprocessing.o
x86_64-pc-linux-gnu-gcc -pthread -fPIC -fno-strict-aliasing -march=core2 -mtune=generic -O2 -pipe -fwrapv -DNDEBUG -IModules/_multiprocessing -I. -IInclude -I/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Include -I/var/tmp/portage/dev-lang/python-2.7.13/work/x86_64-pc-linux-gnu -c /var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Modules/_multiprocessing/socket_connection.c -o build/temp.linux-x86_64-2.7/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Modules/_multiprocessing/socket_connection.o
x86_64-pc-linux-gnu-gcc -pthread -fPIC -fno-strict-aliasing -march=core2 -mtune=generic -O2 -pipe -fwrapv -DNDEBUG -IModules/_multiprocessing -I. -IInclude -I/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Include -I/var/tmp/portage/dev-lang/python-2.7.13/work/x86_64-pc-linux-gnu -c /var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Modules/_multiprocessing/semaphore.c -o build/temp.linux-x86_64-2.7/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Modules/_multiprocessing/semaphore.o
x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed -L. -Wl,-O1 -Wl,--as-needed -L. -fno-strict-aliasing -march=core2 -mtune=generic -O2 -pipe -fwrapv -DNDEBUG -I. -IInclude -I/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Include build/temp.linux-x86_64-2.7/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Modules/_multiprocessing/multiprocessing.o build/temp.linux-x86_64-2.7/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Modules/_multiprocessing/socket_connection.o build/temp.linux-x86_64-2.7/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Modules/_multiprocessing/semaphore.o -L/usr/local/lib64 -L. -lpython2.7 -o build/lib.linux-x86_64-2.7/_multiprocessing.so
*** WARNING: importing extension "_multiprocessing" failed with <type 'exceptions.OSError'>: [Errno 38] Function not implemented
building 'linuxaudiodev' extension
x86_64-pc-linux-gnu-gcc -pthread -fPIC -fno-strict-aliasing -march=core2 -mtune=generic -O2 -pipe -fwrapv -DNDEBUG -I. -IInclude -I/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Include -I/var/tmp/portage/dev-lang/python-2.7.13/work/x86_64-pc-linux-gnu -c /var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Modules/linuxaudiodev.c -o build/temp.linux-x86_64-2.7/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Modules/linuxaudiodev.o
x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed -L. -Wl,-O1 -Wl,--as-needed -L. -fno-strict-aliasing -march=core2 -mtune=generic -O2 -pipe -fwrapv -DNDEBUG -I. -IInclude -I/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Include build/temp.linux-x86_64-2.7/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Modules/linuxaudiodev.o -L/usr/local/lib64 -L. -lpython2.7 -o build/lib.linux-x86_64-2.7/linuxaudiodev.so
building 'ossaudiodev' extension
x86_64-pc-linux-gnu-gcc -pthread -fPIC -fno-strict-aliasing -march=core2 -mtune=generic -O2 -pipe -fwrapv -DNDEBUG -I. -IInclude -I/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Include -I/var/tmp/portage/dev-lang/python-2.7.13/work/x86_64-pc-linux-gnu -c /var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Modules/ossaudiodev.c -o build/temp.linux-x86_64-2.7/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Modules/ossaudiodev.o
x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed -L. -Wl,-O1 -Wl,--as-needed -L. -fno-strict-aliasing -march=core2 -mtune=generic -O2 -pipe -fwrapv -DNDEBUG -I. -IInclude -I/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Include build/temp.linux-x86_64-2.7/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Modules/ossaudiodev.o -L/usr/local/lib64 -L. -lpython2.7 -o build/lib.linux-x86_64-2.7/ossaudiodev.so
building '_ctypes' extension
x86_64-pc-linux-gnu-gcc -pthread -fPIC -fno-strict-aliasing -march=core2 -mtune=generic -O2 -pipe -fwrapv -DNDEBUG -I/usr/lib64/libffi-3.2.1/include -I. -IInclude -I/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Include -I/var/tmp/portage/dev-lang/python-2.7.13/work/x86_64-pc-linux-gnu -c /var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Modules/_ctypes/_ctypes.c -o build/temp.linux-x86_64-2.7/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Modules/_ctypes/_ctypes.o
x86_64-pc-linux-gnu-gcc -pthread -fPIC -fno-strict-aliasing -march=core2 -mtune=generic -O2 -pipe -fwrapv -DNDEBUG -I/usr/lib64/libffi-3.2.1/include -I. -IInclude -I/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Include -I/var/tmp/portage/dev-lang/python-2.7.13/work/x86_64-pc-linux-gnu -c /var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Modules/_ctypes/callbacks.c -o build/temp.linux-x86_64-2.7/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Modules/_ctypes/callbacks.o
x86_64-pc-linux-gnu-gcc -pthread -fPIC -fno-strict-aliasing -march=core2 -mtune=generic -O2 -pipe -fwrapv -DNDEBUG -I/usr/lib64/libffi-3.2.1/include -I. -IInclude -I/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Include -I/var/tmp/portage/dev-lang/python-2.7.13/work/x86_64-pc-linux-gnu -c /var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Modules/_ctypes/callproc.c -o build/temp.linux-x86_64-2.7/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Modules/_ctypes/callproc.o
x86_64-pc-linux-gnu-gcc -pthread -fPIC -fno-strict-aliasing -march=core2 -mtune=generic -O2 -pipe -fwrapv -DNDEBUG -I/usr/lib64/libffi-3.2.1/include -I. -IInclude -I/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Include -I/var/tmp/portage/dev-lang/python-2.7.13/work/x86_64-pc-linux-gnu -c /var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Modules/_ctypes/stgdict.c -o build/temp.linux-x86_64-2.7/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Modules/_ctypes/stgdict.o
x86_64-pc-linux-gnu-gcc -pthread -fPIC -fno-strict-aliasing -march=core2 -mtune=generic -O2 -pipe -fwrapv -DNDEBUG -I/usr/lib64/libffi-3.2.1/include -I. -IInclude -I/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Include -I/var/tmp/portage/dev-lang/python-2.7.13/work/x86_64-pc-linux-gnu -c /var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Modules/_ctypes/cfield.c -o build/temp.linux-x86_64-2.7/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Modules/_ctypes/cfield.o
x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed -L. -Wl,-O1 -Wl,--as-needed -L. -fno-strict-aliasing -march=core2 -mtune=generic -O2 -pipe -fwrapv -DNDEBUG -I. -IInclude -I/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Include build/temp.linux-x86_64-2.7/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Modules/_ctypes/_ctypes.o build/temp.linux-x86_64-2.7/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Modules/_ctypes/callbacks.o build/temp.linux-x86_64-2.7/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Modules/_ctypes/callproc.o build/temp.linux-x86_64-2.7/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Modules/_ctypes/stgdict.o build/temp.linux-x86_64-2.7/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Modules/_ctypes/cfield.o -L/usr/local/lib64 -L. -lffi -lpython2.7 -o build/lib.linux-x86_64-2.7/_ctypes.so

Python build finished, but the necessary bits to build these modules were not found:
_bsddb             _tkinter           bsddb185        
dl                 imageop            sunaudiodev     
To find the necessary bits, look in setup.py in detect_modules() for the module's name.


Failed to build these modules:
_multiprocessing                                      

running build_scripts
creating build/scripts-2.7
copying and adjusting /var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Tools/scripts/pydoc -> build/scripts-2.7
copying and adjusting /var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Tools/scripts/idle -> build/scripts-2.7
copying and adjusting /var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Tools/scripts/2to3 -> build/scripts-2.7
copying and adjusting /var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13/Lib/smtpd.py -> build/scripts-2.7
changing mode of build/scripts-2.7/pydoc from 644 to 755
changing mode of build/scripts-2.7/idle from 644 to 755
changing mode of build/scripts-2.7/2to3 from 644 to 755
changing mode of build/scripts-2.7/smtpd.py from 644 to 755
make: *** [Makefile:559: sharedmods] Error 1
 [31;01m*[0m ERROR: dev-lang/python-2.7.13::gentoo failed (compile phase):
 [31;01m*[0m   emake failed
 [31;01m*[0m 
 [31;01m*[0m If you need support, post the output of `emerge --info '=dev-lang/python-2.7.13::gentoo'`,
 [31;01m*[0m the complete build log and the output of `emerge -pqv '=dev-lang/python-2.7.13::gentoo'`.
 [31;01m*[0m The complete build log is located at '/var/tmp/portage/dev-lang/python-2.7.13/temp/build.log'.
 [31;01m*[0m The ebuild environment file is located at '/var/tmp/portage/dev-lang/python-2.7.13/temp/environment'.
 [31;01m*[0m Working directory: '/var/tmp/portage/dev-lang/python-2.7.13/work/x86_64-pc-linux-gnu'
 [31;01m*[0m S: '/var/tmp/portage/dev-lang/python-2.7.13/work/Python-2.7.13'
Comment 1 Anton Kochkov 2017-09-11 07:59:23 UTC
Created attachment 493822 [details]
emerge --info output
Comment 2 Denis Sokolovsky 2017-09-18 20:10:20 UTC
Is there are any updates or workaround? Due to some change in use flags emerge tries to force reinstall python:2.7, failed and dropped all other updates.
Comment 3 Mike Gilbert gentoo-dev 2017-09-18 20:48:32 UTC
*** WARNING: importing extension "_multiprocessing" failed with <type 'exceptions.OSError'>: [Errno 38] Function not implemented

That would indicate that your kernel is missing a system call that python relies on.

I see that you are running a 3.3-series kernel. That's fairly old, and not something I am able to test with.

You will need to debug the issue yourself to determine what syscall the _multiprocessing module is failing on here.
Comment 4 Mike Gilbert gentoo-dev 2017-09-18 21:00:00 UTC
A quick google search indicates that this might also be caused by some problem accessing /dev/shm.
Comment 5 Denis Sokolovsky 2017-09-19 09:29:27 UTC
Same for me. Found, via "strace", that failing call is "getrandom", which was introduced in kernel 3.17, while my container running on host with kernel 3.16. Possible workaround is glibc downgrade to version 2.24, as it has no support of "getrandom" syscall.
Comment 6 Denis Sokolovsky 2017-09-19 09:34:41 UTC
Probably, glibc upgrade should be refused if running kernel too old, but this behavior questionable and, for sure, out of scope of this bug.
Comment 7 Anton Kochkov 2017-09-19 10:29:00 UTC
I would update the kernel, but there is another bug in genkernel stopping me from doing that: https://bugs.gentoo.org/631368
Comment 8 Mike Gilbert gentoo-dev 2017-09-19 14:24:40 UTC
This commit looks interesting.

https://github.com/python/cpython/commit/01bdbad3e951014c58581635b94b22868537901c

This might be fixed in 2.7.14 already. I'll work on bumping that.
Comment 9 Mike Gilbert gentoo-dev 2017-09-19 15:16:33 UTC
I have added dev-lang/python-2.7.14 to the gentoo repo. Please see if this version resolves the issue.
Comment 10 Anton Kochkov 2017-09-19 17:19:46 UTC
(In reply to Mike Gilbert from comment #9)
> I have added dev-lang/python-2.7.14 to the gentoo repo. Please see if this
> version resolves the issue.

Yes, this indeed fixed the issue.
Comment 11 Anton Kochkov 2017-09-20 04:41:30 UTC
Interesting, that I met some similar/related error when updated Python 3.5 too:

Fatal Python error: getentropy() failed.