Open nickforino opened 3 years ago
Can you tell me what version of Alien::LibXML and Alien::Build you have installed, and if you can provide the log for its install?
Also make sure that you are running the tests when installing Alien::LibXML because it should fail if it detects the wrong flags.
@plicease Thanks for your reply. Apparently I just had Alien, and not Alien::LibXML. Although I attempted to install Alien::LibXML via cpanm and this failed. I've attached the log, notably it throws the same error line when it fails:
t/tree1.c:13:10: fatal error: 'libxml/parser.h' file not found
#include <libxml/parser.h>
^~~~~~~~~~~~~~~~~
@nickforino I apologize but the actual dependency is Alien::Libxml2
lol Can you try that one instead.
@plicease no worries! My Alien::Libxml2 version is 0.17 and Alien::Build version is 2.37.
@plicease I just tried to force reinstall Alien::Libxml2 and Alien::Build, I've attached the logs for both. The test and installation for Alien::Libxml2 failed, while Build installed without a hitch, I've attached the log for Libxml2. build.log
It appears that when attempting make, my system is having a hard time finding my libxml2 installation (hence the fatal errors). I tried setting the following environmental path variables, but this also failed.
export PATH = /usr/local/opt/libxml2/bin
export LDFLAGS="-L/usr/local/opt/libxml2/lib"
export CPPFLAGS="-I/usr/local/opt/libxml2/include"
export PKG_CONFIG_PATH="/usr/local/opt/libxml2/lib/pkgconfig"
Looks like Alien::Libxml2
is looking in /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
(from xml2-config
) for the header files, can you check if the appropriate files in there?
One work around, if you don't mind Alien::Libxml2
building the library for you is to force a share install:
env ALIEN_INSTALL_TYPE=share cpanm -v Alien::Libxml2
Hi @plicease, apologies for the very late reply.
Regarding your last question: I believe the path Alien::Libxml2
is looking for headers in/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
is incorrect. The header files (namely, I found parser.h) several directories deeper in /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/libxml2/libxml/parser.h
.
Regarding your last question: I believe the path
Alien::Libxml2
is looking for headers in/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
is incorrect. The header files (namely, I found parser.h) several directories deeper in/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/libxml2/libxml/parser.h
.
The include path would have come from either xml2-config --cflags
or pkg-config --cflags libxml-2.0
can you see if either of those has the wrong path specified?
Indeed, looks like the wrong paths are specified!
xml2-config --cflags
returns -I/usr/local/Cellar/libxml2/2.9.10_2/include/libxml2
I believe the Cellar directory is from Homebrew, but I can't quite remember what I tried to install, as I was likely trying things out of desperation...regardless, this path does not directly lead to the headers, which are again several directories further in /usr/local/Cellar/libxml2/2.9.10_2/include/libxml2/libxml
.
Similarly, pkg-config --cflags libxml-2.0
returns the same path: -I/usr/local/Cellar/libxml2/2.9.10_2/include/libxml2
Is the solution to uninstall Homebrew?
Hi everyone,
My attempts to install
XML::LibXML
with cpanm and also manually fail, and return the following fatal error:After reading some similar issues I've ensured the dependent modules are properly installed (
XML::SAX
,XML:: NamespaceSupport
) and that I've got a current version oflibxml2
andAlien
.Any help would be greatly appreciated, please let me know any additional information you need to diagnose the issue and I'll respond promptly. Thanks!