Bug 382107

Summary: kdevplatform FTBFS due to missing __cpu_model
Product: [Developer tools] kdevplatform Reporter: Matthew Woehlke <mwoehlke.floss>
Component: generalAssignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: normal CC: simonandric5
Priority: NOR    
Version: git master   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Matthew Woehlke 2017-07-07 19:06:14 UTC
In a nutshell, on Fedora 25, kdevplatform runs afoul of https://bugs.launchpad.net/ubuntu/+source/gcc-5/+bug/1568899.

This fixes it:

diff --git a/plugins/welcomepage/CMakeLists.txt b/plugins/welcomepage/CMakeLists.txt
index 2b3083f..f2bae38 100644
--- a/plugins/welcomepage/CMakeLists.txt
+++ b/plugins/welcomepage/CMakeLists.txt
@@ -18,4 +18,5 @@ target_link_libraries(kdevwelcomepage
     KDev::Project
     Qt5::QuickWidgets
     KF5::Declarative
+    -lgcc_s -lgcc
 )

...but probably should not be done unilaterally as in the above.
Comment 1 Kevin Funk 2017-07-08 22:57:09 UTC
Already fixed in 5.1, but I didn't merge the patch to master yet. I just did that.

commit d8410d4f2ac775d6bee657b8485bccf8c8da6e3f
Author: Kevin Funk <kfunk@kde.org>
Date:   Fri Jul 7 13:56:07 2017 +0200

    welcomepage: Work-around GCC 5.x bug
    
    Problem: plugins/welcomepage/welcomepageplugin.cpp:40: undefined
    reference to `__cpu_model'
    
    Fix: Explicitly link kdevwelcomepage shared lib against gcc and gcc_s as
    suggested in https://bugs.launchpad.net/ubuntu/+source/gcc-5/+bug/1568899
Comment 2 Matthew Woehlke 2017-07-11 14:43:02 UTC
Cool; thanks!