Skip Menu |

This queue is for tickets about the Text-Iconv CPAN distribution.

Report information
The Basics
Id: 18648
Status: resolved
Priority: 0/
Queue: Text-Iconv

People
Owner: mxp [...] dynalabs.de
Requestors: cpan [...] pjedwards.co.uk
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 1.4
Fixed in: 1.5



Subject: Text::Iconv 1.44 patch for compile and test on VMS
Text-Iconv-1_4 Perl 5.87 on VMS Please find a patch attached. Summary of changes. Check object file extension. Remove period (.) from file linktest as this results in an invalid file on VMS (two periods). Removed linker options from compile line if VMS. If VMS pipe compile line to NL: Thanks, Peter (Stig) Edwards
Subject: Text-Iconv-1_4.diff
--- Text-Iconv-1_4/Iconv.xs 2006-04-09 19:10:20.1144609820 -0400 +++ Text-Iconv-1_4/Iconv.xs 2006-04-10 09:45:18.1144662318 -0400 @@ -106,7 +106,7 @@ while(inbytesleft != 0) { -#if (defined(__hpux) || defined(__linux)) && ! defined(_LIBICONV_VERSION) +#if (defined(__hpux) || defined(__linux) || defined(VMS)) && ! defined(_LIBICONV_VERSION) /* Even in HP-UX 11.00, documentation and header files do not agree */ /* glibc doesn't seem care too much about standards */ ret = iconv(obj->handle, &icursor, &inbytesleft, @@ -239,7 +239,7 @@ croak("Insufficient memory to initialize conversion: %s", strerror(errno)); case EINVAL: - croak("Unsupported conversion: %s", strerror(errno)); + croak("Unsupported conversion from: '%s' to: '%s' : %s", fromcode, tocode, strerror(errno)); default: croak("Couldn't initialize conversion: %s", strerror(errno)); } --- Text-Iconv-1_4/Makefile.PL 2006-04-09 19:10:20.1144609820 -0400 +++ Text-Iconv-1_4/Makefile.PL 2006-04-09 20:10:38.1144613438 -0400 @@ -27,6 +27,16 @@ $i++; } +my $obj_ext = '.o'; +if ($^O eq 'VMS') { + # check the object extension + if ($Config{ccflags} =~ m/obj=([a-z0-9\.]+)/) { + $obj_ext = $1; + } else { + $obj_ext = '.obj'; + } +} + ############################################################################### # Check for iconv. @@ -98,7 +108,7 @@ my $libs = shift; my $incs = shift; - my $file = '.linktest'; + my $file = 'linktest'; my $prog = <<EOT; #include <iconv.h> @@ -108,15 +118,23 @@ } EOT - my $compile = join ' ', $Config{cc}, $incs, $Config{ccflags}, - $Config{ldflags}, $libs; - # print "Compiler: $compile\n"; - open LINKTEST, '>', "$file.c" or die "Can't create test file"; + my $compile; + if ($^O ne 'VMS') { + $compile = join ' ', $Config{cc}, $incs, $Config{ccflags}, $Config{ldflags}, $libs; + } else { + $compile = join ' ', $Config{cc}, $incs, $Config{ccflags}, $libs; + } + print "\nCompiler:'$compile'\n"; + open LINKTEST, '>', "$file.c" or die "Can't create test file '$file.c'."; print LINKTEST $prog; close LINKTEST; - - my $result = system("$compile -o $file $file.c $libs 2> /dev/null") / 256; - unlink $file, "$file.c", "$file.o"; + my $compile_line = "$compile -o $file $file.c $libs 2> /dev/null"; + if ($^O eq 'VMS') { + $compile_line = "pipe $compile $file.c $libs 2> NL:"; + } + print "Compile line:'$compile_line'\n"; + my $result = system($compile_line) / 256; + unlink $file, "$file.c", "$file$obj_ext"; if ($result == 0) { --- Text-Iconv-1_4/t/01_charsets.t 2006-04-09 19:10:20.1144609820 -0400 +++ Text-Iconv-1_4/t/01_charsets.t 2006-04-09 20:10:38.1144613438 -0400 @@ -8,6 +8,8 @@ Text::Iconv->raise_error(1); +# Note on VMS codepages are found in SYS$I18N_ICONV + %codesets = ('iso88591' => [qw(iso88591 iso8859-1 iso-8859-1 ISO88591 ISO8859-1 ISO-8859-1 88591 8859-1)], 'cp037' => [qw(cp037 CP037 ibm037 IBM037 ibm-037 IBM-037)], @@ -39,6 +41,7 @@ elsif ($c1 == 0 or $c2 == 0) { print "ok $test_no \t # skip ($source <-> $target conversion not supported by iconv library)\n"; + print STDERR "source '$source' <-> target '$target' conversion not supported by iconv library.\n"; } else { @@ -55,11 +58,12 @@ elsif ($r2 eq $strings{$source}) { print "ok $test_no \t # ($source <-> $target)", $c1->retval, "/", $c2->retval,"\n"; + print STDERR "source '$source' <-> target '$target' conversion OK.\n"; } else { print "not ok $test_no \t # ($source <-> $target roundtrip failed)\n"; -print $c1->retval, "/", $c2->retval,"\n"; + print $c1->retval, "/", $c2->retval,"\n"; } } }
From: cpan [...] pjedwards.co.uk
By email: Show quoted text
>> Could you please test it on VMS?
The file timestamps in the pre-release version you sent by email really confused mmk (make on VMS), I was also confused. I had to touch everything to get it to build. After touching everything it built and passed all tests run. Thanks, Peter (Stig) Edwards
On Tue Apr 11 16:56:10 2006, guest wrote: Show quoted text
> By email: >
> >> Could you please test it on VMS?
> > The file timestamps in the pre-release version you sent by email > really confused mmk (make on VMS), I was also confused. > > I had to touch everything to get it to build.
Were the file times incorrect? Show quoted text
> After touching everything it built and passed all tests run.
Ok, that's great. I'll prepare a new release. Is there anything I can do about the file times issue?
From: cpan [...] pjedwards.co.uk
Show quoted text
>> Were the file times incorrect?
Not sure. See below. I see (on VMS): Apr 11 17:49:06 2006 0 Text-Iconv-1.4 Apr 11 17:49:06 2006 0 [Text-Iconv-1_4]t Apr 11 16:57:26 2006 3083 [Text-Iconv-1_4.t]01_charsets.t Dec 17 23:40:25 2000 121 [Text-Iconv-1_4.t]00_load.t Apr 11 16:38:02 2006 9427 [Text-Iconv-1_4]Iconv.xs Jul 17 22:18:53 2004 1401 [Text-Iconv-1_4]Changes Jul 17 22:25:46 2004 3643 [Text-Iconv-1_4]Iconv.pm Apr 11 17:49:06 2006 169 [Text-Iconv-1_4]MANIFEST Jun 28 19:10:48 2004 31 [Text-Iconv-1_4]typemap Apr 11 16:53:06 2006 3660 [Text-Iconv-1_4]Makefile.PL Jul 17 22:13:54 2004 3738 [Text-Iconv-1_4]README Apr 11 17:49:06 2006 294 [Text-Iconv-1_4]META.yml (on Linux (gzip,tar) and Windows(7-Zip)): -rw-r--r-- 1401 Jul 17 2004 Changes -rw-r--r-- 3643 Jul 17 2004 Iconv.pm -rw-r--r-- 9427 Apr 11 12:38 Iconv.xs -rw-r--r-- 3660 Apr 11 12:53 Makefile.PL -rw-r--r-- 169 Apr 11 13:49 MANIFEST -rw-r--r-- 294 Apr 11 13:49 META.yml -rw-r--r-- 3738 Jul 17 2004 README drwxr-xr-x 4096 Apr 11 13:49 t -rw-r--r-- 121 Dec 17 2000 00_load.t -rw-r--r-- 3083 Apr 11 12:57 01_charsets.t -rw-r--r-- 31 Jun 28 2004 typemap Note the 4 hour (TZ) difference. The only timestamps that look like they could cause problems are the ones for today, they were in the future when I first tried to build your pre-release, they are now in the past in my timezone and I just tried building without touching all the files and it works. Show quoted text
>> Is there anything I can do about the file times issue?
No. I think the pre-release is good. My problem was due to the VMS tar utility I think. Unless somebody to the west of me on the Aleutian Islands is running the pre-release on VMS today it should be good. Thanks Peter (Stig) Edwards (Look into enhancing the VMS tar utility with a flux capacitor.)
On Tue Apr 11 19:02:51 2006, guest wrote: Show quoted text
> >> Were the file times incorrect?
> > Not sure. See below. I see (on VMS): > > Apr 11 17:49:06 2006 0 Text-Iconv-1.4 > Apr 11 17:49:06 2006 0 [Text-Iconv-1_4]t > Apr 11 16:57:26 2006 3083 [Text-Iconv-1_4.t]01_charsets.t > Dec 17 23:40:25 2000 121 [Text-Iconv-1_4.t]00_load.t > Apr 11 16:38:02 2006 9427 [Text-Iconv-1_4]Iconv.xs > Jul 17 22:18:53 2004 1401 [Text-Iconv-1_4]Changes > Jul 17 22:25:46 2004 3643 [Text-Iconv-1_4]Iconv.pm > Apr 11 17:49:06 2006 169 [Text-Iconv-1_4]MANIFEST > Jun 28 19:10:48 2004 31 [Text-Iconv-1_4]typemap > Apr 11 16:53:06 2006 3660 [Text-Iconv-1_4]Makefile.PL > Jul 17 22:13:54 2004 3738 [Text-Iconv-1_4]README > Apr 11 17:49:06 2006 294 [Text-Iconv-1_4]META.yml > > (on Linux (gzip,tar) and Windows(7-Zip)): > > -rw-r--r-- 1401 Jul 17 2004 Changes > -rw-r--r-- 3643 Jul 17 2004 Iconv.pm > -rw-r--r-- 9427 Apr 11 12:38 Iconv.xs > -rw-r--r-- 3660 Apr 11 12:53 Makefile.PL > -rw-r--r-- 169 Apr 11 13:49 MANIFEST > -rw-r--r-- 294 Apr 11 13:49 META.yml > -rw-r--r-- 3738 Jul 17 2004 README > drwxr-xr-x 4096 Apr 11 13:49 t > -rw-r--r-- 121 Dec 17 2000 00_load.t > -rw-r--r-- 3083 Apr 11 12:57 01_charsets.t > -rw-r--r-- 31 Jun 28 2004 typemap > > Note the 4 hour (TZ) difference.
Interesting. While 16:53 would be the correct time for Makefile.PL in UTC, if the tar on VMS erroneously treats it as local time, this would lead to files with future dates. Show quoted text
> The only timestamps that look like they could cause problems are > the ones for today, they were in the future when I first tried > to build your pre-release, they are now in the past in my timezone > and I just tried building without touching all the files and it > works.
Ok, great. Show quoted text
> >> Is there anything I can do about the file times issue?
> > No. I think the pre-release is good. My problem was due to the > VMS tar utility I think. Unless somebody to the west of me on the > Aleutian Islands is running the pre-release on VMS today it should > be good.
Indeed, it looks like a bug in VMS tar. Ok, I'll make a release in the next few days. Show quoted text
> (Look into enhancing the VMS tar utility with a flux capacitor.)
Hehe, call me Emmett :-)
From: cpan [...] pjedwards.co.uk
By email: Show quoted text
>> which VMS version you tested Text::Iconv?
OpenVMS AXP V7.3-2 Show quoted text
>> did you use the native iconv implementation or a third-party library?
Native, "Compaq C Run-Time Library", the header does state that the defintions in it may not be available on all versions of OpenVMS. Thanks, Peter (Stig) Edwards (P.S. I found the "/DATE_POLICY=none" option on VMSTAR")
Finally released a new version, including the changes for VMS.
From: cpan [...] pjedwards.co.uk
On Thu Aug 30 09:06:07 2007, MPIOTR wrote: Show quoted text
> Finally released a new version, including the changes for VMS.
Thank you, I can confirm it compiles and passes it's tests on VMS V7.3-2 AXP and VMS V8.2-1 IA64 t/00_load........ ok t/01_charsets.... ok 10/13 skipped: various reasons All tests successful, 10 subtests skipped. Files=2, Tests=14, 9 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 CPU) Peter (Stig) Edwards
Show quoted text
> Thank you, I can confirm it compiles and passes it's tests > on VMS V7.3-2 AXP and VMS V8.2-1 IA64
Thank you for the feedback. I'm sorry it took so long to make a release.