in reply to Re^3: cpan install error for XML::LibXML::Node
in thread cpan install error for XML::LibXML::Node

Well, that definitely answers the library question. Changed to '-lxml2 -lz -lm,' but still can't seem to find the libxml header files. Really odd since I have that explicitly included.

  • Comment on Re^4: cpan install error for XML::LibXML::Node

Replies are listed 'Best First'.
Re^5: cpan install error for XML::LibXML::Node
by hippo (Archbishop) on May 31, 2017 at 13:48 UTC
    still can't seem to find the libxml header files.

    That's because your include flag is wrong too. It should be -I/usr/include/libxml2 and hopefully you'll be sorted.

      rats. That didn't work either. Thanks for the input. I have to run and get a firewall replaced. I'll check back in the morning.

        Here's a very short sample showing correct compilation against libxml2 on CentOS 6:

        $ wget http://www.xmlsoft.org/examples/io2.c --2017-05-31 15:13:18-- http://www.xmlsoft.org/examples/io2.c Resolving www.xmlsoft.org... 91.121.203.120 Connecting to www.xmlsoft.org|91.121.203.120|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 1182 (1.2K) [text/plain] Saving to: `io2.c' 100%[======================================>] 1,182 --.-K/s in + 0s 2017-05-31 15:13:18 (53.9 MB/s) - `io2.c' saved [1182/1182] $ gcc -o xmltest -I/usr/include/libxml2 -lxml2 -lz -lm io2.c $ ./xmltest <?xml version="1.0"?> <root>content</root> $

        If you get the same then the problem is likely to be on the cpan side. But if you get something different then it isn't a perl problem at all and you'll need to fix your libxml2 installation.