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.

classification
Title: gcc-4.2.4 support on python-3.3 (libmpdec)
Type: Stage:
Components: Library (Lib) Versions: Python 3.3
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: djc, georg.brandl, skrah
Priority: normal Keywords: 3.3regression

Created on 2014-01-21 08:21 by djc, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (7)
msg208630 - (view) Author: Dirkjan Ochtman (djc) * (Python committer) Date: 2014-01-21 08:21
See https://bugs.gentoo.org/show_bug.cgi?id=498640:

What compiler versions are supported for 3.3? We noticed an issue when compiling 3.3.3 with gcc 4.3:

/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.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.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

Ruud Koolen <redlizard@gentoo.org> came up with a patch:

diff -r f7cebf727bc6 Modules/_decimal/libmpdec/constants.c
--- a/Modules/_decimal/libmpdec/constants.c	Mon Jan 20 21:59:33 2014 +0200
+++ b/Modules/_decimal/libmpdec/constants.c	Mon Jan 20 22:12:50 2014 +0100
@@ -71,6 +71,9 @@
   };
 
   /* magic number for constant division by MPD_RADIX */
+#if defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3))
+ __attribute__((visibility("hidden")))
+#endif
   const mpd_uint_t mprime_rdx = 15581492618384294730ULL;
 
 #elif defined(CONFIG_32)
msg208631 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2014-01-21 08:42
Should be figured out for 3.3.4
msg208643 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2014-01-21 12:02
Do you mean gcc-4.2? The patch uses __GNUC_MINOR__ < 3.

On the FreeBSD build slave gcc-4.2 works:

   gcc (GCC) 4.2.1 20070831 patched [FreeBSD]


Are you sure that there aren't any gcc patches for this version? It 
looks like a gcc/binutils issue to me.
msg208665 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2014-01-21 16:19
This is the gcc bug:

   http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46861


I rather agree with this comment:

   http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46861#c3

If a distro still maintains 4.2.x, the toolchain should be fixed
(like FreeBSD apparently did).
msg208677 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2014-01-21 17:39
OK, thanks for the quick response.  Relaxing to normal priority, please close as required.
msg208679 - (view) Author: Dirkjan Ochtman (djc) * (Python committer) Date: 2014-01-21 17:56
Given this, WONTFIXing this seems reasonable to me, FWIW.
msg208680 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2014-01-21 18:04
Thanks.
History
Date User Action Args
2022-04-11 14:57:57adminsetgithub: 64523
2014-01-21 18:04:10georg.brandlsetstatus: open -> closed
resolution: wont fix
messages: + msg208680
2014-01-21 17:56:48djcsetmessages: + msg208679
2014-01-21 17:39:02georg.brandlsetpriority: release blocker -> normal

messages: + msg208677
2014-01-21 16:19:13skrahsetmessages: + msg208665
2014-01-21 14:36:19skrahsettitle: gcc-4.3 support on python-3.3 (libmpdec) -> gcc-4.2.4 support on python-3.3 (libmpdec)
2014-01-21 12:02:37skrahsetmessages: + msg208643
2014-01-21 08:42:48georg.brandlsetpriority: normal -> release blocker
nosy: + georg.brandl
messages: + msg208631

2014-01-21 08:21:24djccreate