-
Notifications
You must be signed in to change notification settings - Fork 558
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
Linker error w/ 'pp.o' if "-mieee-fp" is in CFLAGS: "multiple definition of `_LIB_VERSION'" #16086
Comments
From kumba@gentoo.orgCreated by kumba@gentoo.orgCompiling >=perl-5.24* with "-mieee-fp" in CFLAGS will cause the below x86_64-pc-linux-gnu-gcc -O2 -ggdb2 -pipe -march=ivybridge -mtune=ivybridge -mfpmath=sse -mieee-fp -mmmx -msse -msse2 -msse3 -mssse3 -msse4 -msse4.1 -msse4.2 -maes -mavx -mcx16 -mf16c -mfsgsbase -mfxsr -mpclmul -mpopcnt -mrdrnd -msahf -mxsave -mxsaveopt -mvzeroupper -mavx256-split-unaligned-load -mavx256-split-unaligned-store -maccumulate-outgoing-args -fstack-protector-all -fmodulo-sched -fmodulo-sched-allow-regmoves -ftree-loop-im -ftree-loop-linear -ftree-loop-ivcanon -fgcse-after-reload -fgcse-lm -fgcse-sm -fgcse-las -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block -ftree-vectorize -flto=10 -fuse-linker-plugin -fstack-check=no -Wl,-O1 -Wl,--as-needed -Wl,-z,now -Wl,-z,relro -Wl,--sort-common -Wl,--hash-style=gnu -Wl,-flto -fno-lto -fno-use-linker-plugin -o miniperl \ This was an issue a few years ago, in perl-5.8.x, and back then, was tied A workaround is to drop "-mieee-fp" from CFLAGS when building perl and add An old Gentoo bug on the issue is here as Bug #296597: Thanks! -- Perl Info
|
From @tonycozOn Sun, 23 Jul 2017 11:57:47 -0700, kumba@gentoo.org wrote:
Does the attached patch against blead solve it for you? Tony |
From @tonycoz0001-perl-131786-avoid-a-duplicate-symbol-error-on-_LIB_V.patchFrom 1f8c6189fff2830691e893877be135a1a40f7dd2 Mon Sep 17 00:00:00 2001
From: Tony Cook <tony@develop-help.com>
Date: Wed, 2 Aug 2017 16:15:06 +1000
Subject: (perl #131786) avoid a duplicate symbol error on _LIB_VERSION
For -flto -mieee-fp builds, the _LIB_VERSION definition in perl.c and
in libieee conflict, causing a build failure.
The test we perform in Configure checks only that such a variable exists
(and is declared), it doesn't check that we can *define* such a variable,
which the code in pp.c tried to do.
So rather than trying to define the variable, just initialize it during
our normal interpreter initialization.
---
perl.c | 8 ++++++++
pp.c | 8 --------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/perl.c b/perl.c
index 4370f48..563fb3b 100644
--- a/perl.c
+++ b/perl.c
@@ -286,6 +286,14 @@ perl_construct(pTHXx)
PL_localpatches = local_patches; /* For possible -v */
#endif
+#if defined(LIBM_LIB_VERSION)
+ /*
+ * Some BSDs and Cygwin default to POSIX math instead of IEEE.
+ * This switches them over to IEEE.
+ */
+ _LIB_VERSION = _IEEE_;
+#endif
+
#ifdef HAVE_INTERP_INTERN
sys_intern_init();
#endif
diff --git a/pp.c b/pp.c
index 8e27eac..46366c3 100644
--- a/pp.c
+++ b/pp.c
@@ -39,14 +39,6 @@
extern Pid_t getpid (void);
#endif
-/*
- * Some BSDs and Cygwin default to POSIX math instead of IEEE.
- * This switches them over to IEEE.
- */
-#if defined(LIBM_LIB_VERSION)
- _LIB_VERSION_TYPE _LIB_VERSION = _IEEE_;
-#endif
-
static const STRLEN small_mu_len = sizeof(GREEK_SMALL_LETTER_MU_UTF8) - 1;
static const STRLEN capital_iota_len = sizeof(GREEK_CAPITAL_LETTER_IOTA_UTF8) - 1;
--
2.1.4
|
The RT System itself - Status changed from 'new' to 'open' |
From @tonycozOn Tue, 01 Aug 2017 23:17:15 -0700, tonyc wrote:
Applied as fa2e459. Tony |
@tonycoz - Status changed from 'open' to 'pending release' |
From @tonycozOn Wed, 09 Aug 2017 19:00:57 -0700, tonyc wrote:
It turns out this also fixes another issue: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=900739 Tony |
From @khwilliamsonThank you for filing this report. You have helped make Perl better. With the release yesterday of Perl 5.28.0, this and 185 other issues have been Perl 5.28.0 may be downloaded via: If you find that the problem persists, feel free to reopen this ticket. |
@khwilliamson - Status changed from 'pending release' to 'resolved' |
Migrated from rt.perl.org#131786 (status was 'resolved')
Searchable as RT131786$
The text was updated successfully, but these errors were encountered: