The clang detection in FindPythonModuleGeneration.cmake assumes that the clang library is called libclang-x.y.so. This is only true in Debian/ubuntu, all other major distros install the library as libclang.so.x.y. So the clang library location needs to be manually specified in these distros.
confirmed (for fedora), had to manually specify: -Dlibclang_LIBRARY:PATH=%{_libdir}/libclang.so for rpm builds to succeed
As far as I'm concerned, this simple patch works: diff -up extra-cmake-modules-5.38.0/find-modules/FindPythonModuleGeneration.cmake.fedora extra-cmake-modules-5.38.0/find-modules/FindPythonModuleGeneration.cmake --- extra-cmake-modules-5.38.0/find-modules/FindPythonModuleGeneration.cmake.fedora 2017-09-03 13:34:35.000000000 -0500 +++ extra-cmake-modules-5.38.0/find-modules/FindPythonModuleGeneration.cmake 2017-09-13 13:41:07.333687678 -0500 @@ -199,6 +199,9 @@ if (NOT libclang_LIBRARY) find_library(libclang_LIBRARY clang-3.9) if (NOT libclang_LIBRARY) find_library(libclang_LIBRARY clang-3.8) + if (NOT libclang_LIBRARY) + find_library(libclang_LIBRARY clang) + endif() endif() endif() else()
Equivalent simpler patch: https://git.archlinux.org/svntogit/packages.git/tree/trunk/fix-python-bindings-generation.patch?h=packages/extra-cmake-modules There's an alternative approach in https://phabricator.kde.org/D5289
*** Bug 376957 has been marked as a duplicate of this bug. ***