Skip Menu |

This queue is for tickets about the Math-Prime-Util-GMP CPAN distribution.

Report information
The Basics
Id: 109042
Status: resolved
Worked: 45 min
Priority: 0/
Queue: Math-Prime-Util-GMP

People
Owner: DANAJ [...] cpan.org
Requestors: TODDR [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.34
Fixed in: 0.35



Subject: Problems compiling on 32bit linux with maximum 64bit perl
I have quick access to perl 5.14.4 and perl 5.22.0. Both fail in the same way listed below. It is my theory that this is a result of compiling maximal 64bit int perl on a 32 bit system. I've checked CPAN testers and established you have nobody testing this profile for linux. PERL_DL_NONLAZY=1 /usr/local/perl/514/bin/perl "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/01-load.t .................. ok t/02-can.t ................... ok t/10-isprime.t ............... ok t/11-primes.t ................ ok t/12-nextprime.t ............. ok t/13-primecount.t ............ ok t/15-probprime.t ............. ok t/16-provableprime.t ......... ok t/17-pseudoprime.t ........... ok t/19-moebius.t ............... ok t/20-primorial.t ............. ok t/21-conseq-lcm.t ............ ok t/22-partitions.t ............ ok t/23-gcd.t ................... 1/157 # Failed test 'gcdext(22,242) = [1 0 22]' # at t/23-gcd.t line 219. # Structures begin differing at: # $got->[0] = '-120' # $expected->[0] = '1' # Failed test 'gcdext(42272720,12439910) = [-21984 74705 70]' # at t/23-gcd.t line 219. # Structures begin differing at: # $got->[0] = '4065415' # $expected->[0] = '-21984' # Failed test 'gcdext(10139483024654235947,8030280778952246347) = [-2715309548282941287 3428502169395958570 1]' # at t/23-gcd.t line 219. # Structures begin differing at: # $got->[0] = '5314971230669305060' # $expected->[0] = '-2715309548282941287' # Looks like you failed 3 tests of 157. t/23-gcd.t ................... Dubious, test returned 3 (wstat 768, 0x300) Failed 3/157 subtests t/24-bernfrac.t .............. ok t/25-pi.t .................... ok t/26-mersenne.t .............. ok t/27-clusters.t .............. ok t/50-factoring.t ............. ok t/90-release-perlcritic.t .... skipped: these tests are for release candidate testing t/91-release-pod-syntax.t .... skipped: these tests are for release candidate testing t/92-release-pod-coverage.t .. skipped: these tests are for release candidate testing t/93-release-spelling.t ...... skipped: these tests are for release candidate testing Test Summary Report ------------------- t/23-gcd.t (Wstat: 768 Tests: 157 Failed: 3) Failed tests: 119, 121-122 Non-zero exit status: 3 Files=23, Tests=2646, 6 wallclock secs ( 0.36 usr 0.03 sys + 6.21 cusr 0.09 csys = 6.69 CPU) Result: FAIL Failed 1/23 test programs. 3/2646 subtests failed. make: *** [test_dynamic] Error 255
My perl: $>perl -V Summary of my perl5 (revision 5 version 14 subversion 4) configuration: Platform: osname=linux, osvers=2.6.32-358.23.2.el6.i686, archname=i386-linux-64int uname='linux rpmb-32-centos-6 2.6.32-358.23.2.el6.i686 #1 smp wed oct 16 17:21:31 utc 2013 i686 i686 i386 gnulinux ' config_args='-des -Dusedevel -Darchname=i386-linux-64int -Dcc=/usr/bin/gcc -Dcpp=/usr/bin/cpp -DDEBUGGING=none -Doptimize=-Os -Dusemymalloc=n -Duseshrplib -Duselargefiles=yes -Duseposix=true -Dhint=recommended -Duseperlio=yes -Dccflags=-I/usr/local/perl/514/include -L/usr/local/perl/514/lib -I/usr/local/include -L/usr/local/lib -Dcppflags=-I/usr/local/perl/514/include -L/usr/local/perl/514/lib -I/usr/local/include -L/usr/local/lib -Dldflags=-Wl,-rpath -Wl,/usr/local/perl/514/lib -L/usr/local/perl/514/lib -L/usr/local/lib -Dprefix=/usr/local/perl/514 -Dusevendorprefix=true -Dvendorbin=/usr/local/perl/514/bin -Dvendorprefix=/usr/local/perl/514/lib/perl5 -Dvendorlib=/usr/local/perl/514/lib/perl5/cpanel_lib -Dprivlib=/usr/local/perl/514/lib/perl5/5.14.4 -Dman1dir=none -Dman3dir=none -Dscriptdir=/usr/local/perl/514/bin -Dscriptdirexp=/usr/local/perl/514/bin -Dsiteman1dir=none -Dsiteman3dir=none -Dinstallman1dir=none -Dversiononly=no -Dinstallusrbinperl=no -Dcf_by=cPanel -Dmyhostname=localhost -Dperladmin=root@localhost -Dcf_email=support@cpanel.net -Di_dbm=/usr/local/include -Di_gdbm=/usr/local/include -Di_ndbm=/usr/local/include -Ud_dosuid -Uuserelocatableinc -Umad -Uusethreads -Uusemultiplicity -Uusesocks -Uuselongdouble -Ui_db -Aldflags=-L/usr/local/perl/514/lib -L/usr/local/lib -L/usr/lib -L/lib -lgdbm -Dlocincpth=/usr/local/perl/514/include /usr/local/include /usr/local/include -Duse64bitint -Uuse64bitall -Acflags=-fPIC -DPIC -m32 -I/usr/local/perl/514/include -I/usr/local/include -Dlibpth=/usr/local/perl/514/lib /usr/local/lib /usr/local/lib /lib /usr/lib ' hint=recommended, useposix=true, d_sigaction=define useithreads=undef, usemultiplicity=undef useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=define, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='/usr/bin/gcc', ccflags ='-I/usr/local/perl/514/include -L/usr/local/perl/514/lib -I/usr/local/include -L/usr/local/lib -DAPPLLIB_EXP="/usr/local/cpanel" -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-Os', cppflags='-I/usr/local/perl/514/include -L/usr/local/perl/514/lib -I/usr/local/include -L/usr/local/lib -I/usr/local/perl/514/include -L/usr/local/perl/514/lib -I/usr/local/include -L/usr/local/lib -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include' ccversion='', gccversion='4.4.7 20120313 (Red Hat 4.4.7-3)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='/usr/bin/gcc', ldflags ='-Wl,-rpath -Wl,/usr/local/perl/514/lib -L/usr/local/perl/514/lib -L/usr/local/lib -L/usr/local/perl/514/lib -L/usr/local/lib -L/usr/lib -L/lib -lgdbm -fstack-protector -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc libc=/lib/libc-2.12.so, so=so, useshrplib=true, libperl=libperl.so gnulibc_version='2.12' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/local/perl/514/lib/perl5/5.14.4/i386-linux-64int/CORE' cccdlflags='-fPIC', lddlflags='-shared -Os -L/usr/local/perl/514/lib -L/usr/local/lib -L/usr/lib -L/lib -L/usr/local/lib -fstack-protector' Characteristics of this binary (from libperl): Compile-time options: PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP PERL_PRESERVE_IVUV PERL_USE_DEVEL USE_64_BIT_INT USE_LARGE_FILES USE_PERLIO USE_PERL_ATOF Locally applied patches: cPanel patches cPanel INC path changes Disabled some unstable tests on a kvm build server Cherry pick of 49498ca from p5p (RT 113514) Remove improper use of each() in B::walksymtable (5cc8528c90) Built under linux Compiled at Dec 16 2014 16:27:15 %ENV: PERL5LIB="" PERL5OPT="" PERL5_CPANPLUS_IS_RUNNING="29434" PERL5_CPAN_IS_RUNNING="29434" @INC: /usr/local/perl/514/lib/perl5/cpanel_lib/i386-linux-64int /usr/local/perl/514/lib/perl5/cpanel_lib /usr/local/perl/514/lib/perl5/5.14.4/i386-linux-64int /usr/local/perl/514/lib/perl5/5.14.4
On Mon Nov 16 18:44:33 2015, TODDR wrote: Show quoted text
> I have quick access to perl 5.14.4 and perl 5.22.0. Both fail in the > same way listed below. It is my theory that this is a result of > compiling maximal 64bit int perl on a 32 bit system.
This is actually caused by using a very old version of GMP that has incorrect results for gcdext. I wrote new code last week to implement it by hand for old versions. I believe it was fixed in 5.0.5. Thanks for the report.
On Mon Nov 16 19:19:06 2015, DANAJ wrote: Show quoted text
> > This is actually caused by using a very old version of GMP that has > incorrect results for gcdext. I wrote new code last week to implement > it by hand for old versions. I believe it was fixed in 5.0.5. > > Thanks for the report.
Good info. Thanks! On CentOS 6, they seem to be shipping this: gmp-devel-4.3.1-7.el6_2.2.i686 gmp-4.3.1-7.el6_2.2.i686 One last question. Given this fails is there any danger of my installing it anyway?
On Mon Nov 16 19:24:41 2015, TODDR wrote: Show quoted text
> > One last question. Given this fails is there any danger of my > installing it anyway?
I don't believe so. This would only affect something calling gcdext (not internal) and furthermore something that wants the signs to be correct in all cases. It's not so much that the old results were wrong but which correct result you got wasn't very clear. Now it is and matches Pari/GP as well. I'll try to get a new version out soon.
Use our gcdext code if GMP version < 5. Also always enforce the 5.1.2+ behavior with both arguments zero.