Re: ExtUtils::CBuilder on VMS (was Re: Phalanxing MakeMaker)

2005-03-15 Thread Ken Williams
On Mar 14, 2005, at 3:55 PM, [EMAIL PROTECTED] wrote:
Hmm - well I suppose I should mention a few tricky aspects
of using MCR on VMS.
[snip]
Thanks for letting me know.  I'll make sure I'm careful with it. =)
I released a non-beta version of ExtUtils::CBuilder that should contain 
all the patches necessary for VMS workitude.  Thanks for your help with 
it.

 -Ken


Re: ExtUtils::CBuilder on VMS (was Re: Phalanxing MakeMaker)

2005-03-14 Thread PPrymmer
Ken Williams [EMAIL PROTECTED] wrote on 03/12/2005 10:35:22 PM:

 On Mar 12, 2005, at 7:18 PM, Ken Williams wrote:
 
  Excellent.  I just have one question, then, about the following line:
 
my @lddlflags = $args{lddl} ? ($cf-{lddlflags}.=$out) :
  (/exe=$out);
 
  What is the original value of $cf-{lddlflags} such that it makes
  sense to just append =$out to it?

 Scratch that, I think I see how it works.

 Care to try the 0.09_02 revision, hitting CPAN now?

OK that one is much close to what I thought you were aiming at :-)
It turns out there was an override typo in VMS.pm and t/02-link.t
was left as is.  This time around I have checked the return $STATUS
of the compilet program in a vmsish fashion, that was done so as
not to hurt the successful run on Solaris (where vmsish.pm is not
installed and this might be considered a bug in the installperl script
that ships with perl).
Here is a patch against 0.09_02 that addresses
both issues and passes both tests on VMS + perl 5.8.1 and
Solaris + perl 5.6.1:

diff -ru ExtUtils-CBuilder-0_09_02_orig/lib/ExtUtils/CBuilder/Platform/VMS.pm 
ExtUtils-CBuilder-0.09_02/lib/ExtUtils/CBuilder/Platform/VMS.pm
--- ExtUtils-CBuilder-0_09_02_orig/lib/ExtUtils/CBuilder/Platform/VMS.pm  
2005-03-12 22:28:29.0 -0500
+++ ExtUtils-CBuilder-0.09_02/lib/ExtUtils/CBuilder/Platform/VMS.pm 
2005-03-14 12:40:24.628116000 -0500
@@ -25,7 +25,7 @@
   return (/exe=$file);
 }

-sub arg_shared_object_file {
+sub arg_share_object_file {
   my ($self, $file) = @_;
   return ($self-{config}{lddlflags}=$file);
 }
diff -ru ExtUtils-CBuilder-0_09_02_orig/t/02-link.t 
ExtUtils-CBuilder-0.09_02/t/02-link.t
--- ExtUtils-CBuilder-0_09_02_orig/t/02-link.t  2005-03-12 22:28:29.0 
-0500
+++ ExtUtils-CBuilder-0.09_02/t/02-link.t 2005-03-14 14:14:44.794097000 -0500
@@ -7,6 +7,10 @@
 print 1..0 # Skipped: link_executable() is not implemented yet on 
Win32\n;
 exit;
   }
+  if ($^O eq 'VMS') {
+require vmsish;
+import vmsish;
+  }
   plan tests = 5;
 }

@@ -35,8 +39,14 @@
 ok $exe_file;

 # Try the executable
-my $retval = system($exe_file);
-ok $retval  8, 11;
+if ($^O eq 'VMS') {
+  my $retval = system(mcr $exe_file);
+  ok $retval, 11;
+}
+else {
+  my $retval = system($exe_file);
+  ok $retval  8, 11;
+}

 # Clean up
 for ($source_file, $exe_file, $object_file, @temps) {
End of Patch.

For what it is worth in answer to the first of your questions:

$ perl -V:lddlflags
lddlflags='/Share';

Peter Prymmer

Also see the attachment (to disambiguate line wrap issues):

(See attached file: ec.patch)


ec.patch
Description: Binary data


Re: ExtUtils::CBuilder on VMS (was Re: Phalanxing MakeMaker)

2005-03-14 Thread Ken Williams
On Mar 14, 2005, at 1:30 PM, [EMAIL PROTECTED] wrote:
OK that one is much close to what I thought you were aiming at :-)
It turns out there was an override typo in VMS.pm and t/02-link.t
was left as is.
Oops!  That was me forgetting to apply the 02-link.t part of the patch.

