Skip Menu |
Report information
Id: 126203
Status: pending release
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: dcollinsn [at] gmail.com
Cc:
AdminCc:

Operating System: (no value)
PatchStatus: (no value)
Severity: low
Type: unknown
Perl Version: (no value)
Fixed In: (no value)



Subject: "Perl v1305670057.0.0 required" in quadmath build
Download (untitled) / with headers
text/plain 1.1k
Greetings Porters, While attempting to build a quadmath Perl on my shiny new 64-bit Debian VM, using the following command: ./Configure -Dusedevel -Dcc='ccache gcc' -Duselongdouble -Duse64bitall -Dusequadmath -Uman1dir -Uman3dir -des During `make`, I had the following error when make tries to test the built miniperl: ./miniperl -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1' Perl v1305670057.0.0 required--this is only v5.23.4, stopped at dist/Exporter/lib/Exporter.pm line 3. Compilation failed in require. BEGIN failed--compilation aborted. Failed to build miniperl. Please run make minitest `make minitest` has the same errors. A build with the same ./Configure but -Uusequadmath successfully builds and tests with no failures, except for an unrelated failure in Porting/libperl.t. The build log is attached, the only remarkable warning is several instances of: warning: implicit declaration of function ‘quadmath_snprintf’ [-Wimplicit-function-declaration] The decimal number `v1305670057` does not seem to be remarkable, 0x4DD2F1A9. Valgrind reports no errors.
Subject: quadmath buildlog.txt

Message body is not shown because it is too large.

RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 4.4k
Here is a perl -V from a not-quad-math build: Summary of my perl5 (revision 5 version 23 subversion 4) configuration: Commit id: 729006409d5c14a5f8698d5eefd60009ed994b04 Platform: osname=linux, osvers=3.16.0-4-amd64, archname=x86_64-linux-thread-multi-ld uname='linux nightshade64 3.16.0-4-amd64 #1 smp debian 3.16.7-ckt11-1+deb8u4 (2015-09-19) x86_64 gnulinux ' config_args='-Dusedevel -Dprefix=/usr/local/perl-afl -Dcc=ccache afl-gcc -Duselongdouble -Duse64bitall -Doptimize=-g -Uversiononly -Uman1dir -Uman3dir' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define use64bitint=define, use64bitall=define, uselongdouble=define usemymalloc=n, bincompat5005=undef Compiler: cc='ccache afl-gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-g', cppflags='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include' ccversion='', gccversion='4.9.2', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678, doublekind=3 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdblkind=3 ivtype='long', ivsize=8, nvtype='long double', nvsize=16, Off_t='off_t', lseeksize=8 alignbytes=16, prototype=define Linker and Libraries: ld='ccache afl-gcc', ldflags =' -fstack-protector-strong -L/usr/local/lib' libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc libc=libc-2.19.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='2.19' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fPIC', lddlflags='-shared -g -L/usr/local/lib -fstack-protector-strong' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS PERL_COPY_ON_WRITE PERL_DONT_CREATE_GVSV PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP PERL_PRESERVE_IVUV PERL_USE_DEVEL USE_64_BIT_ALL USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_LONG_DOUBLE USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API Built under linux Compiled at Sep 26 2015 21:44:11 @INC: ../perl/lib /usr/local/perl-afl/lib/site_perl/5.23.4/x86_64-linux-thread-multi-ld /usr/local/perl-afl/lib/site_perl/5.23.4 /usr/local/perl-afl/lib/5.23.4/x86_64-linux-thread-multi-ld /usr/local/perl-afl/lib/5.23.4 . dcollins@nightshade64:~/perldebug$ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.9/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 4.9.2-10' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.9 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --with-arch-32=i586 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.9.2 (Debian 4.9.2-10) dcollins@nightshade64:~/perldebug$ ld -v GNU ld (GNU Binutils for Debian) 2.25
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 1.7k
This is an error related to the interpretation of require statements. A bare scalar version : dcollins@nightshade64:~/perldebug$ ./miniperl -e 'require 5.006' Perl v1305670057.0.0 required--this is only v5.23.4, stopped at -e line 1. dcollins@nightshade64:~/perldebug$ ./miniperl -e 'require v5.006' dcollins@nightshade64:~/perldebug$ ***With a quadmath debugging miniperl... dcollins@nightshade64:~/perldebug$ ./miniperl -Dx -e 'require 5.006' { 1 TYPE = leave ===> NULL TARG = 1 FLAGS = (VOID,KIDS,PARENS,SLABBED) PRIVATE = (REFC) REFCNT = 1 { 2 TYPE = enter ===> 3 FLAGS = (UNKNOWN,SLABBED,MORESIB) } { 3 TYPE = nextstate ===> 4 FLAGS = (VOID,SLABBED,MORESIB) LINE = 1 PACKAGE = "main" SEQ = 4294967246 } { 5 TYPE = require ===> 1 FLAGS = (SCALAR,KIDS,SLABBED) PRIVATE = (0x1) { 4 TYPE = const ===> 5 FLAGS = (SCALAR,SLABBED) SV = NV(1.30567e+09) } } } EXECUTING... Perl v1305670057.0.0 required--this is only v5.23.4, stopped at -e line 1. ***With a notquadmath debugging miniperl... dcollins@nightshade64:~/perldebug$ ./miniperl -Dx -e 'require 5.006' { 1 TYPE = leave ===> NULL TARG = 1 FLAGS = (VOID,KIDS,PARENS,SLABBED) PRIVATE = (REFC) REFCNT = 1 { 2 TYPE = enter ===> 3 FLAGS = (UNKNOWN,SLABBED,MORESIB) } { 3 TYPE = nextstate ===> 4 FLAGS = (VOID,SLABBED,MORESIB) LINE = 1 PACKAGE = "main" SEQ = 4294967246 } { 5 TYPE = require ===> 1 FLAGS = (SCALAR,KIDS,SLABBED) PRIVATE = (0x1) { 4 TYPE = const ===> 5 FLAGS = (SCALAR,SLABBED) SV = NV(5.006) } } } EXECUTING...
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 1.6k
On Sat Sep 26 19:25:52 2015, dcollinsn@gmail.com wrote: Show quoted text
> Greetings Porters, > > While attempting to build a quadmath Perl on my shiny new 64-bit > Debian VM, using the following command: > > ./Configure -Dusedevel -Dcc='ccache gcc' -Duselongdouble -Duse64bitall > -Dusequadmath -Uman1dir -Uman3dir -des > > During `make`, I had the following error when make tries to test the > built miniperl: > > ./miniperl -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c > 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1' > Perl v1305670057.0.0 required--this is only v5.23.4, stopped at > dist/Exporter/lib/Exporter.pm line 3. > Compilation failed in require. > BEGIN failed--compilation aborted. > Failed to build miniperl. Please run make minitest > > `make minitest` has the same errors. A build with the same ./Configure > but -Uusequadmath successfully builds and tests with no failures, > except for an unrelated failure in Porting/libperl.t. The build log is > attached, the only remarkable warning is several instances of: > > warning: implicit declaration of function ‘quadmath_snprintf’ [- > Wimplicit-function-declaration] > > The decimal number `v1305670057` does not seem to be remarkable, > 0x4DD2F1A9. Valgrind reports no errors.
Playing with this calculator, http://babbage.cs.qc.edu/courses/cs341/IEEE-754.html FP 5.006 as float 32 is 0x40A03126, as float 64 is 0x4014062,4DD2F1AA0 (comma inserted by me). Notice your "0x4DD2F1A9" is very close to low 4 bytes of the float 64 which are "0x4DD2F1AA0". I've seen stuff like this before when the %f is used instead of %lf in Perl_my_snprintf, and is it really 8 bytes or 10/12/16 byte floats. -- bulk88 ~ bulk88 at hotmail.com
From: Lukas Mai <plokinom [...] gmail.com>
To: perlbug-followup [...] perl.org
Subject: Re: [perl #126203] "Perl v1305670057.0.0 required" in quadmath build
Date: Sun, 27 Sep 2015 11:48:16 +0200
Download (untitled) / with headers
text/plain 1.2k
Am 27.09.2015 um 07:41 schrieb bulk88 via RT: Show quoted text
> > Playing with this calculator, http://babbage.cs.qc.edu/courses/cs341/IEEE-754.html > > FP 5.006 as float 32 is 0x40A03126, as float 64 is 0x4014062,4DD2F1AA0 > (comma inserted by me). Notice your "0x4DD2F1A9" is very close to low 4 > bytes of the float 64 which are "0x4DD2F1AA0". I've seen stuff like this > before when the %f is used instead of %lf in Perl_my_snprintf, and is it > really 8 bytes or 10/12/16 byte floats.
That surprises me because at least in standard C printf there is no way to pass floats to it (it's a vararg function). printf %f takes a double, not float. printf %lf had undefined behavior in C89/C90 but was made equivalent to %f in C99. C99 added long double, with printf format %Lf. ... Now I'm looking at the code in util.c. There's a potential memory leak in Perl_my_snprintf/USE_QUADMATH. quadmath_format_single can return a malloc'd string. If quadmath_snprintf returns -1, perl croaks without freeing qfmt. This also applies to sv.c. And what's up with this error message? Perl_croak_nocontext("panic: quadmath_snprintf failed, format \"%s|'", qfmt); |' looks like someone messed up their shift key while typing \". -- Lukas Mai <plokinom@gmail.com>
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 101b
Problem persists under gcc 5.2 and current blead, see attached build log with bonus compiler warnings
Subject: build.log
Download build.log
application/octet-stream 14.4k

Message body not shown because it is not plain text.

RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 638b
On Sat Sep 26 19:25:52 2015, dcollinsn@gmail.com wrote: Show quoted text
> Greetings Porters, > > While attempting to build a quadmath Perl on my shiny new 64-bit > Debian VM, using the following command: > > ./Configure -Dusedevel -Dcc='ccache gcc' -Duselongdouble -Duse64bitall > -Dusequadmath -Uman1dir -Uman3dir -des
Build with -Duselongdouble or -Dusequadmath - not both. Building with both confuses the build, mostly because parts of the process test quadmath first and others test longdouble first. The attached makes Configure abort if both are provided. I considered having one override the other - but which did the user really want? Tony
Subject: 0001-make-Configure-abort-if-both-Duselongdouble-and-Duse.patch
From 99b748044ec2674a742600a470d753a96d9b55da Mon Sep 17 00:00:00 2001 From: Tony Cook <tony@develop-help.com> Date: Mon, 11 Apr 2016 13:55:45 +1000 Subject: make Configure abort if both -Duselongdouble and -Dusequadmath are requested See [perl #126203] --- Configure | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Configure b/Configure index 2e19e2c..69377ba 100755 --- a/Configure +++ b/Configure @@ -5238,6 +5238,20 @@ case "$usequadmath" in *) usequadmath="$undef" ;; esac +: Fail if both uselongdouble and usequadmath are requested +case "$usequadmath:$uselongdouble" in +define:define) + $cat <<EOM >&4 + +*** You requested the use of the quadmath library and use +*** of long doubles. +*** +*** Please select one or the other. +EOM + exit 1 + ;; +esac + : Looking for optional libraries echo " " echo "Checking for optional libraries..." >&4 -- 2.1.4
From: Dan Collins <dcollinsn [...] gmail.com>
To: Perl RT Bug Tracker <perlbug-followup [...] perl.org>
Subject: Re: [perl #126203] "Perl v1305670057.0.0 required" in quadmath build
Date: Sun, 10 Jul 2016 22:40:39 -0400
Download (untitled) / with headers
text/plain 1.9k
I accidentally triggered this again today while debugging something else. Any chance Tony's patch can be applied?

On Sun, Apr 10, 2016 at 11:57 PM, Tony Cook via RT <perlbug-followup@perl.org> wrote:
Show quoted text
On Sat Sep 26 19:25:52 2015, dcollinsn@gmail.com wrote:
> Greetings Porters,
>
> While attempting to build a quadmath Perl on my shiny new 64-bit
> Debian VM, using the following command:
>
> ./Configure -Dusedevel -Dcc='ccache gcc' -Duselongdouble -Duse64bitall
> -Dusequadmath -Uman1dir -Uman3dir -des

Build with -Duselongdouble or -Dusequadmath - not both.

Building with both confuses the build, mostly because parts of the process test quadmath first and others test longdouble first.

The attached makes Configure abort if both are provided.

I considered having one override the other - but which did the user really want?

Tony

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=126203

From 99b748044ec2674a742600a470d753a96d9b55da Mon Sep 17 00:00:00 2001
From: Tony Cook <tony@develop-help.com>
Date: Mon, 11 Apr 2016 13:55:45 +1000
Subject: make Configure abort if both -Duselongdouble and -Dusequadmath are
 requested

See [perl #126203]
---
 Configure | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/Configure b/Configure
index 2e19e2c..69377ba 100755
--- a/Configure
+++ b/Configure
@@ -5238,6 +5238,20 @@ case "$usequadmath" in
 *)                    usequadmath="$undef"  ;;
 esac

+: Fail if both uselongdouble and usequadmath are requested
+case "$usequadmath:$uselongdouble" in
+define:define)
+       $cat <<EOM >&4
+
+*** You requested the use of the quadmath library and use
+*** of long doubles.
+***
+*** Please select one or the other.
+EOM
+       exit 1
+        ;;
+esac
+
 : Looking for optional libraries
 echo " "
 echo "Checking for optional libraries..." >&4
--
2.1.4



RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 304b
On Sun Jul 10 19:41:48 2016, dcollinsn@gmail.com wrote: Show quoted text
> I accidentally triggered this again today while debugging something > else. > Any chance Tony's patch can be applied?
Applied as a2c061044c1e87ae8e777d6134191760235db0de. Leaving the ticket open for now, because of the leak also reported. Tony
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 421b
On Sun, 10 Jul 2016 21:55:57 -0700, tonyc wrote: Show quoted text
> On Sun Jul 10 19:41:48 2016, dcollinsn@gmail.com wrote:
> > I accidentally triggered this again today while debugging something > > else. > > Any chance Tony's patch can be applied?
> > Applied as a2c061044c1e87ae8e777d6134191760235db0de. > > Leaving the ticket open for now, because of the leak also reported.
Fixed in fb926b48abdbc7a4f69369fa58417a8620abe15c. Tony


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org