Bug 382107 - kdevplatform FTBFS due to missing __cpu_model
Summary: kdevplatform FTBFS due to missing __cpu_model
Status: RESOLVED FIXED
Alias: None
Product: kdevplatform
Classification: Developer tools
Component: general (show other bugs)
Version: git master
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-07 19:06 UTC by Matthew Woehlke
Modified: 2017-07-12 18:46 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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!