https://bugs.kde.org/show_bug.cgi?id=379688

            Bug ID: 379688
           Summary: kdenlive fails to build with gcc7
           Product: kdenlive
           Version: 17.04.0
          Platform: Other
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: Installation
          Assignee: vpi...@kde.org
          Reporter: heire...@exherbo.org
  Target Milestone: ---

One problem is the usage of abs() with an unsigned type and overloads:

/var/tmp/paludis/build/media-video-kdenlive-17.04.1/work/kdenlive-17.04.1/src/scopes/audioscopes/spectrogram.cpp:244:113:
error: call
 of overloaded 'abs(unsigned int)' is ambiguous
                 hideText = m_aTrackMouse->isChecked() && m_mouseWithinWidget
&& abs(x - (leftDist + mouseX + 20)) < (int) minDistX +
 16
                                                                               
                                 ^
In file included from /usr/x86_64-pc-linux-gnu/include/c++/7.1.0/cstdlib:75:0,
                 from
/usr/x86_64-pc-linux-gnu/include/c++/7.1.0/bits/stl_algo.h:59,
                 from /usr/x86_64-pc-linux-gnu/include/c++/7.1.0/algorithm:62,
                 from /usr/include/qt5/QtCore/qglobal.h:108,
                 from /usr/include/qt5/QtGui/qtguiglobal.h:43,
                 from /usr/include/qt5/QtWidgets/qtwidgetsglobal.h:43,
                 from /usr/include/qt5/QtWidgets/qwidget.h:43,
                 from /usr/include/qt5/QtWidgets/QWidget:1,
                 from
/var/tmp/paludis/build/media-video-kdenlive-17.04.1/work/kdenlive-17.04.1/src/scopes/audioscopes/abstractaudioscopewidget.h:14,
                 from
/var/tmp/paludis/build/media-video-kdenlive-17.04.1/work/kdenlive-17.04.1/src/scopes/audioscopes/spectrogram.h:28,
                 from
/var/tmp/paludis/build/media-video-kdenlive-17.04.1/work/kdenlive-17.04.1/src/scopes/audioscopes/spectrogram.cpp:11:
/usr/x86_64-pc-linux-gnu/include/stdlib.h:751:12: note: candidate: int abs(int)
 extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
            ^~~
In file included from /usr/x86_64-pc-linux-gnu/include/c++/7.1.0/cstdlib:77:0,
                 from
/usr/x86_64-pc-linux-gnu/include/c++/7.1.0/bits/stl_algo.h:59,
                 from /usr/x86_64-pc-linux-gnu/include/c++/7.1.0/algorithm:62,
                 from /usr/include/qt5/QtCore/qglobal.h:108,
                 from /usr/include/qt5/QtGui/qtguiglobal.h:43,
                 from /usr/include/qt5/QtWidgets/qtwidgetsglobal.h:43,
                 from /usr/include/qt5/QtWidgets/qwidget.h:43,
                 from /usr/include/qt5/QtWidgets/QWidget:1,
                 from
/var/tmp/paludis/build/media-video-kdenlive-17.04.1/work/kdenlive-17.04.1/src/scopes/audioscopes/abstractaudioscopewidget.h:14,
                 from
/var/tmp/paludis/build/media-video-kdenlive-17.04.1/work/kdenlive-17.04.1/src/scopes/audioscopes/spectrogram.h:28,
                 from
/var/tmp/paludis/build/media-video-kdenlive-17.04.1/work/kdenlive-17.04.1/src/scopes/audioscopes/spectrogram.cpp:11:
/usr/x86_64-pc-linux-gnu/include/c++/7.1.0/bits/std_abs.h:56:3: note:
candidate: long int std::abs(long int)
   abs(long __i) { return __builtin_labs(__i); }
   ^~~
/usr/x86_64-pc-linux-gnu/include/c++/7.1.0/bits/std_abs.h:61:3: note:
candidate: long long int std::abs(long long int)
   abs(long long __x) { return __builtin_llabs (__x); }
   ^~~
