I need Solaris testers for Crypt::Rijndael

brian_d_foy on 2007-10-11T15:06:01

I'm still trying to get Crypt::Rijndael to compile correctly everywhere *and* pass all the tests. I've had some reports of it compiling just fine on Solaris (using gcc and suncc), but then not doing the right thing. As such, I've added a test to encrypt a string then decrypt it to see if it comes out the same way. I need some people with access to Solaris (any version) to run Crypt::Rijndael-1.04_02 through CPAN.pm with CPAN::Reporter (and some other thing that reports to CPAN Testers).

The latest development release doesn't show any failures yet, but there is only one test for Solaris (2.9 using gcc).

Previously I was testing this with the Sourceforge compiler farm, but that's no longer available (and how much more sucky can Sourceforge get?). I've been looking for a nice VMWare image of Solaristoo :)


Here's what I see....

speters on 2007-10-11T16:35:33

Checking if your kit is complete...
Looks good
Writing Makefile for Crypt::Rijndael
cp Rijndael.pm blib/lib/Crypt/Rijndael.pm
/opt/SUNWspro/bin/cc -c   -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -DPERL_USE_SAFE_PUTENV -O   -DVERSION=\"1.04\" -DXS_VERSION=\"1.04\" -KPIC "-I/tmp/bleadperl/lib/5.10.0/i86pc-solaris/CORE"   _rijndael.c
"_rijndael.c", line 425: warning: integer overflow detected: op "<<"
"_rijndael.c", line 464: warning: integer overflow detected: op "<<"
/tmp/bleadperl/bin/perl5.10.0 /tmp/bleadperl/lib/5.10.0/ExtUtils/xsubpp  -typemap /tmp/bleadperl/lib/5.10.0/ExtUtils/typemap -typemap typemap  Rijndael.xs > Rijndael.xsc && mv Rijndael.xsc Rijndael.c
/opt/SUNWspro/bin/cc -c   -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -DPERL_USE_SAFE_PUTENV -O   -DVERSION=\"1.04\" -DXS_VERSION=\"1.04\" -KPIC "-I/tmp/bleadperl/lib/5.10.0/i86pc-solaris/CORE"   Rijndael.c
"Rijndael.xs", line 120: warning: argument #3 is incompatible with prototype:
        prototype: pointer to const unsigned char : "rijndael.h", line 112
        argument : pointer to char
"Rijndael.xs", line 162: warning: argument #4 is incompatible with prototype:
        prototype: pointer to unsigned char : "unknown", line 0
        argument : pointer to char
Running Mkbootstrap for Crypt::Rijndael ()
chmod 644 Rijndael.bs
rm -f blib/arch/auto/Crypt/Rijndael/Rijndael.so
/opt/SUNWspro/bin/cc  -G -L/usr/lib -L/usr/ccs/lib -L/opt/SUNWspro/prod/lib -L/lib -L/usr/local/lib _rijndael.o Rijndael.o  -o blib/arch/auto/Crypt/Rijndael/Rijndael.so        \
        \

chmod 755 blib/arch/auto/Crypt/Rijndael/Rijndael.so
cp Rijndael.bs blib/arch/auto/Crypt/Rijndael/Rijndael.bs
chmod 644 blib/arch/auto/Crypt/Rijndael/Rijndael.bs
Manifying blib/man3/Crypt::Rijndael.3
  BDFOY/Crypt-Rijndael-1.04.tar.gz
  /usr/bin/make -- OK
Running make test
/tmp/bleadperl/bin/perl5.10.0 "-MTest::Manifest" "-e" "run_t_manifest(0, 'blib/lib', 'blib/arch',  )"
Level is
Test::Manifest::test_harness found [t/00_load.t t/pod.t t/pod_coverage.t]
t/00_load.........FAILED tests 36, 38, 40
        Failed 3/41 tests, 92.68% okay
