Closed kiwiroy closed 5 years ago
I'm curious how it found /Volumes/300GB/opt/local/include/unicode/ucnv.h
since that isn't explicitly included. I wonder if (and this would be weird) maybe there is an include of ucnv.h
with an absolute path somewhere? That would explain the failure, although it would surprise me.
can you verify if this C program works or not:
#include <libxml/parser.h>
#include <libxml/tree.h>
int
main(int argc, char *argv[])
{
xmlDoc *doc = NULL;
xmlNode *root_element = NULL;
const char *filename = "corpus/basic.xml";
doc = xmlReadFile(filename, NULL, 0);
if(doc == NULL)
{
printf("error reading %s\n", filename);
return 2;
}
else
{
xmlFreeDoc(doc);
xmlCleanupParser();
printf("ok\n");
return 0;
}
}
With this incantation (run from the Alien-Libxml2 root):
$ cc `pkg-config --cflags libxml-2.0` test.c `pkg-config --libs libxml-2.0` && ./a.out
ok
See https://gist.github.com/kiwiroy/ff5c0e2b54b2f316924066a673eaae9a and macports/macports-ports@dcef2c3 I'm not sure what it is sane for Alien::Libxml2 to do.
... that is crazy. Honestly this is a macports issue and should be fixed there.
If we can from the alienfile
it's not trivial to do correctly, and it's probably best to push back and see if they can fix it properly first.
I have to assume @ryandesign is guarding against more recent versions of ICU being installed elsewhere. I’ve commented to link discussions.
fixed in macports.
I have a test fail in
t/alien_libxml2.t
withcpanm Alien::Libxml2
I'm a macports user.
icu 58.2 is a little old, but latest is essentially the same