/usr/x86_64-pc-linux-gnu/include/c++/7.1.0/bits/std_abs.h:70:3: note:
candidate: constexpr double std::abs(double)
   abs(double __x)
   ^~~
/usr/x86_64-pc-linux-gnu/include/c++/7.1.0/bits/std_abs.h:74:3: note:
candidate: constexpr float std::abs(float)
   abs(float __x)
   ^~~
/usr/x86_64-pc-linux-gnu/include/c++/7.1.0/bits/std_abs.h:78:3: note:
candidate: constexpr long double std::abs(long double)
   abs(long double __x)
   ^~~
/usr/x86_64-pc-linux-gnu/include/c++/7.1.0/bits/std_abs.h:84:3: note:
candidate: constexpr __int128 std::abs(__int128)
   abs(__GLIBCXX_TYPE_INT_N_0 __x) { return __x >= 0 ? __x : -__x; }
   ^~~
/usr/x86_64-pc-linux-gnu/include/c++/7.1.0/bits/std_abs.h:102:3: note:
candidate: constexpr __float128 std::abs(__float128)
   abs(__float128 __x)



If I monkey-patch that and the similar occurrence in line 271 to (int)(...) I
get another error:


git-sources/kde-core/kdenlive/src/profiles/tree/profiletreemodel.cpp
/home/heiko/Quelltexte/exherbo/git-sources/kde-core/kdenlive/src/profiles/tree/profiletreemodel.cpp:
In constructor 'ProfileTreeModel::ProfileTreeModel(QObject*)':
/home/heiko/Quelltexte/exherbo/git-sources/kde-core/kdenlive/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;
                     ^~~~~~~~
/home/heiko/Quelltexte/exherbo/git-sources/kde-core/kdenlive/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
/home/heiko/Quelltexte/exherbo/git-sources/kde-core/kdenlive/src/profiles/tree/profiletreemodel.cpp:146:21:
error: 'function' is not a member of 'std'
/home/heiko/Quelltexte/exherbo/git-sources/kde-core/kdenlive/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
/home/heiko/Quelltexte/exherbo/git-sources/kde-core/kdenlive/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;
                                                                           ^
/home/heiko/Quelltexte/exherbo/git-sources/kde-core/kdenlive/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/x86_64-pc-linux-gnu/include/c++/7.1.0/tuple:39:0,
                 from
/usr/x86_64-pc-linux-gnu/include/c++/7.1.0/bits/stl_map.h:63,
                 from /usr/x86_64-pc-linux-gnu/include/c++/7.1.0/map:61,
                 from /usr/host/include/qt5/QtCore/qmetatype.h:55,
                 from /usr/host/include/qt5/QtCore/qvariant.h:46,
                 from /usr/host/include/qt5/QtCore/qabstractitemmodel.h:43,
                 from /usr/host/include/qt5/QtCore/QAbstractItemModel:1,
                 from
/home/heiko/Quelltexte/exherbo/git-sources/kde-core/kdenlive/src/profiles/tree/profiletreemodel.hpp:25,
                 from
/home/heiko/Quelltexte/exherbo/git-sources/kde-core/kdenlive/src/profiles/tree/profiletreemodel.cpp:22:
/usr/x86_64-pc-linux-gnu/include/c++/7.1.0/array:94:12: note: provided for
'template<class _Tp, long unsigned int _Nm> struct std::array'
     struct array
            ^~~~~
/home/heiko/Quelltexte/exherbo/git-sources/kde-core/kdenlive/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;
                                                                             ^
/home/heiko/Quelltexte/exherbo/git-sources/kde-core/kdenlive/src/profiles/tree/profiletreemodel.cpp:146:85:
error: expected initializer before '>' token
     std::array<std::function<bool(QVariant, std::unique_ptr<ProfileModel>&)>,
nbCrit> filtLambdas;
                                                                               
     ^
/home/heiko/Quelltexte/exherbo/git-sources/kde-core/kdenlive/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;};

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to