lxml compile osx10.9 mavericks cannot find libxml2 headers
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxml |
Invalid
|
Undecided
|
Unassigned |
Bug Description
when compiling lxml on osx10.9 it cannot find the libxml headers, because they are in a slightly different folder.
in short, doing this before building it, fixes the issue:
xport CFLAGS=
the libxml2 folder contains the "libxml" subfolder, which contains the header-files.
i'm not sure how would be the best way to fix this.
full output from compiling:
$ /usr/bin/python setup.py build
Building lxml version 3.2.3.
Building without Cython.
Using build configuration of libxslt 1.1.28
/System/
warnings.
running build
running build_py
copying src/lxml/
running build_ext
building 'lxml.etree' extension
cc -fno-strict-
clang: warning: argument unused during compilation: '-mno-fused-madd'
clang: warning: argument unused during compilation: '-flat_namespace'
In file included from src/lxml/
/private/
#include "libxml/
^
1 error generated.
error: command 'cc' failed with exit status 1
quick (and dirty) solution for me was adding the path to the C_INCLUDE_PATH - at least until its fixed
if you have libxml installed through brew it should look something like this:
export C_INCLUDE_ PATH=$C_ INCLUDE_ PATH:/usr/ local/Cellar/ libxml2/ 2.9.1/include/ libxml2