Summary: | kdenlive fails to build with gcc7 | ||
---|---|---|---|
Product: | [Applications] kdenlive | Reporter: | Heiko Becker <heiko.becker> |
Component: | Installation | Assignee: | Vincent PINON <vpinon> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | asturm, bruce.dubbs, rjvbertin, stenstorpmc |
Priority: | NOR | ||
Version: | 17.04.0 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/kdenlive/5a51022496faf90549a29ff39f0c04ebb72e2a5a | Version Fixed In: | |
Attachments: | kdenlibe-17.04.1-gcct patch |
Description
Heiko Becker
2017-05-10 08:09:13 UTC
I had the same problems with gcc7. I was able to get version 17.04.1 to build with: sed -i '/KLocal/a #include <functional>' src/profiles/tree/profiletreemodel.cpp sed -i '/abs/s/leftDist/(int)&/' src/scopes/audioscopes/spectrogram.cpp *** Bug 375647 has been marked as a duplicate of this bug. *** (In reply to Bruce Dubbs from comment #1) > I had the same problems with gcc7. I was able to get version 17.04.1 to > build with: > > sed -i '/KLocal/a #include <functional>' > src/profiles/tree/profiletreemodel.cpp > sed -i '/abs/s/leftDist/(int)&/' src/scopes/audioscopes/spectrogram.cpp Can you turn this into a proper patch and submit it for review? Created attachment 106016 [details]
kdenlibe-17.04.1-gcct patch
Fix kdenlive 17.04.1 so it builds with gcc7.
I can confirm that the issue still exists in 17.04.2 and is still addressed by the patch. Has it been submitted for review yet? A different patch went into 17.04 branch, is this bug fixed now? The only difference is that the committed change doesn't touch profiletreemodel.cpp . It isn't clear from the commit message under what context the author intended to fix compilation (using gcc7, an exotic compiler option, etc) but for me it doesn't fix the whole issue: /usr/bin/g++-7 -DKCOREADDONS_LIB -DKF5_USE_FILEMETADATA -DKGUIADDONS_LIB -DQT5_USE_WEBKIT -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_URL_CAST_FROM_STRING -DQT_QML_LIB -DQT_QUICK_LIB -DQT_SCRIPT_LIB -DQT_SVG_LIB -DQT_WEBKITWIDGETS_LIB -DQT_WEBKIT_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -DTRANSLATION_DOMAIN=\"kdenlive\" -DUSE_JOGSHUTTLE -DUSE_V4L -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I/path/to/build/src -I/path/to/kdenlive-17.04.2/src -I/path/to/build/src/kdenlive_autogen/include -I/path/to/build/generated -I/path/to/build -I/path/to/kdenlive-17.04.2/src/lib/external -I/path/to/kdenlive-17.04.2/src/lib -I/path/to/build/src/lib/external/kiss_fft -I/path/to/kdenlive-17.04.2/src/lib/external/kiss_fft -I/path/to/build/src/lib/external/media_ctrl -I/path/to/kdenlive-17.04.2/src/lib/external/media_ctrl -I/opt/local/include/mlt -I/opt/local/include -isystem /opt/local/include/qt5 -isystem /opt/local/include/qt5/QtScript -isystem /opt/local/include/qt5/QtCore -isystem /opt/local/share/qt5/mkspecs/linux-g++-64 -isystem /opt/local/include/qt5/QtWidgets -isystem /opt/local/include/qt5/QtGui -isystem /opt/local/include/qt5/QtConcurrent -isystem /opt/local/include/qt5/QtQml -isystem /opt/local/include/qt5/QtNetwork -isystem /opt/local/include/qt5/QtQuick -isystem /opt/local/include/KF5/KWidgetsAddons -isystem /opt/local/include/KF5 -isystem /opt/local/include/KF5/KArchive -isystem /opt/local/include/KF5/KCoreAddons -isystem /opt/local/include/KF5/KIOCore -isystem /opt/local/include/KF5/KService -isystem /opt/local/include/KF5/KConfigCore -isystem /opt/local/include/KF5/KIOFileWidgets -isystem /opt/local/include/KF5/KIOWidgets -isystem /opt/local/include/KF5/KJobWidgets -isystem /opt/local/include/KF5/KCompletion -isystem /opt/local/include/KF5/KBookmarks -isystem /opt/local/include/qt5/QtXml -isystem /opt/local/include/KF5/KItemViews -isystem /opt/local/include/KF5/KXmlGui -isystem /opt/local/include/qt5/QtDBus -isystem /opt/local/include/KF5/KConfigWidgets -isystem /opt/local/include/KF5/KCodecs -isystem /opt/local/include/KF5/KConfigGui -isystem /opt/local/include/KF5/KAuth -isystem /opt/local/include/KF5/Solid -isystem /opt/local/include/KF5/KNotifyConfig -isystem /opt/local/include/KF5/KNewStuff3 -isystem /opt/local/include/KF5/KNewStuff3/KNS3 -isystem /opt/local/include/KF5/KNewStuff3/knscore -isystem /opt/local/include/KF5/KNewStuff3/kns3 -isystem /opt/local/include/KF5/KNewStuff3/KNSCore -isystem /opt/local/include/KF5/Attica -isystem /opt/local/include/KF5/KDBusAddons -isystem /opt/local/include/KF5/KGuiAddons -isystem /opt/local/include/KF5/KNotifications -isystem /opt/local/include/KF5/KTextWidgets -isystem /opt/local/include/KF5/SonnetUi -isystem /opt/local/include/KF5/KI18n -isystem /opt/local/include/KF5/KIconThemes -isystem /opt/local/include/KF5/KCrash -isystem /opt/local/include/qt5/QtSvg -isystem /opt/local/include/KF5/KFileMetaData -isystem /opt/local/include/qt5/QtWebKitWidgets -isystem /opt/local/include/qt5/QtWebKit -O3 -ftracer -g -DNDEBUG -m64 -std=c++0x -fno-operator-names -fno-exceptions -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -Wvla -Wdate-time -fPIC -std=c++11 -Wall -pedantic -Wextra -Wcast-qual -Wcast-align -Wfloat-equal -Wpointer-arith -Wunreachable-code -Wchar-subscripts -Wcomment -Wformat -Werror-implicit-function-declaration -Wmain -Wmissing-braces -Wparentheses -Wsequence-point -Wreturn-type -Wswitch -Wuninitialized -Wreorder -Wundef -Wshadow -Wwrite-strings -Wsign-compare -Wconversion -Wmissing-noreturn -Wsign-conversion -Wunused -Wstrict-aliasing -Wstrict-overflow -Wconversion -Wdisabled-optimization -Wlogical-op -Wunsafe-loop-optimizations -Wunused-parameter -Wshadow -Wno-variadic-macros -Wno-float-conversion -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -std=gnu++11 -o CMakeFiles/kdenlive.dir/profiles/tree/profiletreemodel.cpp.o -c /path/to/kdenlive-17.04.2/src/profiles/tree/profiletreemodel.cpp /path/to/kdenlive-17.04.2/src/profiles/tree/profiletreemodel.cpp: In constructor ‘ProfileTreeModel::ProfileTreeModel(QObject*)’: /path/to/kdenlive-17.04.2/src/profiles/tree/profiletreemodel.cpp:146:21: error: ‘function’ is not a member of ‘std’ std::array<std::function<bool(QVariant, std::unique_ptr<ProfileModel>&)>, nbCrit> filtLambdas; ^~~~~~~~ /path/to/kdenlive-17.04.2/src/profiles/tree/profiletreemodel.cpp:146:21: note: suggested alternative: ‘is_function’ std::array<std::function<bool(QVariant, std::unique_ptr<ProfileModel>&)>, nbCrit> filtLambdas; ^~~~~~~~ is_function /path/to/kdenlive-17.04.2/src/profiles/tree/profiletreemodel.cpp:146:21: error: ‘function’ is not a member of ‘std’ /path/to/kdenlive-17.04.2/src/profiles/tree/profiletreemodel.cpp:146:21: note: suggested alternative: ‘is_function’ std::array<std::function<bool(QVariant, std::unique_ptr<ProfileModel>&)>, nbCrit> filtLambdas; ^~~~~~~~ is_function /path/to/kdenlive-17.04.2/src/profiles/tree/profiletreemodel.cpp:146:75: error: expression list treated as compound expression in functional cast [-fpermissive] std::array<std::function<bool(QVariant, std::unique_ptr<ProfileModel>&)>, nbCrit> filtLambdas; ^ /path/to/kdenlive-17.04.2/src/profiles/tree/profiletreemodel.cpp:146:76: error: wrong number of template arguments (1, should be 2) std::array<std::function<bool(QVariant, std::unique_ptr<ProfileModel>&)>, nbCrit> filtLambdas; ^ In file included from /usr/include/c++/7/tuple:39:0, from /usr/include/c++/7/bits/stl_map.h:63, from /usr/include/c++/7/map:61, from /opt/local/include/qt5/QtCore/qmetatype.h:55, from /opt/local/include/qt5/QtCore/qvariant.h:46, from /opt/local/include/qt5/QtCore/qabstractitemmodel.h:43, from /opt/local/include/qt5/QtCore/QAbstractItemModel:1, from /path/to/kdenlive-17.04.2/src/profiles/tree/profiletreemodel.hpp:25, from /path/to/kdenlive-17.04.2/src/profiles/tree/profiletreemodel.cpp:22: /usr/include/c++/7/array:94:12: note: provided for ‘template<class _Tp, long unsigned int _Nm> struct std::array’ struct array ^~~~~ /path/to/kdenlive-17.04.2/src/profiles/tree/profiletreemodel.cpp:146:77: error: expected unqualified-id before ‘,’ token std::array<std::function<bool(QVariant, std::unique_ptr<ProfileModel>&)>, nbCrit> filtLambdas; ^ /path/to/kdenlive-17.04.2/src/profiles/tree/profiletreemodel.cpp:146:85: error: expected initializer before ‘>’ token std::array<std::function<bool(QVariant, std::unique_ptr<ProfileModel>&)>, nbCrit> filtLambdas; ^ /path/to/kdenlive-17.04.2/src/profiles/tree/profiletreemodel.cpp:147:5: error: ‘filtLambdas’ was not declared in this scope filtLambdas[0] = [](QVariant width, std::unique_ptr<ProfileModel>& ptr){return width==-1 || ptr->width() == width;}; ^~~~~~~~~~~ make[2]: *** [src/CMakeFiles/kdenlive.dir/profiles/tree/profiletreemodel.cpp.o] Error 1 (That's with the patch applied to the 17.04.2 release code) (In reply to andreas.sturmlechner from comment #6) > A different patch went into 17.04 branch, is this bug fixed now? Despite profiletreemodel not being touched, it does work for me now with 2ed43d34a124609aef092164e2e58e5476228209 applied to 17.04.2. I guess the missing header is pulled in by something else, which has changed since my original bug report. Git commit 5a51022496faf90549a29ff39f0c04ebb72e2a5a by Vincent Pinon. Committed on 25/06/2017 at 08:11. Pushed by vpinon into branch 'Applications/17.04'. fix compile (gcc7) M +1 -0 src/profiles/tree/profiletreemodel.cpp https://commits.kde.org/kdenlive/5a51022496faf90549a29ff39f0c04ebb72e2a5a |