This is an automated email from the git hooks/post-receive script.
nsoffer pushed a commit to branch master
in repository sanlock.
The following commit(s) were added to refs/heads/master by this push:
new 5044719 python: Remove extra link args
5044719 is described below
Author: Nir Soffer <nsoffer(a)redhat.com>
AuthorDate: Sun Aug 2 02:01:06 2020 +0300
python: Remove extra link args
Fedora 33 builds fails now with:
relocation R_X86_64_PC32 against undefined symbol `PyExc_ValueError' can
not be used when making a shared object; recompile with -fPIC
We use these extra link args:
Looking the generated compiler command:
gcc -pthread \
-fcf-protection build/temp.linux-x86_64-3.9/sanlock.o \
-o build/lib.linux-x86_64-3.9/sanlock.cpython-39-x86_64-linux-gnu.so \
This looks like a complete mess. These arguments are repeated 3 times:
And our extra compiler flags adds the forth copy.
gcc says this about -fPIE:
These options are similar to -fpic and -fPIC, but the generated
position-independent code can be only linked into executables
But our python extension is a shared object, so I don't think -fPIE
The extra arguments were added in:
Author: David Teigland <teigland(a)redhat.com>
Date: Wed Oct 14 13:21:04 2015 -0500
python: add compile flags
Without any justification. I assume the intent was good, but it looks
like this change was not needed, and somehow it worked until now.
If some hardening is needed, it should be done by python build
infrastructure, not in sanlock. And it seems that python do use some
hardening specs (e.g. -specs=/usr/lib/rpm/redhat/redhat-hardened-ld).
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
python/setup.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/python/setup.py b/python/setup.py
index 0f3d683..b3bfaf1 100644
@@ -12,7 +12,6 @@ sanlock = Extension(name='sanlock',
- extra_link_args=['-fPIE', '-Wl,-z,relro,-z,now'],
version = None
To stop receiving notification emails like this one, please contact
the administrator of this repository.