| Summary: | >=dev-lang/python-3.3.0 with <sys-devel/gcc-4.3 - ld: .../work/Python-3.3.3/Modules/_decimal/libmpdec/basearith.o: relocation R_X86_64_PC32 against symbol `mprime_rdx' can not be used when making a shared object; recompile with -fPIC | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Ruud Koolen (RETIRED) <redlizard> |
| Component: | Current packages | Assignee: | Python Gentoo Team <python> |
| Status: | RESOLVED OBSOLETE | ||
| Severity: | normal | CC: | alex_y_xu, python, toolchain |
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | AMD64 | ||
| OS: | Linux | ||
| URL: | http://bugs.python.org/issue20324 | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: |
build.log
emerge --info Proposed patch. |
||
Comment on attachment 368198 [details]
build.log
Please post your `emerge --info' output in a comment.
Created attachment 368214 [details]
emerge --info
Created attachment 368290 [details, diff]
Proposed patch.
I filed an upstream bug, let's see what they say. CPython upstream says it's a compiler bug. Since the compiler is no longer being maintained, it should be fixed on our end if we still support gcc-4.2: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46861#c3 By which I mean, in our compiler. there doesn't appear to be any commits pointed out in the PR that fixes the issue. i would just update the python ebuild to die when the current gcc version is older than 4.3. there's really no reason to be using older than 4.3 in Gentoo as your main compiler anymore ... (In reply to SpanKY from comment #7) > there's really no reason to be using older than 4.3 in Gentoo as your main > compiler anymore ... Right so. |
Created attachment 368198 [details] build.log When building python >= 3.3 with gcc older than 4.3, the _decimal module fails to build due to an apparently PIC-related link error: /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.4/../../../../x86_64-pc-linux-gnu/bin/ld: build/temp.linux-x86_64-3.3/var/tmp/portage/dev-lang/python-3.3.3/work/Python-3.3.3/Modules/_decimal/libmpdec/mpdecimal.o: warning: relocation against `mprime_rdx' in readonly section `.text'. /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.4/../../../../x86_64-pc-linux-gnu/bin/ld: build/temp.linux-x86_64-3.3/var/tmp/portage/dev-lang/python-3.3.3/work/Python-3.3.3/Modules/_decimal/libmpdec/basearith.o: relocation R_X86_64_PC32 against symbol `mprime_rdx' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.4/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value I am not sure whether or not this bug is specific to amd64. In gcc, declaring this variable as __attribute__((visibility("hidden"))) seems to solve the problem.