set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}) note the kde4 variable. furthermore this then actually fails to find boost python because the compile check would fail Run Build Command:"/usr/bin/make" "cmTryCompileExec110803299/fast" /usr/bin/make -f CMakeFiles/cmTryCompileExec110803299.dir/build.make CMakeFiles/cmTryCompileExec110803299.dir/build make[1]: Entering directory '/tmp/build/build/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /tmp/build/build/CMakeFiles/CMakeTmp/CMakeFiles 1 Building CXX object CMakeFiles/cmTryCompileExec110803299.dir/src.cxx.o /usr/bin/c++ -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -std=c++0x -fno-exceptions -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -std=c++11 -DBoostPython_FromCMake -I/usr/include/python2.7 -o CMakeFiles/cmTryCompileExec110803299.dir/src.cxx.o -c /tmp/build/build/CMakeFiles/CMakeTmp/src.cxx In file included from /usr/include/boost/python/handle.hpp:11:0, from /usr/include/boost/python/args_fwd.hpp:10, from /usr/include/boost/python/args.hpp:10, from /usr/include/boost/python.hpp:11, from /tmp/build/build/CMakeFiles/CMakeTmp/src.cxx:2: /usr/include/boost/python/errors.hpp: In function 'void boost::python::detail::rethrow()': /usr/include/boost/python/errors.hpp:32:44: error: exception handling disabled, use -fexceptions to enable namespace detail { inline void rethrow() { throw; } } ^ CMakeFiles/cmTryCompileExec110803299.dir/build.make:57: recipe for target 'CMakeFiles/cmTryCompileExec110803299.dir/src.cxx.o' failed make[1]: *** [CMakeFiles/cmTryCompileExec110803299.dir/src.cxx.o] Error 1 make[1]: Leaving directory '/tmp/build/build/CMakeFiles/CMakeTmp' Makefile:117: recipe for target 'cmTryCompileExec110803299/fast' failed make: *** [cmTryCompileExec110803299/fast] Error 2 Source file was: #include <boost/python.hpp> const char* greet() { return "Hello world!"; } BOOST_PYTHON_MODULE(hello) { boost::python::def("greet", greet); } int main() { return 0; } Reproducible: Always
Confirmed, just hit this downstream at https://bugzilla.redhat.com/show_bug.cgi?id=1311500 Here's my quick-n-dirty workaround in the meantime, http://pkgs.fedoraproject.org/cgit/rpms/kig.git/tree/kig-15.12.2-exceptions.patch In short, in FindBoostPython.cmake, replace ${KDE4_ENABLE_EXCEPTIONS} with -fexceptions -UQT_NO_EXCEPTIONS (what KDE4_ENABLE_EXCEPTIONS used to be set to in kde4 types). ECM's newer KDE_ENABLE_EXCEPTIONS macro works differently, so is not a 100% drop-in replacement here, and would require some adaption.
Was this solved by the review mentioned in https://bugs.kde.org/show_bug.cgi?id=360822 ?
Git commit 7f8d21fb4e6d9921f68d59233fdd738b9daf232e by Yuri Chornoivan. Committed on 24/12/2018 at 13:19. Pushed by yurchor into branch 'master'. Remove line Differential Revision: https://phabricator.kde.org/D17696 M +0 -1 cmake/modules/FindBoostPython.cmake https://commits.kde.org/kig/7f8d21fb4e6d9921f68d59233fdd738b9daf232e