Bug 377933

Summary: Error building under macOS
Product: [Frameworks and Libraries] frameworks-sonnet Reporter: Yurii Kolesnykov <yurii.kolesnykov>
Component: generalAssignee: Martin Sandsmark <martin.sandsmark>
Status: REOPENED ---    
Severity: critical CC: kdelibs-bugs-null, rjvbertin, yurii.kolesnykov
Priority: NOR    
Version First Reported In: 5.32.0   
Target Milestone: ---   
Platform: Homebrew (macOS)   
OS: macOS   
Latest Commit: Version Fixed/Implemented In: v5.34.0
Sentry Crash Report:

Description Yurii Kolesnykov 2017-03-22 15:00:57 UTC
ttps://gist.github.com/f4bdb3b7d5635415375d97523da70071
Comment 1 Yurii Kolesnykov 2017-04-05 16:28:22 UTC
Same problem with 5.32 and master
5.32 https://gist.github.com/ea66503e9f0025ff3fee542acd682f70
head https://gist.github.com/920b055910f0d360bcf5d5487f385be1
Comment 2 Kevin Funk 2017-04-05 16:36:27 UTC
Bug in extra-cmake-modules I suppose.

From kde-modules/KDECompilerSettings.cmake:
```
...

# TODO: Deal with QT_NO_EXCEPTIONS for non-gnu compilers?
#       This should be defined if and only if exceptions are disabled.
#       qglobal.h has some magic to set it when exceptions are disabled
#       with gcc, but other compilers are unaccounted for.

# Turn off exceptions by default
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions")
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions")
...
```

This looks suspicious. Sounds like you need to define QT_NO_EXCEPTIONS yourself?
Comment 3 Kevin Funk 2017-04-05 16:38:02 UTC
Does it only happen for kf5-sonnet for you?

Since this is an issue in a central Qt header:
/usr/local/opt/qt5/include/QtCore/qlist.h:468:13: error: cannot use 'throw' with exceptions disabled
            QT_RETHROW;
            ^
Comment 4 Yurii Kolesnykov 2017-04-05 16:52:35 UTC
>Does it only happen for kf5-sonnet for you?
Yes, as I see now, I had built a lot of kf5 packages in recent.
Comment 5 Kevin Funk 2017-04-09 21:10:19 UTC
I'm on it:
  https://phabricator.kde.org/D5379
Comment 6 Kevin Funk 2017-04-10 07:03:09 UTC
Git commit 3d1d436da60a32e0ab5bec3e09173c4f865ec3f6 by Kevin Funk.
Committed on 10/04/2017 at 07:02.
Pushed by kfunk into branch 'master'.

Fix compilation under AppleClang

Summary:
Broken since we started to treat Clang and AppleClang differently (with
the switch to CMake 3.0)

FIXED-IN: v5.34.0

Reviewers: apol, rjvbb

Reviewed By: apol, rjvbb

Subscribers: #frameworks, #build_system

Tags: #frameworks, #build_system

Differential Revision: https://phabricator.kde.org/D5379

M  +1    -1    kde-modules/KDECompilerSettings.cmake

https://commits.kde.org/extra-cmake-modules/3d1d436da60a32e0ab5bec3e09173c4f865ec3f6
Comment 7 Yurii Kolesnykov 2017-05-23 15:10:34 UTC
Same issue in 5.34.0.
https://github.com/haraldF/homebrew-kf5/issues/99