Opened 6 years ago
Last modified 5 years ago
#57990 reopened defect
libxml2 @2.9.7_2: ICU include directory not in pkg-config output — at Initial Version
Reported by: | dsedivec | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.5.4 |
Keywords: | Cc: | raimue (Rainer Müller) | |
Port: | libxml2 |
Description
Since 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.)
Note: See
TracTickets for help on using
tickets.