t/pod.............ok
t/pod_coverage....ok
Failed Test Stat Wstat Total Fail  List of Failed
------------------------------------------------------------------------ -------
t/00_load.t               41    3  36 38 40
Failed 1/3 test scripts. 3/43 subtests failed.
Files=3, Tests=43,  1 wallclock secs ( 0.38 cusr +  0.12 csys =  0.50 CPU)
Failed 1/3 test programs. 3/43 subtests failed.
make: *** [test_dynamic] Error 255
...and with prove....

[steve@sulu Crypt-Rijndael-1.04-HYXoPF]$ /tmp/bleadperl/bin/prove5.10.0 -bv t/00_load.t
t/00_load....1..41
ok 1
ok 2
ok 3
ok 4
ok 5
ok 6
ok 7
ok 8
ok 9
ok 10
ok 11
ok 12
ok 13
ok 14
ok 15
ok 16
ok 17
ok 18
ok 19
ok 20
ok 21
ok 22
ok 23
ok 24
ok 25
ok 26
ok 27
ok 28
ok 29
ok 30
ok 31
ok 32
ok 33
ok 34
ok 35
not ok 36
ok 37
not ok 38
ok 39
not ok 40
ok 41
FAILED tests 36, 38, 40
        Failed 3/41 tests, 92.68% okay
Failed Test Stat Wstat Total Fail  List of Failed
------------------------------------------------------------------------ -------
t/00_load.t               41    3  36 38 40
Failed 1/1 test scripts. 3/41 subtests failed.
Files=1, Tests=41,  0 wallclock secs ( 0.03 cusr +  0.01 csys =  0.04 CPU)
Failed 1/1 test programs. 3/41 subtests failed.
...using...

[steve@sulu Crypt-Rijndael-1.04-HYXoPF]$ uname -a
SunOS sulu 5.11 snv_40 i86pc i386 i86pc
[steve@sulu Crypt-Rijndael-1.04-HYXoPF]$ cc -V
cc: Sun C 5.8 2005/10/13

Re:Here's what I see....

brian_d_foy on 2007-10-11T16:58:25

I forgot to mention that I need this for the latest developer version (Crypt-Rijndael-1.04_02). That's where the extra tests are :)

UltraSparc T1 (Niagara)

link on 2007-10-11T17:59:50

No solaris but I tried on linux sparc.
All the tests passed but I got a few warnings.

Rijndael.xs: In function 'XS_Crypt__Rijndael_new':
Rijndael.xs:120: warning: pointer targets in passing argument 3 of 'rijndael_set up' differ in signedness
Rijndael.xs: In function 'XS_Crypt__Rijndael_encrypt':
Rijndael.xs:162: warning: pointer targets in passing argument 4 of '(ix) != 0l ? &block_decrypt : &block_encrypt' differ in signedness

Re:UltraSparc T1 (Niagara)

link on 2007-10-11T18:09:25

As above with 1.04_02 but with line number shifted 8

Solaris 8

brainsick on 2007-10-11T22:18:46

Hey brian,

I worked with you on getting Crypt::Rijndael to build on Solaris using the Sun Studio 10 C Compiler a while back so I figured I might part of your target audience. I'm not familiar with CPAN Testers (and don't have the time to familiarize myself with it right now), but I'm hoping this is still useful to you:

