You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
generate-posix-vars failed when building Python 2.7.14 on Linux #77555
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2018-04-29.19:25:54.145>created_at=<Date2018-04-27.15:45:47.474>labels= ['build']
title='generate-posix-vars failed when building Python 2.7.14 on Linux'updated_at=<Date2018-07-04.14:18:33.988>user='https://bugs.python.org/piotrdobrogost'
New changeset 0b91f8a by Benjamin Peterson (Florian Weimer) in branch '2.7':
Indicate that _PyGC_Head is only 8-byte aligned. (closes bpo-33374) 0b91f8a
I got here when trying to build Yocto Sumo on Fedora 28. python_native build was failing with a segfault. Here is how I fixed it with no elegance intended:
$ git clone https://github.com/python/cpython.git
$ cd cpython/
$ git show 0b91f8a668201fc58fa732b8acc496caedfdbae0 > /tmp/gcc8-fix.patch
$ cd$HOME/poky-sumo/meta/recipes-devtools/python
$ cp /tmp/gcc8-fix.patch python-native/
Activity
piotrdobrogost commentedon Apr 27, 2018
When building Python 2.7.14 on Fedora 28 I get the following error:
[piotr@demon]/tmp/Python-2.7.14% make
(…)
./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
/bin/sh: line 5: 25857 Segmentation fault (core dumped) ./python -E -S -m sysconfig --generate-posix-vars
generate-posix-vars failed
make[2]: *** [Makefile:514: pybuilddir.txt] Error 1
make[2]: Leaving directory '/tmp/Python-2.7.14'
make[1]: *** [Makefile:444: build_all_generate_profile] Error 2
make[1]: Leaving directory '/tmp/Python-2.7.14'
make: *** [Makefile:429: profile-opt] Error 2
Running problematic command alone I get this:
[piotr@demon]/tmp/Python-2.7.14% ./python -E -S -m sysconfig --generate-posix-vars
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
zsh: segmentation fault (core dumped) ./python -E -S -m sysconfig --generate-posix-vars
I found somehow related https://bugs.python.org/issue21166 with excellent explanation by Ned Deily (https://bugs.python.org/msg225217) but that issue is supposedly fixed.
I have Python 3.6.5 installed at /usr/bin/python3 and Python 2.7.14 installed at /usr/bin/python{2} – both from RPM packages.
I have Python 2.7.13 installed at /usr/local/bin/python{2} – built from source.
Running
which pythonreturns "/usr/local/bin/python".Trying to isolate configuration and build by prefixing commands with
PATH=/usr/bin:/usr/sbin LIBRARY_PATH= LD_LIBRARY_PATH= (…)
does not help.
tgrigg commentedon Apr 27, 2018
I beleive this is caused by https://bugs.python.org/issue27987 in combination with GCC 8.
Florian Weimer proposed a patch which is included in the Fedora build:
https://src.fedoraproject.org/cgit/rpms/python2.git/tree/00293-fix-gc-alignment.patch
It would be nice if this was fixed for 2.7.15 so that it would build out of the box with GCC 8 on x86_64-linux-gnu.
benjaminp commentedon Apr 29, 2018
New changeset 0b91f8a by Benjamin Peterson (Florian Weimer) in branch '2.7':
Indicate that _PyGC_Head is only 8-byte aligned. (closes bpo-33374)
0b91f8a
PeterSennaTschudin commentedon Jul 4, 2018
I got here when trying to build Yocto Sumo on Fedora 28. python_native build was failing with a segfault. Here is how I fixed it with no elegance intended: