Closed romangg closed 7 months ago
In GitLab by @Valmar on Sep 26, 2020, 07:26
I'm using GCC 10.2.0 on Arch Linux, by the way.
In GitLab by @Valmar on Sep 26, 2020, 07:37
Ah, I see... it compiles when I'm explicitly forcing -O2
~ but it fails when CMAKE_BUILD_TYPE
is set to Release
...
Thanks for the feedback! I will try to fix this immediately. That looks like a simple issue with a removed assert in the release build and in this case no function return.
In GitLab by @Valmar on Sep 26, 2020, 13:08
Cheers. :)
It compiled when I set CMAKE_BUILD_TYPE
to None
and set CMAKE_C_FLAGS
and CMAKE_CXX_FLAGS
to use Arch's default makeflags, which include -O2
.
For more explanation, I suspect that CMAKE_BUILD_TYPE
being set to Release
sets the makeflags to -O0
. As, according to StackOverflow, this particular error is caused when -O0
is being used.
In GitLab by @haagch on Sep 26, 2020, 13:23
Asserts are disabled when cmake adds -DNDEBUG
to the cflags and it does that in Release mode.
Sticking
string(REPLACE "-DNDEBUG" "" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
at the top of the top level CMakeLists.txt will enable asserts and allow to build in release mode but I'm sure it will be fixed soon anyway.
@Valmar I have opened !16 to fix the issue. I tested it locally but if you want to you can try out the branch in this MR to check if this fixes the release build also for you.
But since I tested the release build here you shouldn't have to. I would just push to master and then cherry-pick to the stable branch.
mentioned in commit 42bb9071a7b3390808d0a335f22b51e26ff48e07
The fix was cherry-picked to Plasma/5.20 branch by f6622f4d025fa9e8929b3bd143b12b590dbb0685.
In GitLab by @Valmar on Sep 26, 2020, 07:25