[user@unixbox1:/home/user/temp/Crypt-Rijndael-1.04_02]> uname -a
SunOS unixbox1 5.8 Generic_117350-49 sun4u sparc SUNW,Ultra-250
[user@unixbox1:/home/user/temp]> gunzip -cd Crypt-Rijndael-1.04_02.tar.gz | tar xvf -
x Crypt-Rijndael-1.04_02, 0 bytes, 0 tape blocks
x Crypt-Rijndael-1.04_02/_rijndael.c, 22777 bytes, 45 tape blocks
x Crypt-Rijndael-1.04_02/Changes, 2773 bytes, 6 tape blocks
x Crypt-Rijndael-1.04_02/COPYING, 23244 bytes, 46 tape blocks
x Crypt-Rijndael-1.04_02/examples, 0 bytes, 0 tape blocks
x Crypt-Rijndael-1.04_02/examples/README, 69 bytes, 1 tape blocks
x Crypt-Rijndael-1.04_02/LICENSE, 31 bytes, 1 tape blocks
x Crypt-Rijndael-1.04_02/Makefile.PL, 791 bytes, 2 tape blocks
x Crypt-Rijndael-1.04_02/MANIFEST, 350 bytes, 1 tape blocks
x Crypt-Rijndael-1.04_02/META.yml, 435 bytes, 1 tape blocks
x Crypt-Rijndael-1.04_02/NEWS, 369 bytes, 1 tape blocks
x Crypt-Rijndael-1.04_02/README, 2867 bytes, 6 tape blocks
x Crypt-Rijndael-1.04_02/rijndael.h, 5348 bytes, 11 tape blocks
x Crypt-Rijndael-1.04_02/Rijndael.pm, 2955 bytes, 6 tape blocks
x Crypt-Rijndael-1.04_02/Rijndael.xs, 3821 bytes, 8 tape blocks
x Crypt-Rijndael-1.04_02/t, 0 bytes, 0 tape blocks
x Crypt-Rijndael-1.04_02/t/00_load.t, 11396 bytes, 23 tape blocks
x Crypt-Rijndael-1.04_02/t/blocksize.t, 155 bytes, 1 tape blocks
x Crypt-Rijndael-1.04_02/t/cbc.t, 449 bytes, 1 tape blocks
x Crypt-Rijndael-1.04_02/t/cfb.t, 450 bytes, 1 tape blocks
x Crypt-Rijndael-1.04_02/t/ctr.t, 449 bytes, 1 tape blocks
x Crypt-Rijndael-1.04_02/t/ecb.t, 449 bytes, 1 tape blocks
x Crypt-Rijndael-1.04_02/t/lib, 0 bytes, 0 tape blocks
x Crypt-Rijndael-1.04_02/t/lib/mode.pl, 488 bytes, 1 tape blocks
x Crypt-Rijndael-1.04_02/t/ofb.t, 449 bytes, 1 tape blocks
x Crypt-Rijndael-1.04_02/t/pcbc.t, 545 bytes, 2 tape blocks
x Crypt-Rijndael-1.04_02/t/pod.t, 128 bytes, 1 tape blocks
x Crypt-Rijndael-1.04_02/t/pod_coverage.t, 160 bytes, 1 tape blocks
x Crypt-Rijndael-1.04_02/t/rt, 0 bytes, 0 tape blocks
x Crypt-Rijndael-1.04_02/t/rt/27632.t, 1040 bytes, 3 tape blocks
x Crypt-Rijndael-1.04_02/t/test_manifest, 171 bytes, 1 tape blocks
x Crypt-Rijndael-1.04_02/typemap, 28 bytes, 1 tape blocks
[user@unixbox1:/home/user/temp]> cd Crypt-Rijndael-1.04_02
[user@unixbox1:/home/user/temp/Crypt-Rijndael-1.04_02]> perl -v

This is perl, v5.8.8 built for sun4-solaris

Copyright 1987-2006, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
[user@unixbox1:/home/user/temp/Crypt-Rijndael-1.04_02]> perl Makefile.PL
WARNING: LICENSE is not a known parameter.
Checking if your kit is complete...
Looks good
'LICENSE' is not a known MakeMaker parameter name.
Writing Makefile for Crypt::Rijndael
[user@unixbox1:/home/user/temp/Crypt-Rijndael-1.04_02]> make
cp Rijndael.pm blib/lib/Crypt/Rijndael.pm /opt/SUNWspro/bin/cc -c -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -DVERSION=\"1.04_02\" -DXS_VERSION=\"1.04_02\" -KPIC "-I/usr/local/lib/perl5/5.8.8/sun4-solaris/CORE" _rijndael.c
"_rijndael.c", line 425: warning: integer overflow detected: op " Rijndael.xsc && mv Rijndael.xsc Rijndael.c /opt/SUNWspro/bin/cc -c -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -DVERSION=\"1.04_02\" -DXS_VERSION=\"1.04_02\" -KPIC "-I/usr/local/lib/perl5/5.8.8/sun4-solaris/CORE" Rijndael.c
"Rijndael.xs", line 128: warning: argument #3 is incompatible with prototype:
                prototype: pointer to const unsigned char : "rijndael.h", line 112
                argument : pointer to char
