Description of problem: libvirt-python package from PyPI fails to build on OS X 10.9. Version-Release number of selected component (if applicable): 1.2.0 How reproducible: Installing libvirt-python from pip. Steps to Reproduce: 1. (sudo) port install libvirt # MacPorts 2. pip install libvirt-python Actual results: ./libvirt-utils.h:87:22: error: token is not a valid binary operator in a preprocessor subexpression # if __GNUC_PREREQ (3, 3) ~~~~~~~~~~~~~ ^ ./libvirt-utils.h:99:22: error: token is not a valid binary operator in a preprocessor subexpression # if __GNUC_PREREQ (3, 4) ~~~~~~~~~~~~~ ^ 2 errors generated. error: command '/usr/bin/clang' failed with exit status 1 Expected results: C modules in libvirt-python should compile and install properly. Additional information: __GNUC_PREREQ macro is not defined in OS X. Some developers use alternative method to detect GNU C version as follows: #define __GNUC_VERSION__ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100) #if __GNUC_VERSION__ >= 30400 # ...features... #endif
This was fixed by: commit c6ff569fb6a535cb625cd99d22052f756eae5b56 Author: Doug Goldstein <cardoe> Date: Sun Dec 29 16:52:15 2013 -0600 define __GNUC_PREREQ macro before using it We brought over use of the __GNUC_PREREQ macro from libvirt but didn't bring over the definition of it. This brings over the macro from libvirt sources.