-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile x86_64 Python with -fPIC #39
Comments
What are you building and how? I believe that in the python configuration we're using in the docker image, regular python extension modules shouldn't be linked against |
I am a developer for the SimpleITK project. It uses CMake to build the library and python module. And then distutil/setuptools to package the resulting binary library. I have update the build files not to link against libpython and the resulting wheel passes auditwheel. Interestingly, if I use quay.io/pypa/manylinux1_i686 and explicitly link against libpython.a, ( -fPIC is not needed with 32-bit binaries) audit wheel still shows it as compliant. There are other oddities on that platform I still need to investigate. |
Ah, I see. This is very confusing (at least it confused us :-), see #30 and this thread), but the short version is that by if your Python was built with
Linking against Also on Anyway, sounds like the immediate issue has been solved so I'll mark this closed -- feel free to re-open or open a new issue if you run into anything else. |
Thank you for your explanation and links. |
I am getting the following linking error when trying to build on with the latest Docker image:
/opt/rh/devtoolset-2/root/usr/libexec/gcc/x86_64-CentOS-linux/4.8.2/ld: /opt/2.7mu/lib/libpython2.7.a(abstract.o): relocation R_X86_64_32S against `_Py_NotImplementedStruct' can not be used when making a shared object; recompile with -fPIC
/opt/2.7mu/lib/libpython2.7.a: could not read symbols: Bad value
The text was updated successfully, but these errors were encountered: