Re: podlators 4.06 released

2016-03-20 Thread Russ Allbery
Dave Mitchell  writes:

> But I don't think its necessary after all: the new() method in Pod::Man
> is only called in three places during the build:

> 1. Building cpan/podlators.

> At this point Encode isn't built, and the warning is emitted

> 2. Testing cpan/podlators/t/*/*.t

> At this point Encode is built and there are no warnings.

> 3. Installing perl and all its modules

> It's called many times here, but again, at this point Encode is built so
> there are no warnings


> Only during (1) is the environment variable PERL_CORE set.
> Unless there's a need for Encode to be present when padlators is made,
> I propose that the code in Pod::Man::new() which warns if Encode isn't
> present, only does so if !$ENV{PERL_CORE}.

This is a great idea.  Thanks!  Now implemented, and will be in the next
podlators release (probably later today).

-- 
Russ Allbery ([email protected])  


Re: podlators 4.06 released

2016-03-18 Thread Dave Mitchell
On Wed, Feb 17, 2016 at 12:00:06PM +, Dave Mitchell wrote:
> On Tue, Feb 16, 2016 at 10:34:07AM -0800, Russ Allbery wrote:
> > My preferred solution would be to require Encode as a prerequisite for
> > podlators when building core.  Is there any way to do that?
> 
> Probably, but the build system isn't my strong point. I tried hacking
> Makefile.SH so that it adds this line to Makefile if Encode hasn't been
> deselected:
> 
> cpan/podlators/pm_to_blib: lib/auto/Encode/Encode.so
> 
> but then I get this:
> 
> make: Circular lib/auto/Encode/Encode.so <- makeppport dependency dropped.
> make: Circular DynaLoader.o <- cpan/podlators/pm_to_blib dependency 
> dropped.

Having looked at this some more, non-XS modules like podlators are all
built before XS modules like Encode. Hacking the build system to
build podlators after Encode is tricky. I made a start and got bogged
down. For example, the early non-XS building is done using ./miniperl, but
the later non-XS would need to be done using ./perl, otherwise Encoding still
isn't available.

But I don't think its necessary after all: the new() method in Pod::Man
is only called in three places during the build:

1. Building cpan/podlators.

At this point Encode isn't built, and the warning is emitted

2. Testing cpan/podlators/t/*/*.t

At this point Encode is built and there are no warnings.

3. Installing perl and all its modules

It's called many times here, but again, at this point Encode is built so
there are no warnings


Only during (1) is the environment variable PERL_CORE set.
Unless there's a need for Encode to be present when padlators is made,
I propose that the code in Pod::Man::new() which warns if Encode isn't
present, only does so if !$ENV{PERL_CORE}.

-- 
Modern art:
"That's easy, I could have done that!"
"Ah, but you didn't!"


Re: podlators 4.06 released

2016-02-23 Thread bulk88

Dave Mitchell wrote:

make_ext.pl on UNIX is only ever called with a single extension to build
at a time; all the ordering logic is contained in the Makefile.

Perhaps its time to fully integrate the win32/VMS and UNIX halves of
make_ext.pl, which were originally shunted together from separate scripts.
But that might lose the -j parallelism that is provided by make?


The Win32 build doesn't really do parallel module building, all the XS 
modules are done with 1 make_ext.pl process , all PP in the other 
make_ext.pl process. If you have 4 or more cores (mktables is the 3rd 
long running task), they wont really speed up the wall time of the build.


I've thought of make_ext.pl dumping its module list to multiple disk 
files with each module distributed between the files. Then the makefile 
schedules each module list when it wants and runs it with make_ext.pl in 
build mode, not make schedule mode. How many disk files to create can be 
done by analyzing the -j count from MAKEFLAGS or something or split it 
evenly into 8 lists of modules if the parallel count is unknown since 8 
core is the average medium high end machine today.


Re: podlators 4.06 released

