![](https://secure.gravatar.com/avatar/8b97b5aad24c30e4a1357b38cc39aeaa.jpg?s=120&d=mm&r=g)
Felix Schwarz schrieb am 27.10.2014 um 13:28:
I just tried to build lxml 3.4.0 using pypy 2.2.1 (on Fedora 20) build failed due to a missing pyconfig.h.
Is that expected behavior? I see that there are passing travis builds for the github version so it should be possible somehow.
I'm not sure where to start debugging the issue as it could be a lxml problem, pypy error or Fedora packaging bug so I decided to start at the source :-)
I started out with the lxml 3.4.0 tar.gz from pypi because I tried to avoid rebuilding all the cython stuff. Maybe that's the problem?
No, it's not.
$ pypy setup.py build Building lxml version 3.4.0. Building without Cython. Using build configuration of libxslt 1.1.28 Building against libxml2/libxslt in the following directory: /usr/lib64 /usr/lib64/pypy-2.2.1/lib-python/2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url' warnings.warn(msg) running build running build_py copying src/lxml/includes/lxml-version.h -> build/lib.linux-x86_64-2.7/lxml/includes running build_ext building 'lxml.etree' extension cc -O2 -fPIC -Wimplicit -I/usr/include/libxml2 -I/home/fs/code/szoska/fiverx/lxml-3.4.0/src/lxml/includes -I/home/fs/code/szoska/fiverx/venv.pypy/include -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -w src/lxml/lxml.etree.c:8:22: fatal error: pyconfig.h: No such file or directory #include "pyconfig.h" ^ compilation terminated. error: command 'cc' failed with exit status 1
BUT: $ rpm -q --list pypy-devel | grep pyconfig.h /usr/lib64/pypy-2.2.1/include/pyconfig.h
Yes, that's not in a standard location, and pypy's distutils doesn't seem to add the directory to the C compiler search path, so it's not found during the build. Try adding "-I /usr/lib64/pypy-2.2.1" to your CFLAGS. Stefan