in reply to Re^5: Do I have a unicode problem, or is this something else?
in thread Do I have a unicode problem, or is this something else?

Most likely, Makefile.PL is not executable. You are supposed to run it like this:

perl -w Makefile.PL

Replies are listed 'Best First'.
Re^7: Do I have a unicode problem, or is this something else?
by Steve_BZ (Chaplain) on Jun 14, 2010 at 16:39 UTC

    Hi Corion,

    Nice to hear from you. I think that ikegami is probably right and I need to do this XML thing properly. I tried the command line you suggested and it gave me this error:

    steve@steve-desktop:~/.cpan/build/XML-LibXML-1.70-XzsnvX$ perl -w Make +file.PL Name "main::is_win32" used only once: possible typo at Makefile.PL lin +e 263. enable native perl UTF8 running xml2-config... using fallback values for LIBS and INC options: LIBS='-L/usr/local/lib -L/usr/lib -lxml2 -lm' INC='-I/usr/local/include -I/usr/include' If this is wrong, Re-run as: $ /usr/bin/perl Makefile.PL LIBS='-L/path/to/lib' INC='-I/path/to/in +clude' looking for -lxml2... no looking for -llibxml2... no libxml2 not found Try setting LIBS and INC values on the command line Or get libxml2 from http://xmlsoft.org/ If you install via RPMs, make sure you also install the -devel RPMs, as this is where the headers (.h files) are. Also, you may try to run perl Makefile.PL with the DEBUG=1 parameter to see the exact reason why the detection of libxml2 installation failed or why Makefile.PL was not able to compile a test program.

    Maybe this only runs on Windows? What do you think?

    Regards

    Steve

      You will need to have the XML library header files installed. Either install the "development" package through your OS package manager, or do as the output of Makefile.PL suggests and download and compile the libraries yourself. Also:

      Also, you may try to run perl Makefile.PL with the DEBUG=1 parameter to see the exact reason why the detection of libxml2 installation failed or why Makefile.PL was not able to compile a test program.

        Hi Corion,

        Thanks for the pointer. In the end (see my reply to ikegami) I managed to make it work. Thanks again for your help.

        Have a great day

        Regards

        Steve

      You need to install the underlying library (libxml2) first. Your distro's repo should have it. Be sure to install any associated -dev/-devel package. In Debian, the packages are named libxml2 and libxml2-dev.

        Hi ikegami,

        Thanks for the tip. Even so the install was unexpectedly hard. The cpan module didn't really support the installation so I had to switch between cpan, my linux package manager and make. In the end I did the following:

        • used package manager to install libxml2-dev. libxml2 was already installed.
        • Run perl e Makefile.PL which generated dependency errors
        • used cpan to install XML::NamespaceSupport
        • used cpan to install XML::SAX
        • Ran perl e Makefile.PL without errors
        • make, make test, make install.

        Success, I've just run your code which ran very smoothly. I think your earlier comments about the bugs were correct, so overall it's going to be less maintenance to fix this now.

        Have a great day

        Regards

        Steve