SUMMARY Build fails with Python plugin: 'pyfalkon_load_plugin' has C-linkage specified, but returns user-defined type 'Plugins::Plugin' which is incompatible with C STEPS TO REPRODUCE 1. Clone the repository https://github.com/KDE/Falkon 2. Run cmake 3. make OBSERVED RESULT ``` [ 65%] Automatic MOC for target PyFalkon [ 65%] Built target PyFalkon_autogen [ 65%] Building CXX object src/plugins/PyFalkon/CMakeFiles/PyFalkon.dir/pythonplugin.cpp.o In file included from /home/chaz/git/github.com_KDE_falkon/src/plugins/PyFalkon/pythonplugin.cpp:18: /home/chaz/git/github.com_KDE_falkon/src/plugins/PyFalkon/pythonplugin.h:24:42: error: 'pyfalkon_load_plugin' has C-linkage specified, but returns user-defined type 'Plugins::Plugin' which is incompatible with C [-Werror,-Wreturn-type-c-linkage] extern "C" Q_DECL_EXPORT Plugins::Plugin pyfalkon_load_plugin(const QString &name); ^ 1 error generated. make[2]: *** [src/plugins/PyFalkon/CMakeFiles/PyFalkon.dir/pythonplugin.cpp.o] Error 1 make[1]: *** [src/plugins/PyFalkon/CMakeFiles/PyFalkon.dir/all] Error 2 make: *** [all] Error 2 ``` EXPECTED RESULT Compilation should finish without errors. SOFTWARE/OS VERSIONS Build environment is as follows:- Centos 7.6 64bit llvm-toolset-7 from scl Qt 5.12.3 from downloads.qt.io PySide2/Shiboken2 from https://code.qt.io/pyside/pyside-setup ADDITIONAL INFORMATION KDE Frameworks/Plasma are not installed. This is a standalone build of Falkon with minimum required libraries, plus Python. master branch is at commit fbf7f956fffeef054e1e67095fd6abb929ad2e56 (SVN_SILENT made messages (.desktop file) - always resolve ours)
Builds fine with gcc 8.3.0 You are using clang?
Git commit 2098d69ad1e0c58ae1b62e6b88090a636a9bb421 by David Rosca. Committed on 20/05/2019 at 13:21. Pushed by drosca into branch 'master'. PyFalkon: Fix build with clang FIXED-IN: 3.2.0 M +12 -4 src/lib/plugins/plugins.cpp M +7 -7 src/plugins/PyFalkon/pythonplugin.cpp M +1 -1 src/plugins/PyFalkon/pythonplugin.h https://commits.kde.org/falkon/2098d69ad1e0c58ae1b62e6b88090a636a9bb421
Yes, I am using clang because the gcc included with centos (rhel) 7 is too old and will not compile. Thanks for the fix!
For reference, if I try to compile using the stock gcc 4.8.5, this is the error:- /home/chaz/git/github.com_KDE_falkon/src/lib/sidebar/sidebar.cpp:172:10: error: no matching function for call to ‘SideBarManager::connect(QPointer<SideBar>&, void (QObject::*)(QObject*), SideBarManager* const, SideBarManager::showSideBar(const QString&, bool)::__lambda0)’ make[2]: *** [src/lib/CMakeFiles/FalkonPrivate.dir/sidebar/sidebar.cpp.o] Error 1 make[1]: *** [src/lib/CMakeFiles/FalkonPrivate.dir/all] Error 2