http://www.perlmonks.org?node_id=946370

mojo-jojo has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to install XML-LibXML-1.87 but it is failing due to the following error, request assistance

/usr/bin/perl /usr/lib/perl5/5.10.0/ExtUtils/xsubpp -typemap /usr/lib +/perl5/5.10.0/ExtUtils/typemap -typemap typemap LibXML.xs > LibXML.x +sc && mv LibXML.xsc LibXML.c Code is not inside a function (maybe last function was ended by a blan +k line followed by a statement on column one?) in LibXML.xs, line 84 +53 make: *** [LibXML.c] Error 1

Replies are listed 'Best First'.
Re: Failure while installing "XML-LibXML-1.87"
by moritz (Cardinal) on Jan 05, 2012 at 12:00 UTC

    Is that the first error from the build or configure process? Did the Makefile.PL emit any warnings? And is there a good reason not to use a newer XML::LibXML?

    According to the CPAN testers matrix, linux, perl 5.10 and XML::LibXML 1.87 should mix; so there could be something wrong on your end, but the amount of information you've given us doesn't allow me to draw more interesting conclusions.

      Even 1.89 was failing so I thought of trying to use an older version.
Re: Failure while installing "XML-LibXML-1.87"
by tobyink (Canon) on Jan 05, 2012 at 13:26 UTC

    Any particular reason you're using 1.87? The latest is 1.89. While this issue isn't mentioned in the change log, and I can't see any changes in the vicinity of LibXML.xs:8453 between those two versions, it's always worth switching to the latest version - solves many a wasted debugging hour.

      I get the same error while installing the latest version as well. I am assuming there is something wrong with my Perl installation but cant find the cause.
Re: Failure while installing "XML-LibXML-1.87"
by ikegami (Patriarch) on Jan 05, 2012 at 19:42 UTC

    XML-LibXML-1.87 compiles fine with Perl 5.10.0. (27 of 27 cpan testers reports pass.)

    There's some conflict with your specific setup, and we know nothing about your setup.

      This is perl, v5.10.0 built for x86_64-linux-thread-multi Copyright 1987-2007, Larry Wall Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5 source ki +t. Complete documentation for Perl, including FAQ lists, should be found +on this system using "man perl" or "perldoc perl". If you have access to + the Internet, point your browser at http://www.perl.org/, the Perl Home Pa +ge.
      [root@eds-f11 XML-LibXML-1.87]# perl Makefile.PL enable native perl UTF8 running xml2-config...ok (2.7.6) looking for -lxml2... yes WARNING: META_MERGE is not a known parameter. Warning: prerequisite ExtUtils::MakeMaker 6.56 not found. We have 6.42 +. Warning: prerequisite Test::More 0 not found. Warning: prerequisite XML::NamespaceSupport 1.07 not found. Warning: prerequisite XML::SAX 0.11 not found. 'META_MERGE' is not a known MakeMaker parameter name. Writing Makefile for XML::LibXML
      The output of perl -v and perl Makefile.PL is given above. The error code is zero while running the above command. The O.S on which I am trying to install is "Fedora release 11 (Leonidas)". Let me know if you guys need more info.

        I suspect you can get a ready-made version from your distro:

        apt-get install libxml-libxml-perl

        One usually simply installs modules using something like

        cpan XML::LibXML

        This will install the required dependencies too.