This time around I have checked the return $STATUS
of the compilet program in a vmsish fashion, that was done so as
not to hurt the successful run on Solaris (where vmsish.pm is not
installed and this might be considered a bug in the installperl script
that ships with perl).
Here is a patch against 0.09_02 that addresses
both issues and passes both tests on VMS + perl 5.8.1 and
Solaris + perl 5.6.1:
Thanks, applied verbatim (except that I moved the system() call into a 
my_system() subroutine in case I want to use it again later).

 -Ken


Re: ExtUtils::CBuilder on VMS (was Re: Phalanxing MakeMaker)

2005-03-12 Thread Ken Williams
On Mar 12, 2005, at 7:18 PM, Ken Williams wrote:
Excellent.  I just have one question, then, about the following line:
  my @lddlflags = $args{lddl} ? ($cf-{lddlflags}.=$out) : 
(/exe=$out);

What is the original value of $cf-{lddlflags} such that it makes 
sense to just append =$out to it?
Scratch that, I think I see how it works.
Care to try the 0.09_02 revision, hitting CPAN now?
 -Ken


Re: ExtUtils::CBuilder on VMS (was Re: Phalanxing MakeMaker)

2005-03-10 Thread Ken Williams
Any takers on this?  Ping?
 -Ken
On Mar 6, 2005, at 9:50 AM, Ken Williams wrote:
On Mar 4, 2005, at 6:39 PM, [EMAIL PROTECTED] wrote:
Yes the -foo switches have caused trouble.
[snip]
Er, sorry at this time I do not have a patch :-)
Care to try 0.09_01, which is now hitting CPAN?  I've split out the 
generation of command-line switches so it can easily be overridden for 
VMS.  So compile() might work now.  link() and friends haven't been 
touched, though.

 -Ken



Re: Phalanxing MakeMaker

2005-03-04 Thread Michael G Schwern
On Thu, Feb 24, 2005 at 11:47:31AM -0600, Ken Williams wrote:
 Better would be to snark it from ExtUtils::CBuilder, which has a 
 has_compiler() method.

How portable is this?  I see there's some minimal VMS and OS/2 code in
there, will it work?

If so then the MakeMaker tests can just use have_compiler() to determine
if they should run the XS tests if ExtUtils::CBuilder is installed.



Re: Phalanxing MakeMaker

2005-03-04 Thread Ken Williams
On Mar 4, 2005, at 4:07 PM, Michael G Schwern wrote:
On Thu, Feb 24, 2005 at 11:47:31AM -0600, Ken Williams wrote:
Better would be to snark it from ExtUtils::CBuilder, which has a
has_compiler() method.
How portable is this?  I see there's some minimal VMS and OS/2 code in
there, will it work?
It should work.  Though I've never actually *seen* a VMS or OS/2  
machine, so I'm not actually sure they exist.

All the cpantesters reports are pretty peachy, but there really aren't  
many exotic platforms there:

   
http://testers.cpan.org/show/ExtUtils-CBuilder.html#ExtUtils-CBuilder 
-0.09

If it doesn't work on all platforms, those are bugs that need to be  
fixed.

 -Ken


ExtUtils::CBuilder on VMS (was Re: Phalanxing MakeMaker)

2005-03-04 Thread Michael G Schwern
On Fri, Mar 04, 2005 at 04:42:38PM -0600, Ken Williams wrote:
 All the cpantesters reports are pretty peachy, but there really aren't  
 many exotic platforms there:

 http://testers.cpan.org/show/ExtUtils-CBuilder.html#ExtUtils-CBuilder 
 -0.09
 
 If it doesn't work on all platforms, those are bugs that need to be  
 fixed.

Here's my attempt at running mms test on VMS with 5.8.0.

