Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

libxml2 and libxml2-dev on OSX

Tags:

c++

macos

When trying to build the Unix QuickFIX engine, I get the following error after ./bootstrap

warning:macro 'AM_PATH_XML2' not found in library

As I understand, libxml2 already comes with XCode OS X Mountain Lion. An answer I found suggested to download libxml2-dev, although I could not find the package using HomeBrew.
I'm relatively new to programming on OS X and Xcode and porting Unix applications, so I'm not sure exactly what I have yet.

like image 500
zzzzzzzzzzz Avatar asked Jul 29 '12 01:07

zzzzzzzzzzz


People also ask

Is libxml2 installed Mac?

OS X comes with libxml2 installed, but it's in /usr/include/libxml2 .

Where do I put libxml2?

You can use an existing directory which is already in the path, such as C:\WINDOWS . You can also create a new directory for libxml and place the files there, but be sure to modify the PATH environment variable and add that new directory to its list.

What is libxml2 Dev?

libxml2 is a software library for parsing XML documents. It is also the basis for the libxslt library which processes XSLT-1.0 stylesheets.

How do I download libxml2?

Locate where you can get the latest version of the software. (From google, libxml2 webpage is here: http://www.xmlsoft.org/downloads.html. From there, you can find the ftp location where you can download the software.


1 Answers

I did a

brew install libxml2

Then poking around I found the macro AM_PATH_XML2 in /usr/local/Cellar/libxml2/2.8.0/share/aclocal/libxml.m4. Which is all the dev package contents, then I compared to my Ubuntu/Vagrant virtual I have locally that was working fine and remembered to:

brew link --force libxml2

which put the symlink in /usr/local/share/aclocal.

And now I'm building, but I also needed automaker, so to recap

brew install automake autoconf libtool libxml2                                                            
brew link libxml2       
like image 152
Will Ballard Avatar answered Sep 22 '22 16:09

Will Ballard