This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Compile fail on gentoo for MIPS CPU of loongson 2f
Type: compile error Stage: resolved
Components: Extension Modules Versions: Python 2.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: emtone, pitrou
Priority: normal Keywords:

Created on 2017-10-21 04:32 by emtone, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
python_strace.txt emtone, 2017-10-23 15:58
Messages (5)
msg304695 - (view) Author: (emtone) Date: 2017-10-21 04:32
Here is the error message:
building '_multiprocessing' extension
creating
build/temp.linux-mips64-2.7/var/tmp/portage/dev-lang/python-2.7.12/work/Python-2.7.12/Modules/_multiprocessing
mips64el-unknown-linux-gnu-gcc -pthread -fPIC -fno-strict-aliasing -O2
-march=loongson2f -Wa,-mfix-loongson2f-nop -pipe -fwrapv -DNDEBUG
-IModules/_multiprocessing -I. -IInclude -I/usr/local/include
-I/var/tmp/portage/dev-lang/python-2.7.12/work/Python-2.7.12/Include
-I/var/tmp/portage/dev-lang/python-2.7.12/work/mips64el-unknown-linux-gnu
-c /var/tmp/portage/dev-lang/python-2.7.12/work/Python-2.7.12/Modules/_multiprocessing/multiprocessing.c
-o
build/temp.linux-mips64-2.7/var/tmp/portage/dev-lang/python-2.7.12/work/Python-2.7.12/Modules/_multiprocessing/multiprocessing.o
mips64el-unknown-linux-gnu-gcc -pthread -fPIC -fno-strict-aliasing -O2
-march=loongson2f -Wa,-mfix-loongson2f-nop -pipe -fwrapv -DNDEBUG
-IModules/_multiprocessing -I. -IInclude -I/usr/local/include
-I/var/tmp/portage/dev-lang/python-2.7.12/work/Python-2.7.12/Include
-I/var/tmp/portage/dev-lang/python-2.7.12/work/mips64el-unknown-linux-gnu
-c /var/tmp/portage/dev-lang/python-2.7.12/work/Python-2.7.12/Modules/_multiprocessing/socket_connection.c
-o
build/temp.linux-mips64-2.7/var/tmp/portage/dev-lang/python-2.7.12/work/Python-2.7.12/Modules/_multiprocessing/socket_connection.o
mips64el-unknown-linux-gnu-gcc -pthread -fPIC -fno-strict-aliasing -O2
-march=loongson2f -Wa,-mfix-loongson2f-nop -pipe -fwrapv -DNDEBUG
-IModules/_multiprocessing -I. -IInclude -I/usr/local/include
-I/var/tmp/portage/dev-lang/python-2.7.12/work/Python-2.7.12/Include
-I/var/tmp/portage/dev-lang/python-2.7.12/work/mips64el-unknown-linux-gnu
-c /var/tmp/portage/dev-lang/python-2.7.12/work/Python-2.7.12/Modules/_multiprocessing/semaphore.c
-o
build/temp.linux-mips64-2.7/var/tmp/portage/dev-lang/python-2.7.12/work/Python-2.7.12/Modules/_multiprocessing/semaphore.o
mips64el-unknown-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed
-L. -Wl,-O1 -Wl,--as-needed -L. -fno-strict-aliasing -O2
-march=loongson2f -Wa,-mfix-loongson2f-nop -pipe -fwrapv -DNDEBUG -I.
-IInclude
-I/var/tmp/portage/dev-lang/python-2.7.12/work/Python-2.7.12/Include
build/temp.linux-mips64-2.7/var/tmp/portage/dev-lang/python-2.7.12/work/Python-2.7.12/Modules/_multiprocessing/multiprocessing.o
build/temp.linux-mips64-2.7/var/tmp/portage/dev-lang/python-2.7.12/work/Python-2.7.12/Modules/_multiprocessing/socket_connection.o
build/temp.linux-mips64-2.7/var/tmp/portage/dev-lang/python-2.7.12/work/Python-2.7.12/Modules/_multiprocessing/semaphore.o
-L. -lpython2.7 -o build/lib.linux-mips64-2.7/_multiprocessing.so ***
WARNING: importing extension "_multiprocessing" failed with <type
'exceptions.OSError'>: [Errno 89] Function not implemented
msg304772 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2017-10-22 21:53
You should try running with strace to see which system call failed:

$ strace ./python -c "import _multiprocessing"
msg304814 - (view) Author: (emtone) Date: 2017-10-23 15:58
I update the Python to 2.7.14 and It's Compile success.

Here is running the command with strace:
yeeloong /home/gentoo # python --version
Python 2.7.14
yeeloong /home/gentoo # strace -o ./python_strace.txt python -c "import
_multiprocessing"
msg304815 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2017-10-23 15:59
If it works with 2.7.14 then we can just close this issue.
msg304819 - (view) Author: (emtone) Date: 2017-10-23 16:11
OK, Thank you pitrou!
History
Date User Action Args
2022-04-11 14:58:53adminsetgithub: 76014
2017-10-23 16:11:36emtonesetmessages: + msg304819
2017-10-23 15:59:37pitrousetstatus: open -> closed
resolution: out of date
messages: + msg304815

stage: resolved
2017-10-23 15:58:28emtonesetfiles: + python_strace.txt

messages: + msg304814
2017-10-22 21:53:31pitrousetnosy: + pitrou
messages: + msg304772
2017-10-21 04:32:22emtonecreate