Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Unable To Install XML::XSH2 On Microsoft Windows Under Strawberry Perl 5.16.2

by ig (Vicar)
on May 18, 2013 at 03:00 UTC ( [id://1034050]=note: print w/replies, xml ) Need Help??


in reply to Unable To Install XML::XSH2 On Microsoft Windows Under Strawberry Perl 5.16.2

I tried installing it on 64bit Windows 7 with Strawberry Perl 5.16.2, and I got the same error.

There appears to be a problem with one of the Makefile commands:

cd lib/XML/XSH2; env LC_ALL=C LANG=C $(PERL) -MGrammar -e XML::XSH +2::Grammar::compile

According to process monitor, this is executed as:

C:\windows\system32\cmd.exe /S /c "cd lib/XML/XSH2; set LC_ALL=C; set +LANG=C; C:\strawberry\perl\bin\perl.exe -MGrammar -e XML::XSH2::Gramm +ar::compile"

And cmd.exe doesn't like this command. It looks to me (I'm guessing here) that cd interprets everything after the 'cd' in that command as the path of the directory to change to. Of course, that isn't a valid path.

Documentation for cmd.exe says it can be given multiple commands but separated by &, rather than ;. So, I tried editing the Makefile, replacing ';' with '&' and it progressed a little further, but there were errors in testing

The test failures may be because the tests use features not available on windows, like the Makefile does, rather than because the module didn't build successfully.

Replies are listed 'Best First'.
Re^2: Unable To Install XML::XSH2 On Microsoft Windows Under Strawberry Perl 5.16.2
by Anonymous Monk on May 18, 2013 at 07:16 UTC

    Yup, unportable makefiles are not portable :) unixisms don't travel well to nonunix

    Even the following isn't fantastically portable but works on win32

    $(PERL) -e " chdir(qw{ lib/XML/XSH2 }); @ENV{qw{ LC_ALL LANG }} = qw{ +C C }; require Grammar; XML::XSH2::Grammar::compile "

    A better way to fix it is to use the http://search.cpan.org/perldoc/ExtUtils::MakeMaker#PL_FILES or writhe another tools/gen_compile.pl

    But its not like the authors are unaware of all this :)

      Hmm, it didn't work, way more failing tests than I remember, so I actually wrote gen_compile for

      $(PERL) tools/gen_compile.pl
      but same results, something more is broken this time

      I'm not up to debugging this. I have had fewer failing tests in 2012 with XML-XSH2-2.1.6 than now XML-XSH2-2.1.7, but I just tried XML-XSH2-2.1.6 again, and tried it with a few programs, but seems broken

      This trick worked for XML::XSH2 2.1.5, but I just tried it with 2.1.5 again and I could not make it work today -- I have no idea what went right the first time, or what went wrong this time

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1034050]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2024-03-29 10:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found