[MacPorts] #57990: libxml2 @2.9.7_2: ICU include directory not in pkg-config output
MacPorts
noreply at macports.org
Thu Jan 31 19:58:41 UTC 2019
#57990: libxml2 @2.9.7_2: ICU include directory not in pkg-config output
----------------------+---------------------
Reporter: dsedivec | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Keywords: | Port: libxml2
----------------------+---------------------
Since [https://github.com/macports/macports-ports/commit/0ed53fa9e884ed50
libxml2 now builds against ICU], I cannot build software against MacPorts
libxml2 without manually including `-I$prefix/include` when building.
Quick example:
{{{
$ command -v pkg-config
/opt/local/bin/pkg-config
$ cat repro.c
/* Include inspired by PostGIS's configure script: */
#include <libxml/tree.h>
int main() { return 0; }
$ clang $(pkg-config --cflags libxml-2.0) repro.c $(pkg-config --libs
libxml-2.0)
In file included from repro.c:2:
In file included from /opt/local/include/libxml2/libxml/tree.h:1307:
In file included from /opt/local/include/libxml2/libxml/xmlmemory.h:218:
In file included from /opt/local/include/libxml2/libxml/threads.h:35:
In file included from /opt/local/include/libxml2/libxml/globals.h:18:
In file included from /opt/local/include/libxml2/libxml/parser.h:810:
/opt/local/include/libxml2/libxml/encoding.h:31:10: fatal error:
'unicode/ucnv.h' file not found
#include <unicode/ucnv.h>
^~~~~~~~~~~~~~~~
1 error generated.
$ clang -I/opt/local/include $(pkg-config --cflags libxml-2.0) repro.c
$(pkg-config --libs libxml-2.0)
$ ls a.out
a.out*
}}}
After a brief conversation on IRC it was requested that I open a ticket
for this, since the ICU cflags/libs flags should probably be included in
pkg-config output for libxml-2.0 now. (It was also suggested that maybe
this is really an upstream issue, rather than MacPorts.)
--
Ticket URL: <https://trac.macports.org/ticket/57990>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list