Closed stuart-little closed 5 years ago
Hi!
Thanks for the report. Try reporting the issues with the Alien package at https://metacpan.org/pod/Alien::Libxml2 .
Thanks!
After some back and forth on the Alien::Libxml2
github page we traced it back to not having a package called libiconv-dev
installed on my system (that package provides the iconv.h
header file, which Alien
wanted).
After installing that both Alien::Libxml2
and XML::LibXML
install fine through CPAN
, with or without tests.
Thanks!
After some back and forth on the
Alien::Libxml2
github page we traced it back to not having a package calledlibiconv-dev
installed on my system (that package provides theiconv.h
header file, whichAlien
wanted).After installing that both
Alien::Libxml2
andXML::LibXML
install fine throughCPAN
, with or without tests.
@stuart-little : I'm glad to hear that. Is there anything we can do to prevent future users from having this problem (see https://www.joelonsoftware.com/2007/02/19/seven-steps-to-remarkable-customer-service/ ) or should I just close this issue?
I'm not sure there's anything to do at your end to mitigate the problem, which seems somewhat far removed from XML::LibXML
.
Perhaps the best solution would be for libxml2-dev
to pull in libiconv-dev
, as suggested in the Alien
thread I linked to above, but that would be something specific to the termux package manager.
I think it's reasonable to close the issue.
@stuart-little : thanks, will do.
I've installed the module on a phone as in the title (aarch64 architecture), using termux as my terminal emulator and package provider .
The output of
perl -V
is here (it's v5.28.2).During the build/installation I encountered the following issues that I thought might be good to document.
First, with a plain
perl Makefile.PL
followed bymake
I getfatal error: 'libxml/xmlmemory.h' file not found
during the build. Apparently, the line
CCFLAGS => Alien::Libxml2->cflags . " $Config{ccflags}",
in
Makefile.PL
manages to get the include directory-I/data/data/com.termux/files/usr/include
into the
Makefile
, but the problematic header filelibxml/xmlmemory.h
is one level down, in/data/data/com.termux/files/usr/include/libxml2
so I add that by hand in
Makefile.PL
(with an-I
in front, appending it to the value of theCCFLAGS
key; see below for the full diff).Secondly, after implementing that change and
making
andmake install
-ing successfully there's a separate issue:Trying to run any scripts with
use XML::LibXML
results in an error to the effect that the linker cannot find the symbolxmlMemMalloc
(which appears in the librarylibxml2.so
I'm supposed to link against).The problem seems to be that the line
LIBS => [ Alien::Libxml2->libs ],
in
Makefile.PL
fails to pass the flag-lxml2
to theMakefile
, which as a result has noEXTRALIBS
andLDLOADLIBS
(which are both supposed to read-lxml2
, based on pattern-matching to x86_64 systems I could build on successfully).So I had to add
-lxml2
by hand to the value of theLIBS
key inMakefile.PL
.All in all, the modifications look like this:
Everything works after this (succesful
perl Makefile.PL
+make
+make install
+ the package behaves as expected).As far as I can tell those
Alien::Libxml2
calls in the two lines I modified provide nothing: runningperl Makefile.PL
does spit out two warnings:Use of uninitialized value in concatenation (.) or string at Makefile.PL line 73
Line 73 is where the definition of that hash with keys
CCFLAGS
,LIBS
etc. starts. I don't know why Alien::Libxml2 misbehaves in this fashion, resulting in having to do manual correction.I hope this helps others dealing with similar problems. I am not even certain this is the right forum, but it seemed amenable for documentation somewhere..