jayx
jayx

Reputation: 103

How to cross compile libxml2 with arm-linux-gnueabihf-gcc compiler. How to cross compile using third party libraries?

when I tried to cross compile I am getting an error

/usr/include/libxml2/libxml/encoding.h:31:26: fatal error: unicode/ucnv.h: No such file or directory compilation terminated.

Upvotes: 3

Views: 2713

Answers (2)

nwellnhof
nwellnhof

Reputation: 33658

In recent releases of libxml2, the configure script tries to detect ICU using pkg-config. Depending on your setup, this could result in false positives when cross-compiling (see Autotools Mythbuster for details). I'd suggest to disable ICU support by passing --without-icu to configure. ICU is a huge library and libxml2 only uses it to convert between character sets. It also supports libiconv which is much smaller.

Upvotes: 0

Emanuel Bennici
Emanuel Bennici

Reputation: 446

Compile with arm-linux-gnueabihf-gcc -c -o test test.c -L/path/to/unicode/directory -lucnv.h

Upvotes: 0

Related Questions