"Rijndael.xs", line 170: warning: argument #4 is incompatible with prototype:
                prototype: pointer to unsigned char : "unknown", line 0
                argument : pointer to char
Running Mkbootstrap for Crypt::Rijndael ()
chmod 644 Rijndael.bs
rm -f blib/arch/auto/Crypt/Rijndael/Rijndael.so /opt/SUNWspro/bin/cc -G -L/usr/lib -L/usr/ccs/lib -L/opt/SUNWspro/prod/lib/v8plus -L/opt/SUNWspro/prod/lib -L/lib -L/usr/local/lib _rijndael.o Rijndael.o -o blib/arch/auto/Crypt/Rijndael/Rijndael.so \
                \

chmod 755 blib/arch/auto/Crypt/Rijndael/Rijndael.so
cp Rijndael.bs blib/arch/auto/Crypt/Rijndael/Rijndael.bs
chmod 644 blib/arch/auto/Crypt/Rijndael/Rijndael.bs
Manifying blib/man3/Crypt::Rijndael.3
[user@unixbox1:/home/user/temp/Crypt-Rijndael-1.04_02]> make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00_load.........ok
t/blocksize.......ok
t/cbc.............ok
t/cfb.............ok
t/ctr.............ok
t/ecb.............ok
t/ofb.............ok
t/pcbc............ok
t/pod.............skipped
                all skipped: Test::Pod 1.00 required for testing POD
t/pod_coverage....skipped
                all skipped: Test::Pod::Coverage 1.00 required for testing POD coverage
All tests successful, 2 tests skipped.
Files=10, Tests=117, 4 wallclock secs ( 2.51 cusr + 0.74 csys = 3.25 CPU)

Pure Perl

djberg96 on 2007-10-12T19:51:07

Unless you really need the speed, I go with pure Perl and avoid the issue completely. Have you benchmarked the difference?

Re:Pure Perl

djberg96 on 2007-10-12T20:09:21

BTW, all tests pass on Solaris 10 using Sun Studio compiler 12 and a 32-bit Perl. Here's minor patch #1:

>diff -u _rijndael.orig _rijndael.c
--- rijndael.orig       Fri Oct 12 14:00:48 2007
+++ _rijndael.c Fri Oct 12 14:03:50 2007
@@ -422,7 +422,7 @@
     e = wtxt[j] & 0xff;
     e |= (wtxt[idx[1][j]]) & (0xff << 8);
     e |= (wtxt[idx[2][j]]) & (0xff << 16);
-    e |= (wtxt[idx[3][j]]) & (0xff << 24);
+    e |= (wtxt[idx[3][j]]) & (0xffU << 24);
     t[j] = e;
   }
   for (j=0; j<4; j++)
@@ -461,7 +461,7 @@
     e = wtxt[j] & 0xff;
     e |= (wtxt[iidx[1][j]]) & (0xff << 8);
     e |= (wtxt[iidx[2][j]]) & (0xff << 16);
-    e |= (wtxt[iidx[3][j]]) & (0xff << 24);
+    e |= (wtxt[iidx[3][j]]) & (0xffU << 24);
     t[j] = e;
   }
   for (j=0; j<4; j++)

Re:Pure Perl

brian_d_foy on 2007-10-14T20:37:09

Good patch, applied to 1.04_03. Thanks. :)

This also led me to figure out the other signedness warnings I've seen on some platforms. It compiles cleanly now (so far), but we'll see what the testers see now.

Thanks,

Solaris vmware and qemu images

elwarren on 2007-10-12T21:43:52

You can download qemu images of Solaris10x86 or OpenSolaris from the Free OS Zoo at this link. Try your luck at converting qemu images to vmware format.

http://www.oszoo.org/wiki/index.php/Special:Search?search=solaris&go=Go

Cheers, Warren

It works

drhyde on 2007-10-14T12:09:22

PASS on Solaris 2.9 with gcc.