Compiling DBI on Solaris: USE_LONG_DOUBLE
Compiling DBI on Solaris: USE_LONG_DOUBLE
am 06.01.2006 18:07:42 von caleb_tng
--0-836738908-1136567262=:3196
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Trying to compile DBI 1.50 on Solaris 8 using Sun WorkShop 6. The "40profile" test fails because dbi_profile_merge is returning way too many decimal places. Can I assume that this is due to my Perl 5.8.4 compiled with USE_LONG_DOUBLE ? I don't have the option to recompile Perl... Anyone have suggestions?
#> make test TEST_FILES="t/40profile.t"
PERL_DL_NONLAZY=1 /product/PERL5/5.8.4/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/40profile.t
t/40profile....ok 50/64# Test 60 got: '25 0.93 0.110000000000000000555111512312578 0.0100000000000000002081668171172169 0.230000000000000009992007221626409 1023110000 1023110010' (t/40profile.t at line 202)
t/40profile....ok 51/64# Expected: '25 0.93 0.11 0.01 0.23 1023110000 1023110010'
# t/40profile.t line 202 is: ok("@$totals", "25 0.93 0.11 0.01 0.23 1023110000 1023110010");
t/40profile....ok 53/64# Test 62 got: '27 2.93 0.110000000000000000555111512312578 0.0100000000000000002081668171172169 0.230000000000000009992007221626409 1023110000 1023110010' (t/40profile.t at line 211)
# Expected: '27 2.93 0.11 0.01 0.23 1023110000 1023110010'
# t/40profile.t line 211 is: ok("@$totals", "27 2.93 0.11 0.01 0.23 1023110000 1023110010");
t/40profile....FAILED tests 60, 62
Failed 2/64 tests, 96.88% okay
Failed Test Stat Wstat Total Fail Failed List of Failed
------------------------------------------------------------ -------------------
t/40profile.t 64 2 3.12% 60 62
Failed 1/1 test scripts, 0.00% okay. 2/64 subtests failed, 96.88% okay.
*** Error code 255
make: Fatal error: Command failed for target `test_dynamic'
#> perl -V
Summary of my perl5 (revision 5 version 8 subversion 4) configuration:
Platform:
osname=solaris, osvers=2.8, archname=sun4-solaris-64-ld
uname='sunos dssva044 5.8 generic_117000-03 sun4u sparc sunw,ultra-enterprise '
config_args='-Accflags=-xarch=v9'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=define use64bitall=define uselongdouble=define
usemymalloc=n, bincompat5005=undef
Compiler:
cc='/opt/SUNWspro/bin/cc', ccflags ='-xarch=v9 -I/usr/local/include -I/opt/local/include -xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O',
cppflags='-xarch=v9 -I/usr/local/include -I/opt/local/include'
ccversion='Sun WorkShop 6 2000/04/07 C 5.1', gccversion='', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=87654321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='long double', nvsize=16, Off_t='off_t', lseeksize=8
alignbytes=16, prototype=define
Linker and Libraries:
ld='/opt/SUNWspro/bin/cc', ldflags ='-L/usr/lib -L/usr/ccs/lib -L/opt/SUNWspro/WS6/lib/v9 -L/usr/local/lib -L/opt/local/lib -xlibmil -xarch=v9 '
libpth=/usr/lib /usr/ccs/lib /opt/SUNWspro/WS6/lib/v9 /usr/local/lib /opt/local/lib
libs=-lsocket -lnsl -ldl -lc -lsunmath
perllibs=-lsocket -lnsl -ldl -lc -lsunmath
libc=/usr/lib/sparcv9/libc.so, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -R /usr/perl5/5.8.4/sun4-solaris-64-ld/CORE'
cccdlflags='-KPIC', lddlflags='-G -xarch=v9 -xlibmil -L/usr/lib -L/usr/ccs/lib -L/opt/SUNWspro/WS6/lib/v9 -L/usr/local/lib -L/opt/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: USE_64_BIT_INT USE_64_BIT_ALL USE_LONG_DOUBLE USE_LARGE_FILES
Built under solaris
Compiled at Jun 24 2004 16:35:48
@INC:
/usr/perl5/5.8.4/sun4-solaris-64-ld
/usr/perl5/5.8.4
/usr/perl5/site_perl/5.8.4/sun4-solaris-64-ld
/usr/perl5/site_perl/5.8.4
/usr/perl5/site_perl/5.005
/usr/perl5/site_perl
/usr/perl5/vendor_perl/5.8.4/sun4-solaris-64-ld
/usr/perl5/vendor_perl/5.8.4
/usr/perl5/vendor_perl
.
--0-836738908-1136567262=:3196--
Re: Compiling DBI on Solaris: USE_LONG_DOUBLE
am 06.01.2006 19:05:51 von Tim.Bunce
On Fri, Jan 06, 2006 at 09:07:42AM -0800, Gerald Gallagher wrote:
> Trying to compile DBI 1.50 on Solaris 8 using Sun WorkShop 6. The "40profile" test fails because dbi_profile_merge is returning way too many decimal places. Can I assume that this is due to my Perl 5.8.4 compiled with USE_LONG_DOUBLE ? I don't have the option to recompile Perl... Anyone have suggestions?
You can ignore the 'failure'. The test need to be reworked to be less sensitive to this issue.
Tim.
>
> #> make test TEST_FILES="t/40profile.t"
> PERL_DL_NONLAZY=1 /product/PERL5/5.8.4/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/40profile.t
> t/40profile....ok 50/64# Test 60 got: '25 0.93 0.110000000000000000555111512312578 0.0100000000000000002081668171172169 0.230000000000000009992007221626409 1023110000 1023110010' (t/40profile.t at line 202)
> t/40profile....ok 51/64# Expected: '25 0.93 0.11 0.01 0.23 1023110000 1023110010'
> # t/40profile.t line 202 is: ok("@$totals", "25 0.93 0.11 0.01 0.23 1023110000 1023110010");
> t/40profile....ok 53/64# Test 62 got: '27 2.93 0.110000000000000000555111512312578 0.0100000000000000002081668171172169 0.230000000000000009992007221626409 1023110000 1023110010' (t/40profile.t at line 211)
> # Expected: '27 2.93 0.11 0.01 0.23 1023110000 1023110010'
> # t/40profile.t line 211 is: ok("@$totals", "27 2.93 0.11 0.01 0.23 1023110000 1023110010");
> t/40profile....FAILED tests 60, 62
> Failed 2/64 tests, 96.88% okay
> Failed Test Stat Wstat Total Fail Failed List of Failed
> ------------------------------------------------------------ -------------------
> t/40profile.t 64 2 3.12% 60 62
> Failed 1/1 test scripts, 0.00% okay. 2/64 subtests failed, 96.88% okay.
> *** Error code 255
> make: Fatal error: Command failed for target `test_dynamic'
> #> perl -V
> Summary of my perl5 (revision 5 version 8 subversion 4) configuration:
> Platform:
> osname=solaris, osvers=2.8, archname=sun4-solaris-64-ld
> uname='sunos dssva044 5.8 generic_117000-03 sun4u sparc sunw,ultra-enterprise '
> config_args='-Accflags=-xarch=v9'
> hint=recommended, useposix=true, d_sigaction=define
> usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
> useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
> use64bitint=define use64bitall=define uselongdouble=define
> usemymalloc=n, bincompat5005=undef
> Compiler:
> cc='/opt/SUNWspro/bin/cc', ccflags ='-xarch=v9 -I/usr/local/include -I/opt/local/include -xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
> optimize='-O',
> cppflags='-xarch=v9 -I/usr/local/include -I/opt/local/include'
> ccversion='Sun WorkShop 6 2000/04/07 C 5.1', gccversion='', gccosandvers=''
> intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=87654321
> d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
> ivtype='long', ivsize=8, nvtype='long double', nvsize=16, Off_t='off_t', lseeksize=8
> alignbytes=16, prototype=define
> Linker and Libraries:
> ld='/opt/SUNWspro/bin/cc', ldflags ='-L/usr/lib -L/usr/ccs/lib -L/opt/SUNWspro/WS6/lib/v9 -L/usr/local/lib -L/opt/local/lib -xlibmil -xarch=v9 '
> libpth=/usr/lib /usr/ccs/lib /opt/SUNWspro/WS6/lib/v9 /usr/local/lib /opt/local/lib
> libs=-lsocket -lnsl -ldl -lc -lsunmath
> perllibs=-lsocket -lnsl -ldl -lc -lsunmath
> libc=/usr/lib/sparcv9/libc.so, so=so, useshrplib=true, libperl=libperl.so
> gnulibc_version=''
> Dynamic Linking:
> dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -R /usr/perl5/5.8.4/sun4-solaris-64-ld/CORE'
> cccdlflags='-KPIC', lddlflags='-G -xarch=v9 -xlibmil -L/usr/lib -L/usr/ccs/lib -L/opt/SUNWspro/WS6/lib/v9 -L/usr/local/lib -L/opt/local/lib'
>
> Characteristics of this binary (from libperl):
> Compile-time options: USE_64_BIT_INT USE_64_BIT_ALL USE_LONG_DOUBLE USE_LARGE_FILES
> Built under solaris
> Compiled at Jun 24 2004 16:35:48
> @INC:
> /usr/perl5/5.8.4/sun4-solaris-64-ld
> /usr/perl5/5.8.4
> /usr/perl5/site_perl/5.8.4/sun4-solaris-64-ld
> /usr/perl5/site_perl/5.8.4
> /usr/perl5/site_perl/5.005
> /usr/perl5/site_perl
> /usr/perl5/vendor_perl/5.8.4/sun4-solaris-64-ld
> /usr/perl5/vendor_perl/5.8.4
> /usr/perl5/vendor_perl
> .
>
Re: Compiling DBI on Solaris: USE_LONG_DOUBLE
am 11.01.2006 14:16:50 von Tim.Bunce
On Fri, Jan 06, 2006 at 06:05:51PM +0000, Tim Bunce wrote:
> On Fri, Jan 06, 2006 at 09:07:42AM -0800, Gerald Gallagher wrote:
> > Trying to compile DBI 1.50 on Solaris 8 using Sun WorkShop 6. The "40profile" test fails because dbi_profile_merge is returning way too many decimal places. Can I assume that this is due to my Perl 5.8.4 compiled with USE_LONG_DOUBLE ? I don't have the option to recompile Perl... Anyone have suggestions?
>
> You can ignore the 'failure'. The test need to be reworked to be less sensitive to this issue.
Gerald, can you try the appended change for me?
Tim.
---snip---
Index: t/40profile.t
============================================================ =======
--- t/40profile.t (revision 2308)
+++ t/40profile.t (working copy)
@@ -199,7 +199,8 @@
[ 10, 0.51, 0.11, 0.01, 0.22, 1023110000, 1023110010 ],
[ 15, 0.42, 0.12, 0.02, 0.23, 1023110005, 1023110009 ],
);
-ok("@$totals", "25 0.93 0.11 0.01 0.23 1023110000 1023110010");
+$_ = sprintf "%.2f", $_ for @$totals; # avoid precision issues
+ok("@$totals", "25.00 0.93 0.11 0.01 0.23 1023110000.00 1023110010.00");
ok($total_time, 0.93);
$total_time = dbi_profile_merge(
@@ -208,7 +209,8 @@
bar => [ 17, 1.42, 0.12, 0.02, 0.23, 1023110005, 1023110009 ],
}
);
-ok("@$totals", "27 2.93 0.11 0.01 0.23 1023110000 1023110010");
+$_ = sprintf "%.2f", $_ for @$totals; # avoid precision issues
+ok("@$totals", "27.00 2.93 0.11 0.01 0.23 1023110000.00 1023110010.00");
ok($total_time, 2.93);
# check that output went into the log file
---snip---