Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

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

by Jim (Curate)
on May 18, 2013 at 01:39 UTC ( #1034047=perlquestion: print w/ replies, xml ) Need Help??
Jim has asked for the wisdom of the Perl Monks concerning the following question:

I'm unable to install XML::XSH2 on my Microsoft Windows computer running Strawberry Perl version 5.16.2. Here's what happens:

C:\strawberry>cpan install XML::XSH2
CPAN: CPAN::SQLite loaded ok (v0.202)
Database was generated on Sat, 18 May 2013 00:19:52 GMT
Running install for module 'XML::XSH2'
Running make for P/PA/PAJAS/XML-XSH2-2.1.7.tar.gz
CPAN: Digest::SHA loaded ok (v5.73)
CPAN: Compress::Zlib loaded ok (v2.055)
Checksum for C:\strawberry\cpan\sources\authors\id\P\PA\PAJAS\XML-XSH2-2.1.7.tar.gz ok
CPAN: Archive::Tar loaded ok (v1.90)
CPAN: File::Temp loaded ok (v0.22)
CPAN: Parse::CPAN::Meta loaded ok (v1.4404)
CPAN: CPAN::Meta loaded ok (v2.120921)
CPAN: Module::CoreList loaded ok (v2.76)

  CPAN.pm: Building P/PA/PAJAS/XML-XSH2-2.1.7.tar.gz

Checking if your kit is complete...
Looks good
Writing Makefile for XML::XSH2
Writing MYMETA.yml and MYMETA.json
C:\strawberry\perl\bin\perl.exe tools/gen_grammar.pl src/xsh_grammar.xml > lib/XML/XSH2/Grammar.pm
C:\strawberry\perl\bin\perl.exe tools/gen_commands.pl src/xsh_grammar.xml > lib/XML/XSH2/Commands.pm
C:\strawberry\perl\bin\perl.exe tools/gen_help.pl src/xsh_grammar.xml > lib/XML/XSH2/Help.pm
C:\strawberry\perl\bin\perl.exe tools/gen_pod.pl src/xsh_grammar.xml > XSH2.pod
C:\strawberry\perl\bin\perl.exe tools/gen_completions.pl src/xsh_grammar.xml > lib/XML/XSH2/CompletionList.pm
cd lib/XML/XSH2; env LC_ALL=C LANG=C C:\strawberry\perl\bin\perl.exe -MGrammar -e XML::XSH2::Grammar::compile
The filename, directory name, or volume label syntax is incorrect.
dmake.exe:  Error code 129, while making 'xml'
  PAJAS/XML-XSH2-2.1.7.tar.gz
  C:\strawberry\c\bin\dmake.exe -- NOT OK
CPAN: YAML::XS loaded ok (v0.38)
Running make test
  Can't test without successful make
Running make install
  Make had returned bad status, install seems impossible
Stopping: 'install' failed for 'XML::XSH2'.

C:\strawberry>

Any ideas? Thanks in advance.

Jim

Comment on Unable To Install XML::XSH2 On Microsoft Windows Under Strawberry Perl 5.16.2
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

    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.

      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

Re: Unable To Install XML::XSH2 On Microsoft Windows Under Strawberry Perl 5.16.2
by choroba (Abbot) on Nov 24, 2013 at 00:16 UTC
    I will try to look into it (I am a co-maintainer of the module). It seems the problems started when Parse::RecDescent introduced the changes that broke backwards compatibility and we tried to compansate it.
    لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
Re: Unable To Install XML::XSH2 On Microsoft Windows Under Strawberry Perl 5.16.2
by choroba (Abbot) on Nov 25, 2013 at 23:22 UTC
    2.1.17 seems to PASS on some Win32 machines with dmake. Can you try it?

    There are still problems on bingos' OpenBSD, but I suspect misbehaving libxml.

    لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

      Better than I remember (not jim, not ig, its me :)

      Some ideas, IPC::Run3 (or even Capture::Tiny ), or skip tests, or adjust warn subroutine to prefix with '#' so test/TAP can ignore it

      This part in makefile still not portable ... oneliners arent portable :)

      winppd: ppd $(PERL) -i~ -pe 's/OS NAME=".*"/OS NAME="MSWin32"/; s/ARCHITECTURE + NAME=".*"/ARCHITECTURE NAME="MSWin32-x86-multi-thread"/; s/CODEBASE +HREF=".*"/CODEBASE HREF="XML-XSH2.tar.gz"/;' XML-XSH2.ppd

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1034047]
Approved by Lotus1
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (9)
As of 2014-10-24 12:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (131 votes), past polls