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'
Created attachment 493822 [details] emerge --info output
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.
*** 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.
A quick google search indicates that this might also be caused by some problem accessing /dev/shm.
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.
Probably, glibc upgrade should be refused if running kernel too old, but this behavior questionable and, for sure, out of scope of this bug.
I would update the kernel, but there is another bug in genkernel stopping me from doing that: https://bugs.gentoo.org/631368
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.
I have added dev-lang/python-2.7.14 to the gentoo repo. Please see if this version resolves the issue.
(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.
Interesting, that I met some similar/related error when updated Python 3.5 too: Fatal Python error: getentropy() failed.