I am trying to add libvisio in my mac os x from https://wiki.documentfoundation.org/DLP/Libraries/libvisio
I have added all dependancy described there listed bellow:
boost
gperf
icu
librevenge
libxml2
perl
doxygen
After adding dependancies i am trying to run bellow commands.
$ ./autogen.sh ''# only needed for building from git''
$ ./configure
$ make
$ make install
But i having problem with second command $ ./configure
Getting bellow error.
configure: error: Package requirements (
libxml-2.0
) were not met:
No package 'libxml-2.0' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables LIBXML_CFLAGS
and LIBXML_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
i have tried to install libxml2 with $ brew install libxml
but its says Warning: libxml2-2.9.3 already installed
.
I am using OS X 10.11.4
Can some one help me out here. Thanks
So, you already have libxml2 installed with brew. As brew tells you when it installs libxml2:
margold@home-macbook ~ $ brew install libxml2
(...)
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.
OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
LDFLAGS: -L/usr/local/opt/libxml2/lib
CPPFLAGS: -I/usr/local/opt/libxml2/include
(...)
This means that brew is not symlinking libxml2 to /usr/local/lib and /usr/local/include, and likely not linking the pkg-config file there as well, which is why libvisio can't find it.
So you have to specify the location of libxml2 when you run ./configure
, just as brew and libvisio tell you to:
./configure LIBXML_CFLAGS=-I/usr/local/opt/libxml2/include LIBXML_LIBS=-L/usr/local/opt/libxml2/lib
(The paths on your system may vary, so do check!)
Other ways to solve this:
inlcude/
, lib/
, and pkg-config
files of libxml to /usr/local/
yourself