libimobiledevice / libplist

A library to handle Apple Property List format in binary or XML
https://libimobiledevice.org
GNU Lesser General Public License v2.1
546 stars 305 forks source link

Can't get libxml2 dependency on mac (unix) #78

Closed kensportsfan closed 7 years ago

kensportsfan commented 8 years ago

Whenever I try to run the ./autogen.sh command I'm told I'm missing the "libxml2" package that is listed as a dependency. I've tried downloading this dependent package multiple times and from multiple sources yet it continues to not recognize that the package is there. Does anyone know how to fix this issue? I'm on a Mac (unix).

ibinti commented 8 years ago

I am getting the same error message. Did you find the solution?

nikias commented 8 years ago

When using macports, it's usually enough to install libxml2 package.

But I also used the stock OSX libxml in the past by manually adding a pkgconfig file /usr/lib/pkgconfig/libxml-2.0.pc:

prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
modules=1

Name: libXML
Version: 2.9.2
Description: libXML library version2.
Requires:
Libs: -L${libdir} -lxml2
Libs.private:  -lpthread -lz -llzma  -liconv -lm··
Cflags: -I${includedir}/libxml2·

(I took the version number from /usr/include/libxml2/libxml/xmlversion.h)

Then usually autogen/configure work as expected, however you might have to add PKG_CONFIG_PATH=/usr/lib/pkgconfig at the beginning of the command line so it actually finds the packages required.

nikias commented 7 years ago

Closing. Latest git HEAD code doesn't require libxml2 anymore.