-
Notifications
You must be signed in to change notification settings - Fork 559
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
Build failure in blead: Linux -Dusequadmath -Dcc=g++-8 #16689
Comments
From @jkeenanI first caught a whiff of this build-time failure in this smoke-test http://perl.develop-help.com/raw/?id=213970 ... whose log file is here: http://perl5.test-smoke.org/logfile/70257 (Note the 6 "Segmentation fault" messages in that log.) I installed gcc-8 and g++-8 locally on Ubuntu 18.04 LTS and configured thus: ##### (The perl_V.txt attached does not pertain to this build.) make test_prep failed after miniperl had been built, apparently during Same configuration only with gcc-8 tests PASS. Can someone diagnose? Thank you very much. |
From @jkeenan./miniperl -Ilib make_ext.pl lib/auto/POSIX/POSIX.so MAKE="make" LIBPERL_A=libperl.a LINKTYPE=dynamic |
From @jkeenanSummary of my perl5 (revision 5 version 29 subversion 3) configuration: Characteristics of this binary (from libperl): |
From @sisyphusOn Tue, 11 Sep 2018 15:24:21 -0700, jkeenan@pobox.com wrote:
FWIW, I get the same failures on Ubuntu 18.04 LTS using g++ version 7.3.0. Cheers, |
The RT System itself - Status changed from 'new' to 'open' |
From @tonycozOn Tue, 11 Sep 2018 15:24:21 -0700, jkeenan@pobox.com wrote:
This wasn't g++ 8 (or 7) specific - I reproduced it with g++ 6 too. The problem is the C++ standard provides three versions of log10(): log10(float) but we're calling it with a different floating point type: log10(__float128) so the compiler doesn't know which to call. As with many other math functions, perl.h defines Perl_log10, which becomes log10q on quadmath builds, changing POSIX.xs to use Perl_log10 fixes the problem. Similarly for ldexp(), except that using Perl_ldexp() takes a slightly larger change. With those changes compilation succeeded, but two tests for signbit() failed. Since quadmath provides signbitq() I changed perl.h to use that for quadmath builds. Tony |
From @jkeenanOn Wed, 12 Sep 2018 01:36:56 GMT, tonyc wrote:
Tony, thanks for getting right on this. So far looks good on g++-8. I'm taking this ticket for the purpose of monitoring smoke tests for a few days, after which I'll close the ticket. Thank you very much. |
From @jkeenanOn Wed, 12 Sep 2018 02:15:42 GMT, jkeenan wrote:
Unfortunately, we're getting some new smoke test failures in one particular configuration. ##### Observed in these smoke test reports: 1. 2. 3. Branch in each case was blead or a branch rebased on blead after e6081c0 -- |
From @jkeenanOn Wed, 12 Sep 2018 19:26:31 GMT, jkeenan wrote:
Here is the failure: ##### ok 1 - No perlio debug file without -Di... Test Summary Report run/switchDx.t (Wstat: 0 Tests: 8 Failed: 4) Configuration attached. |
From @jkeenanSummary of my perl5 (revision 5 version 29 subversion 3) configuration: Characteristics of this binary (from libperl): |
From @tonycozOn Wed, 12 Sep 2018 12:39:55 -0700, jkeenan wrote:
The attached should fix it. Tony |
From @tonycoz0001-perl-133510-can-t-use-my_vsnprintf-on-quadmath-threa.patchFrom 14b21593c19501eb30d65a4572dce272c08f12cd Mon Sep 17 00:00:00 2001
From: Tony Cook <[email protected]>
Date: Thu, 13 Sep 2018 11:45:14 +1000
Subject: (perl #133510) can't use my_vsnprintf() on quadmath/threaded builds
Since anything with quadmath should be recent enough to have
vsnprintf() I've fallen back to that.
Calls to PerlIO_debug() in core don't include floating point values
and I expect it to be unlikely outside of core - if it is needed
they'll just have to use double formatting/types.
---
perlio.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/perlio.c b/perlio.c
index f5eb4851b6..3a2f9120d3 100644
--- a/perlio.c
+++ b/perlio.c
@@ -371,7 +371,19 @@ PerlIO_debug(const char *fmt, ...)
/* Use fixed buffer as sv_catpvf etc. needs SVs */
char buffer[1024];
const STRLEN len1 = my_snprintf(buffer, sizeof(buffer), "%.40s:%" IVdf " ", s ? s : "(none)", (IV) CopLINE(PL_curcop));
+# ifdef USE_QUADMATH
+# ifdef HAS_VSNPRINTF
+ /* my_vsnprintf() isn't available with quadmath, but the native vsnprintf()
+ should be, otherwise the system isn't likely to support quadmath.
+ Nothing should be calling PerlIO_debug() with floating point anyway.
+ */
+ const STRLEN len2 = vsnprintf(buffer + len1, sizeof(buffer) - len1, fmt, ap);
+# else
+ STATIC_ASSERT_STMT(0);
+# endif
+# else
const STRLEN len2 = my_vsnprintf(buffer + len1, sizeof(buffer) - len1, fmt, ap);
+# endif
PERL_UNUSED_RESULT(PerlLIO_write(PL_perlio_debug_fd, buffer, len1 + len2));
#else
const char *s = CopFILE(PL_curcop);
--
2.11.0
|
From @jkeenanOn Thu, 13 Sep 2018 01:49:15 GMT, tonyc wrote:
It works for me with that configuration on both g++7 and g++8. So I'm pushing it to blead to let the smokers have another go at it. Thank you very much. -- |
From @jkeenanOn Thu, 13 Sep 2018 02:27:07 GMT, jkeenan wrote:
Smoke tests look good. Re-closing. -- |
@jkeenan - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#133510 (status was 'resolved')
Searchable as RT133510$
The text was updated successfully, but these errors were encountered: