in reply to cpan install error for XML::LibXML::Node

conf makepl_arg "INC=-I/usr/include -I/usr/local/include -I/usr/include/libxml2/libxml LIBS=-L/usr/lib64 -L/usr/lib -L/usr/local/lib -L/lib64 -llibxml2 -lm"

The penultimate term looks wrong. Surely it should be -lxml2 instead?

Replies are listed 'Best First'.
Re^2: cpan install error for XML::LibXML::Node
by BradV (Sexton) on May 31, 2017 at 12:53 UTC

    I tried that and get the same results. I'm not an experienced compiler. I'm assuming the '-l' is just passed to gcc? The libxml2 library is:

    /usr/lib64/libxml2.so.2.7.6 /usr/lib64/libxml2.so.2 -> libxml2.so.2.7.6

    that is why I used libxml2. Maybe I should make it libxml2.so.2?

      Nope, definitely -lxml2.

      $ xml2-config --libs -lxml2 -lz -lm

        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.