2016-02-23 Thread Dave Mitchell
On Wed, Feb 17, 2016 at 09:22:12PM -0600, Craig A. Berry wrote:
> On Wed, Feb 17, 2016 at 6:00 AM, Dave Mitchell  wrote:
> > On Tue, Feb 16, 2016 at 10:34:07AM -0800, Russ Allbery wrote:
> >> My preferred solution would be to require Encode as a prerequisite for
> >> podlators when building core.  Is there any way to do that?
> >
> > Probably, but the build system isn't my strong point. I tried hacking
> > Makefile.SH so that it adds this line to Makefile if Encode hasn't been
> > deselected:
> >
> > cpan/podlators/pm_to_blib: lib/auto/Encode/Encode.so
> >
> > but then I get this:
> >
> > make: Circular lib/auto/Encode/Encode.so <- makeppport dependency 
> > dropped.
> > make: Circular DynaLoader.o <- cpan/podlators/pm_to_blib dependency 
> > dropped.
> >
> > Anyone have a better clue how to do this?
> 
> 
> Possibly messing with the following section of code in make_ext.pl
> would do something.  If it works, it might be depending on Encode
> being later in the alphabet than Cwd.  If there's more to it than
> that, this code could perhaps be changed from saying "build X before
> everything else" to "build X before Y."
> 
> {
> # Cwd needs to be built before Encode recurses into subdirectories.
> # Pod::Simple needs to be built before Pod::Functions
> # This seems to be the simplest way to ensure this ordering:
> my (@first, @other);
> foreach (@extspec) {
> if ($_ eq 'Cwd' || $_ eq 'Pod/Simple') {
> push @first, $_;
> } else {
> push @other, $_;
> }
> }
> @extspec = (@first, @other);
> }

make_ext.pl on UNIX is only ever called with a single extension to build
at a time; all the ordering logic is contained in the Makefile.

Perhaps its time to fully integrate the win32/VMS and UNIX halves of
make_ext.pl, which were originally shunted together from separate scripts.
But that might lose the -j parallelism that is provided by make?


-- 
Art is anything that has a label (especially if the label is "untitled 1")


Re: podlators 4.06 released

2016-02-17 Thread Craig A. Berry
On Wed, Feb 17, 2016 at 6:00 AM, Dave Mitchell  wrote:
> On Tue, Feb 16, 2016 at 10:34:07AM -0800, Russ Allbery wrote:
>> My preferred solution would be to require Encode as a prerequisite for
>> podlators when building core.  Is there any way to do that?
>
> Probably, but the build system isn't my strong point. I tried hacking
> Makefile.SH so that it adds this line to Makefile if Encode hasn't been
> deselected:
>
> cpan/podlators/pm_to_blib: lib/auto/Encode/Encode.so
>
> but then I get this:
>
> make: Circular lib/auto/Encode/Encode.so <- makeppport dependency dropped.
> make: Circular DynaLoader.o <- cpan/podlators/pm_to_blib dependency 
> dropped.
>
> Anyone have a better clue how to do this?


Possibly messing with the following section of code in make_ext.pl
would do something.  If it works, it might be depending on Encode
being later in the alphabet than Cwd.  If there's more to it than
that, this code could perhaps be changed from saying "build X before
everything else" to "build X before Y."

{
# Cwd needs to be built before Encode recurses into subdirectories.
# Pod::Simple needs to be built before Pod::Functions
# This seems to be the simplest way to ensure this ordering:
my (@first, @other);
foreach (@extspec) {
if ($_ eq 'Cwd' || $_ eq 'Pod/Simple') {
push @first, $_;
} else {
push @other, $_;
}
}
@extspec = (@first, @other);
}


Re: podlators 4.06 released

2016-02-17 Thread Dave Mitchell
On Tue, Feb 16, 2016 at 10:34:07AM -0800, Russ Allbery wrote:
> My preferred solution would be to require Encode as a prerequisite for
> podlators when building core.  Is there any way to do that?

Probably, but the build system isn't my strong point. I tried hacking
Makefile.SH so that it adds this line to Makefile if Encode hasn't been
deselected:

cpan/podlators/pm_to_blib: lib/auto/Encode/Encode.so

but then I get this:

make: Circular lib/auto/Encode/Encode.so <- makeppport dependency dropped.
make: Circular DynaLoader.o <- cpan/podlators/pm_to_blib dependency dropped.

Anyone have a better clue how to do this?

Here's my Makefile.SH WIP diff:

diff --git a/Makefile.SH b/Makefile.SH
index 2278f9f..6ad578a 100755
--- a/Makefile.SH
+++ b/Makefile.SH
@@ -177,10 +177,12 @@ esac
 : is Cwd static or dynamic
 static_cwd='define'
 list_util_dep='$(PERL_EXE)'
+encode_dep=
 for f in $dynamic_ext; do
case $f in
Cwd) static_cwd='undef' ;;
-   List/Util) list_util_dep=lib/auto/List/Util/Util.$dlext
+   List/Util) list_util_dep=lib/auto/List/Util/Util.$dlext ;;
+   Encode) encode_dep=lib/auto/Encode/Encode.$dlext ;;
esac
 done
 
@@ -227,6 +229,12 @@ for f in $nonxs_ext; do
nonxs_list="$nonxs_list $d/$p/pm_to_blib"
fi
 done
+case $f in
+   podlators) if [ -n "$encode_dep" ]; then
+   extra_dep="$extra_dep
+cpan/podlators/pm_to_blib: $encode_dep"
+  fi ;;
+esac
 done
 
 dtrace_h=''




-- 
"I do not resent criticism, even when, for the sake of emphasis,
it parts for the time with reality".
-- Winston Churchill, House of Commons, 22nd Jan 1941.


Re: podlators 4.06 released

2016-02-16 Thread Russ Allbery
Dave Mitchell  writes:

> Since that's been pulled into blead, I'm seeing these warnings on parallel
> blead builds:

> utf8 mode requested but Encode module not available, falling back to 
> non-utf8 at 
> /home/davem/perl5/git/bleed/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm
>  line 145.
> utf8 mode requested but Encode module not available, falling back to 
> non-utf8 at 
> /home/davem/perl5/git/bleed/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm
>  line 145.

> Basically when blead is building podlators, it may not have yet finished
> building Encode. (The warning is actually being generated by the carp
> at cpan/podlators/lib/Pod/Man.pm:151.)

> I don't know whether this is harmless or not. If harmless, it would be
> nice to be able to silence this warning in some fashion. If harmful, we
> should fix it in some fashion.

It's harmless *as long as* all man pages are generated later after all the
modules are available.  It's also currently harmless without other patches
because right now man page generation in core is very conservative and
doesn't produce UTF-8 output.

However, I do want to change the latter at some point so that we can
properly represent non-ASCII characters in man page output.  If any of the
man pages generated by podlators during the stage where these warnings are
generated are actually kept, they'll break later.

My preferred solution would be to require Encode as a prerequisite for
podlators when building core.  Is there any way to do that?

-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~|| 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print


Re: podlators 4.06 released

2016-02-16 Thread Dave Mitchell
On Sun, Jan 31, 2016 at 08:14:24PM -0800, Russ Allbery wrote:
> I'm pleased to announce release 4.06 of podlators.

Since that's been pulled into blead, I'm seeing these warnings on parallel
blead builds:

utf8 mode requested but Encode module not available, falling back to 
non-utf8 at 
/home/davem/perl5/git/bleed/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm 
line 145.
utf8 mode requested but Encode module not available, falling back to 
non-utf8 at 
/home/davem/perl5/git/bleed/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm 
line 145.

Basically when blead is building podlators, it may not have yet finished
building Encode. (The warning is actually being generated by the carp
at cpan/podlators/lib/Pod/Man.pm:151.)

I don't know whether this is harmless or not. If harmless, it would be
nice to be able to silence this warning in some fashion. If harmful, we
should fix it in some fashion.

This is the process tree  at the point the warnings are issued:

make -j 16 test_harness

  ./miniperl -Ilib make_ext.pl cpan/podlators/pm_to_blib
MAKE=make LIBPERL_A=libperl.a

make all PERL_CORE=1 LIBPERL_A=libperl.a

  ../../miniperl -I../../lib -I../../lib -MExtUtils::Command::MM
-e pod2man -- --section=1 --perm_rw=644 -u scripts/pod2man.PL
blib/man1/pod2man.1 scripts/pod2text.PL blib/man1/pod2text.1


-- 
You're only as old as you look.


Re: podlators 4.06 released

2016-02-06 Thread Craig A. Berry
On Sun, Jan 31, 2016 at 10:14 PM, Russ Allbery  wrote:
> I'm pleased to announce release 4.06 of podlators.

Thanks, now in blead: