New submission from Willie Lopez <[email protected]>:
When building Python-2.7.16 on CentOS-7.4, building with --enable-shared
through ./configure will cause Python to fail its build without errors and will
install python-2.7.5, the wrong version. If Python is built without
--enable-shared, other compilations that need Python will fail with the cryptic
error in the following. Recompiling the app such as Apache will continue fail
even when explicitly defining -fPIC in CFLAGS. However, trying to build Python
with the shared flag appears to succeed, but in fact it fails and installs
Python-2.7.5, the wrong version.
/bin/ld: /usr/local/lib/libz.a(crc32.o): relocation R_X86_64_32 against
.rodata' can not be used when making a shared object; recompile with -fPIC
I have tried to build manually build Python with the following:
./buildconf (with and without running buildconf)
CFLAGS='-fPIC -g -O2' ./configure --prefix=$HOME/tools
make
make altinstall %{buildroot}%{prefix}
What am I missing? What am I doing wrong in the build?
----------
components: Build
messages: 347461
nosy: [email protected]
priority: normal
severity: normal
status: open
title: Python-2.7.16 fails to build with --enable-shared
type: behavior
versions: Python 2.7
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue37518>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com