Re: VMS, configure.com and nonxs_ext

2009-09-08 Thread Nicholas Clark
On Mon, Sep 07, 2009 at 05:15:51PM -0500, Craig A. Berry wrote:
 
 On Sep 7, 2009, at 4:46 PM, Nicholas Clark wrote:
 
 On Mon, Sep 07, 2009 at 08:55:29PM +0100, Nicholas Clark wrote:
 This might be rather a big favour request.
 
 This might be easier than I first thought
 
 It occurred to me we ought to revisit this after getting vms/ext into  
 ext.  I don't think it will be huge, but it does involve grokking some  
 DCL that has to work rather hard to do what it's doing.  I'll take a  
 look.
 
 Would it be possible to augment the configure.com code that finds  
 extensions
 to correctly partition nonxs_extensions from known_extensions?
 (being the rather bonkers way that Configure partitions XS and non-XS
 extensions)
 
 
 There's also dynamic_ext, right?  Shouldn't dynamic_ext plus  
 nonxs_extensions equal known_extensions?

Well, probably it should, but what actually happens is:

$ cat extensions.pl
#!perl -w
use strict;
use Config;

printf %-24s, 'extensions';

my @types = qw(static_ext dynamic_ext nonxs_ext known_extensions);
my %lookup;
my %short;
foreach (@types) {
my $short = $_;
$short =~ s/_.*//;
$short{$_} = $short;

printf %-8s, $short;
$lookup{$_} = {map {$_, 1} split/ /, $Config{$_}};
}
print \n\n;

foreach my $ext (sort split / /, $Config{extensions}) {
printf %-24s, $ext;
foreach (@types) {
printf %-8s, $lookup{$_}{$ext} ? $short{$_} : '';
}
print \n;
}

__END__
$ ./perl -Ilib extensions.pl 
extensions  static  dynamic nonxs   known   

Archive/Extract nonxs   
Archive/Tar nonxs   
Attribute/Handlers  nonxs   
B   dynamic known   
B/Debug nonxs   
B/Deparse   nonxs   
B/Lint  nonxs   
CGI nonxs   
CPANPLUSnonxs   
CPANPLUS/Dist/Build nonxs   
Compress/Raw/Bzip2  dynamic known   
Compress/Raw/Zlib   dynamic known   
Cwd dynamic known   
DB_File dynamic known   
Data/Dumper dynamic known   
Devel/DProf dynamic known   
Devel/PPPortdynamic known   
Devel/Peek  dynamic known   
Devel/SelfStubber   nonxs   
Digest  nonxs   
Digest/MD5  dynamic known   
Digest/SHA  dynamic known   
Encode  dynamic known   
Errno   nonxs   
Fcntl   dynamic known   
File/Fetch  nonxs   
File/Glob   dynamic known   
FileCache   nonxs   
Filter/Simple   nonxs   
Filter/Util/Calldynamic known   
Hash/Util   dynamic known   
Hash/Util/FieldHash dynamic known   
I18N/LangTags   nonxs   
I18N/Langinfo   dynamic known   
IO  dynamic known   
IO/Compress dynamic known   
IO/Zlib nonxs   
IPC/Cmd nonxs   
IPC/Open2   nonxs   
IPC/Open3   nonxs   
IPC/SysVdynamic known   
List/Util   dynamic known   
Log/Message nonxs   
Log/Message/Simple  nonxs   
MIME/Base64 dynamic known   
Math/BigInt/FastCalcdynamic known   
Module/CoreList nonxs   
Module/Load nonxs   
Module/Load/Conditional nonxs   
Module/Loaded   nonxs   
Module/Pluggablenonxs   
Net/Pingnonxs   
Object/Accessor nonxs   
Opcode  dynamic known   
POSIX   dynamic known   
Package/Constants   nonxs   
Params/Checknonxs   
Parse/CPAN/Meta nonxs   
PerlIO/encoding dynamic known   
PerlIO/scalar   dynamic known   
PerlIO/via  dynamic   

Re: VMS, configure.com and nonxs_ext

2009-09-08 Thread Nicholas Clark
On Mon, Sep 07, 2009 at 08:55:29PM +0100, Nicholas Clark wrote:

 (I'm not sure why the Configure shell code contains tests for .c too -
 historical reasons?

No, recent reasons. Building Win32CORE on Cygwin:
http://perl5.git.perl.org/perl.git/commit/fefb2940d28bc57fa38371e2

Nicholas Clark


Re: VMS, configure.com and nonxs_ext

2009-09-08 Thread Craig A. Berry


On Sep 8, 2009, at 4:33 AM, Nicholas Clark wrote:


On Mon, Sep 07, 2009 at 05:15:51PM -0500, Craig A. Berry wrote:



There's also dynamic_ext, right?  Shouldn't dynamic_ext plus
nonxs_extensions equal known_extensions?


Well, probably it should, but what actually happens is:



extensions is everything.

known_extensions = static_ext + dynamic_ext
extensions = nonxs_ext + known_extensions


which isn't logical, but I suspect is due to something historical.



I think that's about what I sorted out by reading Porting/Glossary,  
which does say that known_extensions only includes the XS kind (which  
is definitely not what we were doing on VMS before).


As you've likely noticed, I think it's done:

http://perl5.git.perl.org/perl.git/commitdiff/d1ce36d

Hmm.  Actually, we're not including nonxs_ext in extensions but  
that should be easy to fix and may not have any impact on the build.



Craig A. Berry
mailto:craigbe...@mac.com

... getting out of a sonnet is much more
 difficult than getting in.
 Brad Leithauser



Re: VMS, configure.com and nonxs_ext

2009-09-08 Thread Craig A. Berry


On Sep 8, 2009, at 4:34 AM, Nicholas Clark wrote:


On Mon, Sep 07, 2009 at 08:55:29PM +0100, Nicholas Clark wrote:

(I'm not sure why the Configure shell code contains tests for .c  
too -

historical reasons?


No, recent reasons. Building Win32CORE on Cygwin:
http://perl5.git.perl.org/perl.git/commit/fefb2940d28bc57fa38371e2



I thought I had seen something about it recently.  I could make our  
extension hunter look for .c as well, bu what I ended up doing was  
pulling Win32CORE out of nonxs_ext explicitly because it won't run on  
VMS anyway.



Craig A. Berry
mailto:craigbe...@mac.com

... getting out of a sonnet is much more
 difficult than getting in.
 Brad Leithauser



Re: VMS, configure.com and nonxs_ext

2009-09-08 Thread H.Merijn Brand
On Tue, 08 Sep 2009 06:47:38 -0500, Craig A. Berry
craigbe...@mac.com wrote:

 
 On Sep 8, 2009, at 4:33 AM, Nicholas Clark wrote:
 
  On Mon, Sep 07, 2009 at 05:15:51PM -0500, Craig A. Berry wrote:
 
 
  There's also dynamic_ext, right?  Shouldn't dynamic_ext plus
  nonxs_extensions equal known_extensions?
 
  Well, probably it should, but what actually happens is:
 
  extensions is everything.
 
  known_extensions = static_ext + dynamic_ext
  extensions = nonxs_ext + known_extensions
 
 
  which isn't logical, but I suspect is due to something historical.
 
 
 I think that's about what I sorted out by reading Porting/Glossary,

Porting/Glossary is generated from metaunits. If the comment is
outdated (and the comments are not visible outside the metaunits), the
Glossary will contain bad comments.

The Glossary is not a bible (yet).

 which does say that known_extensions only includes the XS kind (which  
 is definitely not what we were doing on VMS before).
 
 As you've likely noticed, I think it's done:
 
 http://perl5.git.perl.org/perl.git/commitdiff/d1ce36d
 
 Hmm.  Actually, we're not including nonxs_ext in extensions but  
 that should be easy to fix and may not have any impact on the build.

-- 
H.Merijn Brand  http://tux.nl  Perl Monger  http://amsterdam.pm.org/
using  porting perl 5.6.2, 5.8.x, 5.10.x, 5.11.x on HP-UX 10.20, 11.00,
11.11, 11.23, and 11.31, OpenSuSE 10.3, 11.0, and 11.1, AIX 5.2 and 5.3.
http://mirrors.develooper.com/hpux/   http://www.test-smoke.org/
http://qa.perl.org  http://www.goldmark.org/jeff/stupid-disclaimers/


Re: VMS, configure.com and nonxs_ext

2009-09-08 Thread Andrew Dougherty
On Mon, 7 Sep 2009, Nicholas Clark wrote:

 On Mon, Sep 07, 2009 at 08:55:29PM +0100, Nicholas Clark wrote:
  This might be rather a big favour request.
 
 This might be easier than I first thought
 
  Would it be possible to augment the configure.com code that finds extensions
  to correctly partition nonxs_extensions from known_extensions?
  (being the rather bonkers way that Configure partitions XS and non-XS
  extensions)

Coming late to this discussion . . . 

The bonkers way that Configure works now is indeed a hodge-podge 
growth representing the way stuff grew organically.  I've no time right 
now, but will try to look Tuesday afternoon (US, Eastern time) and see 
what's up here.

Unless you've already solved the problem by then!

-- 
Andy Dougherty  dough...@lafayette.edu


Re: VMS, configure.com and nonxs_ext

2009-09-08 Thread Craig A. Berry


On Sep 7, 2009, at 9:42 PM, Andrew Dougherty wrote:


On Mon, 7 Sep 2009, Nicholas Clark wrote:
Would it be possible to augment the configure.com code that finds  
extensions

to correctly partition nonxs_extensions from known_extensions?
(being the rather bonkers way that Configure partitions XS and non- 
XS

extensions)


Coming late to this discussion . . .

The bonkers way that Configure works now is indeed a hodge-podge
growth representing the way stuff grew organically.  I've no time  
right

now, but will try to look Tuesday afternoon (US, Eastern time) and see
what's up here.

Unless you've already solved the problem by then!



Thanks.  I'm pretty sure, if doing exactly the same thing in  
configure.com that's done in Configure is a solution (or at least  
consistently bonkers), we have solved it as of:


http://perl5.git.perl.org/perl.git/commitdiff/d1ce36d

and

http://perl5.git.perl.org/perl.git/commitdiff/63d5291

On VMS we were not populating nonxs_ext at all, and we were treating  
dynamic_ext and extensions as the same thing and including everything  
in them.  I think that was just a side effect of the organic growth  
you referred to plus my inattention during certain parts of it.


Part of the evolution probably has to do with nomenclature.  I'm quite  
sure I've been told at some point in the distant past that it's not  
proper to call a module an extension unless it has XS code in it.   
If that was ever a valid or consistent convention, the current mass  
migration from lib/ to ext/ buries it pretty deep.


Using the extensions.pl Nicholas posted elsewhere in this thread, I  
now see:


$ perl extensions.pl
extensions  static  dynamic nonxs   known

Archive/Extract nonxs
Archive/Tar nonxs
Attribute/Handlers  nonxs
B   dynamic known
B/Debug nonxs
B/Deparse   nonxs
B/Lint  nonxs
CGI nonxs
CPANPLUSnonxs
CPANPLUS/Dist/Build nonxs
Compress/Raw/Bzip2  dynamic known
Compress/Raw/Zlib   dynamic known
Cwd dynamic known
Data/Dumper dynamic known
Devel/DProf dynamic known
Devel/PPPortdynamic known
Devel/Peek  dynamic known
Devel/SelfStubber   nonxs
Digest  nonxs
Digest/MD5  dynamic known
Digest/SHA  dynamic known
Encode  dynamic known
Errno   nonxs
Fcntl   dynamic known
File/Fetch  nonxs
File/Glob   dynamic known
FileCache   nonxs
Filter/Simple   nonxs
Filter/Util/Calldynamic known
Hash/Util   dynamic known
Hash/Util/FieldHash dynamic known
I18N/LangTags   nonxs
I18N/Langinfo   dynamic known
IO  dynamic known
IO/Compress nonxs
IO/Zlib nonxs
IPC/Cmd nonxs
IPC/Open2   nonxs
IPC/Open3   nonxs
List/Util   dynamic known
Log/Message nonxs
Log/Message/Simple  nonxs
MIME/Base64 dynamic known
Math/BigInt/FastCalcdynamic known
Module/CoreList nonxs
Module/Load nonxs
Module/Load/Conditional nonxs
Module/Loaded   nonxs
Module/Pluggablenonxs
Net/Pingnonxs
Object/Accessor nonxs
Opcode  dynamic known
POSIX   dynamic known
Package/Constants   nonxs
Params/Checknonxs
Parse/CPAN/Meta nonxs
PerlIO/encoding dynamic known
PerlIO/scalar   dynamic known
PerlIO/via  dynamic known
Pod/Plainer nonxs
SDBM_File   dynamic known
Safenonxs
SelfLoader  nonxs
Shell   nonxs
Socket  dynamic known
Storabledynamic known
Switch