简体   繁体   English

在Debian上编译Python 3.6.2在sharedmods上使用段塞故障

[英]Compile Python 3.6.2 on Debian Jessie segfaults on sharedmods

I'm trying to compile Python 3.6.2 on a Debian Jessie box with the options 我正在尝试使用选项在Debian Jessie框上编译Python 3.6.2

./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? 有什么想法发生了什么?

I had the same problem and solved it by changing the compiler to clang like this: 我遇到了同样的问题并通过将编译器更改为clang来解决它:

./configure CC=clang CXX=clang++

In my case I was compiling on armv7l and I found the issue with gcc also described here: 在我的情况下,我正在编译armv7l,我发现gcc的问题也在这里描述:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=848405? https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=848405?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM