in reply to Re^5: Strawberry Perl 5.12.3, CPAN, make file problems (dmake.exe), DFSEP and backslash "\"
in thread Strawberry Perl 5.12.3, CPAN, make file problems (dmake.exe), DFSEP and backslash "\"

Any more suggestions?

In my version of Strawberry, when I build IO-React-1.03, there's no problem.
When I look at the generated Makefile I see:
DIRFILESEP = \\ DFSEP = $(DIRFILESEP)
Next I open up lib/ExtUtils/MM_Win32.pm and I find in it:
sub init_DIRFILESEP { my($self) = shift; # The ^ makes sure its not interpreted as an escape in nmake $self->{DIRFILESEP} = $self->is_make_type('nmake') ? '^\\' : $self->is_make_type('dmake') ? '\\\\' : '\\'; }
So I change the dmake setting (from 4 backslashes to 2) so that the sub now reads:
sub init_DIRFILESEP { my($self) = shift; # The ^ makes sure its not interpreted as an escape in nmake $self->{DIRFILESEP} = $self->is_make_type('nmake') ? '^\\' : $self->is_make_type('dmake') ? '\\' : '\\'; }
Now ... have another go at building IO-React-1.03 (having first run 'dmake realclean'):
C:\sisyphusion\IO-React-1.03>perl makefile.PL Checking if your kit is complete... Looks good Writing Makefile for IO::React Writing MYMETA.yml and MYMETA.json C:\sisyphusion\IO-React-1.03>dmake dmake: Error: -- `C:\_32\strawberry514\perl\libConfig.pm' not found, +and can't be made
Sure enough, when I look at the generated Makefile, I now find it's the same as yours wrt DIRFILESEP:
DIRFILESEP = \ DFSEP = $(DIRFILESEP)
Your generated Makefile is wrong ... plain and simple ... you need to remedy whatever it is that keeps generating this fucked Makefile.

In the above MM_Win32.pm sub, does $self->is_make_type('dmake') return true for you ?
In essence, you just need to modify that sub so that it returns \\\\ (4 backslashes) for you. Even if you just do it as:
sub init_DIRFILESEP { return '\\\\'; }
That should do it.

Cheers,
Rob
  • Comment on Re^6: Strawberry Perl 5.12.3, CPAN, make file problems (dmake.exe), DFSEP and backslash "\"
  • Select or Download Code

Replies are listed 'Best First'.
Re^7: Strawberry Perl 5.12.3, CPAN, make file problems (dmake.exe), DFSEP and backslash "\"
by jffry (Hermit) on Feb 17, 2012 at 17:43 UTC

    Thanks for the help and insight, Rob. Both you and Eliya got me learning perl make Module internals, and I even learned a new idiom. I absolutely appreciate the effort you've shown in helping me.

    However, it was the thought of having to create a kludge for a freshly installed Strawberry Perl that really got me looking closely at what Anonymous was writing about cpan conf options, and that lead to a solution my neat-freak mentality preferred.

      Well, for whatever its worth, strawberry-perl-5.12.3.0.zip does work out of the box

      $ h2xs -b 5.5.0 -AX Titikaka Writing Titikaka/lib/Titikaka.pm Writing Titikaka/Makefile.PL Writing Titikaka/README Writing Titikaka/t/Titikaka.t Writing Titikaka/Changes Writing Titikaka/MANIFEST $ cd Titikaka $ ..\strawberry-perl-5.12.3.0\perl\bin\perl.exe Makefile.PL Checking if your kit is complete... Looks good ... Detected uninstalled Perl. Trying to continue. Have ..\strawb~1.0\perl\lib Want \strawberry\perl\lib Writing Makefile for Titikaka $ dmake cp lib/Titikaka.pm blib\lib\Titikaka.pm

      However, if you set the enviromental variable make to nmake, its the same as passing Makefile.PL make=nmake

      $ set make=nmake $ ..\strawberry-perl-5.12.3.0\perl\bin\perl.exe Makefile.PL Checking if your kit is complete... Looks good Writing Makefile for Titikaka Writing MYMETA.yml and MYMETA.json $ dmake dmake: Error: -- `..\strawberry-perl-5.12.3.0\perl\libConfig.pm' not +found, and can't be made

      So that is the only thing I think it could be, that you have make=nmake in your env for some reason , or maybe DFSEP, nothing else makes sense :)

        I'll be damned! Not only did you nail it again, but I was so blinded by context the first time I checked this that I didn't see the obvious problem until now.

        > set | find "ake" Make=LENOVO

        A bug that only exists on ThinkPads! No wonder I was going nuts (relatively) alone.

        When my mind was scanning env vars before, I totally missed this because the context of the other env vars surrounding it!

        MAC=00FF6816060A Make=LENOVO Model=64758S4 NUMBER_OF_PROCESSORS=2 OS=Windows_NT

        Well, let my thoroughness failure be a warning to all ThinkPad users working with Strawberry Perl.