Issue 32335: Failed Python build on Fedora 27 (original) (raw)
Created on 2017-12-15 17:27 by amitg-b14, last changed 2022-04-11 14:58 by admin. This issue is now closed.
Messages (7)
Author: Amit Ghadge (amitg-b14)
Date: 2017-12-15 17:27
Hi, I'm try to build Python from source on Fedora 27 but it shows below message and build was failed,
gcc -pthread -Xlinker -export-dynamic -o python Programs/python.o libpython3.7dm.a -lpthread -ldl -lutil -lm
gcc -pthread -Xlinker -export-dynamic -o Programs/_testembed Programs/_testembed.o libpython3.7dm.a -lpthread -ldl -lutil -lm
./python -E -S -m sysconfig --generate-posix-vars ;
if test $? -ne 0 ; then
echo "generate-posix-vars failed" ;
rm -f ./pybuilddir.txt ;
exit 1 ;
fi
Traceback (most recent call last):
File "", line 1141, in _install
File "", line 1133, in _setup
File "", line 1100, in _builtin_from_name
ImportError: no built-in module named _thread
Fatal Python error: initimport: importlib install failed
Current thread 0x00007fefeacef600 (most recent call first): /bin/sh: line 5: 12806 Aborted (core dumped) ./python -E -S -m sysconfig --generate-posix-vars generate-posix-vars failed make: *** [Makefile:590: pybuilddir.txt] Error 1
Author: Amit Ghadge (amitg-b14)
Date: 2017-12-15 17:30
After the some investigation, 1f06a680de465be0c24a78ea3b610053955daa99 PR was OK, a6a4dc816d68df04a7d592e0b6af8c7ecc4d4344 build failed but ./python run 88c60c9668f0aa732693517a60b851cc1dfce0cb build failed and same error comes after click ./python
Author: Amit Ghadge (amitg-b14)
Date: 2017-12-15 17:32
My current git log is, Author: Victor Stinner <victor.stinner@gmail.com> Date: Fri Dec 15 16:29:24 2017 +0100
[bpo-32294](issue32294 "[closed] test_semaphore_tracker() of test_multiprocessing_spawn fails with -W error"): Fix multiprocessing test_semaphore_tracker() ([#4885](issue4885 "[closed] mmap enhancement request"))
Author: Xavier de Gaye (xdegaye) *
Date: 2017-12-24 15:19
I get the same build failure when the following line is commented out in Modules/Setup:
_thread _threadmodule.c # low-level threading interface
Can you please attach the full output of the build.
Author: Amit Ghadge (amitg-b14)
Date: 2017-12-24 15:40
build failure output;
Author: Xavier de Gaye (xdegaye) *
Date: 2017-12-24 15:49
Your build failure output shows that _threadmodule.c is not compiled and therefore the _thread module is missing.
You just need to overwrite the current Modules/Setup file (it is possibly corrupted somehow) as suggested at the start of your attached build output and then run make again:
$ cp Modules/Setup.dist Modules/Setup $ make
Author: Amit Ghadge (amitg-b14)
Date: 2017-12-24 16:31
It's work and build succeed. Thanks Xavier
History
Date
User
Action
Args
2022-04-11 14:58:55
admin
set
github: 76516
2017-12-25 10:21:10
xdegaye
set
resolution: not a bug
2017-12-24 16:31:08
amitg-b14
set
status: open -> closed
messages: +
stage: resolved
2017-12-24 15:49:27
xdegaye
set
messages: +
2017-12-24 15:40:03
amitg-b14
set
files: + build_.txt
messages: +
2017-12-24 15:19:38
xdegaye
set
nosy: + xdegaye
messages: +
2017-12-15 17:32:22
amitg-b14
set
messages: +
2017-12-15 17:30:01
amitg-b14
set
messages: +
2017-12-15 17:27:34
amitg-b14
create