Compile Python 3.6.2 on Debian Jessie segfaults on sharedmods

我的未来我决定 提交于 2021-02-07 06:45:09

问题


I'm trying to compile Python 3.6.2 on a Debian Jessie box with the options

./configure --prefix="/opt/python3" \
--enable-optimizations \
 --with-lto \
--enable-profiling \
--enable-unicode=ucs4 \
--with-system-expat \
--with-threads \
--with-system-ffi \
'CFLAGS=-D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security ' \
'LDFLAGS=-Wl,-z,relro'

But I'm getting a segmentation fault on the build of the shared modules:

renaming build/scripts-3.6/pyvenv to build/scripts-3.6/pyvenv-3.6
Segmentation fault
Makefile:586: recipe for target 'sharedmods' failed
make[2]: *** [sharedmods] Error 139

Any ideas what's going on?


回答1:


I had the same problem and solved it by changing the compiler to clang like this:

./configure CC=clang CXX=clang++

In my case I was compiling on armv7l and I found the issue with gcc also described here:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=848405?



来源:https://stackoverflow.com/questions/46279671/compile-python-3-6-2-on-debian-jessie-segfaults-on-sharedmods

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!