$ perl -Iblib/lib t/01-basic.t
1..11
ok 1
ok 2
CC/DECC -Iperl_root:[lib.VMS_AXP.5_8_0.CORE] -c /Include=[]/Standard=Relaxed_ANS
I/Prefix=All/Obj=.obj /NOANSI_ALIAS/float=ieee/ieee=denorm_results /NoList -o US
ER1:[SCHWERN]compilet.obj USER1:[SCHWERN]compilet.c
%DCL-W-MAXPARM, too many parameters - reenter command with fewer parameters
%DCL-W-MAXPARM, too many parameters - reenter command with fewer parameters
error building USER1:[SCHWERN]compilet.obj from 'USER1:[SCHWERN]compilet.c' at b
lib/lib/ExtUtils/CBuilder/Base.pm line 65.
not ok 3
# Failed test 3 in t/01-basic.t at line 14
ok 4
ok 5
CC/DECC -Iperl_root:[lib.VMS_AXP.5_8_0.CORE] -c /Include=[]/Standard=Relaxed_ANS
I/Prefix=All/Obj=.obj /NOANSI_ALIAS/float=ieee/ieee=denorm_results /NoList -o [.
t]compilet.obj [.t]compilet.c
%DCL-W-MAXPARM, too many parameters - reenter command with fewer parameters
%DCL-W-MAXPARM, too many parameters - reenter command with fewer parameters
error building [.t]compilet.obj from '[.t]compilet.c' at blib/lib/ExtUtils/CBuil
der/Base.pm line 65.
%RMS-E-FNF, file not found

$ perl -Iblib/lib t/02-link.t
1..5
ok 1
ok 2
CC/DECC -Iperl_root:[lib.VMS_AXP.5_8_0.CORE] -c /Include=[]/Standard=Relaxed_ANS
I/Prefix=All/Obj=.obj /NOANSI_ALIAS/float=ieee/ieee=denorm_results /NoList -o [.
t]compilet.obj [.t]compilet.c
%DCL-W-MAXPARM, too many parameters - reenter command with fewer parameters
%DCL-W-MAXPARM, too many parameters - reenter command with fewer parameters
error building [.t]compilet.obj from '[.t]compilet.c' at blib/lib/ExtUtils/CBuil
der/Base.pm line 65.
%RMS-E-FNF, file not found


There's some assumptions there which aren't going to fly.  Pretty much
anything of the -foo form is likely to be wrong on VMS.  Looks like most
of ExtUtils::CBuilder::Base-compile() will have to be overridden.  You
can probably figure it out from ExtUtils::MM_VMS though it won't be pretty.

And at this point I kick this over to the vmsperl folks.



Phalanxing MakeMaker

2005-02-24 Thread Michael G Schwern
For any brave Phalanx folks who wish to target MakeMaker I can point you at
some critically deficient areas of its testing.

1)  XS.  There is absolutely no testing of XS code.  The primary problem is
determining if the user has a working build chain.  I think Module::Build 
has code to do this and it might be possible to crib from that.  Even just
writing the build chain detection code would prove a big help.

2)  Common customizations.  MakeMaker doesn't have much of an API for
altering the Makefile so users are forced to do s/// over the make code to
do anything interesting.  Apparently innocent internal formatting changes
and renaming of internal targets can often break these customizations.
The more common customizations need to be identified and tests for them
written.  Modules to look at include Mail::SpamAssassin, PDL, mod_perl, Tk,
WxPerl, Archive::Zip and Apache::PageKit (IIRC).  Even if you don't actually
write the tests, just a catalogue of common customizations, possibly
posted on the MakeMaker wiki, would prove useful.

Consult the PATCHING document for some information as to MakeMaker's, umm,
special cross platform considerations.



Re: Phalanxing MakeMaker

2005-02-24 Thread Ken Williams
On Feb 23, 2005, at 6:08 PM, Michael G Schwern wrote:
For any brave Phalanx folks who wish to target MakeMaker I can point 
you at
some critically deficient areas of its testing.

1)  XS.  There is absolutely no testing of XS code.  The primary 
problem is
determining if the user has a working build chain.  I think 
Module::Build
has code to do this and it might be possible to crib from that.  Even 
just
writing the build chain detection code would prove a big help.
Better would be to snark it from ExtUtils::CBuilder, which has a 
has_compiler() method.  One could also look at ExtUtils::ParseXS, which 
is simply a modularization of xsubpp.

 -Ken