This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lopez@ucar.edu
Recipients lopez@ucar.edu
Date 2019-07-07.02:43:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1562467439.87.0.798383157729.issue37518@roundup.psfhosted.org>
In-reply-to
Content
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?
History
Date User Action Args
2019-07-07 02:43:59lopez@ucar.edusetrecipients: + lopez@ucar.edu
2019-07-07 02:43:59lopez@ucar.edusetmessageid: <1562467439.87.0.798383157729.issue37518@roundup.psfhosted.org>
2019-07-07 02:43:59lopez@ucar.edulinkissue37518 messages
2019-07-07 02:43:59lopez@ucar.educreate