iamsergio / flow-pomodoro

A pomodoro app that blocks distractions while you work
https://github.com/iamsergio/flow-pomodoro
GNU General Public License v2.0
72 stars 11 forks source link

flow-pomodoro-1.1.2 fails to build #14

Closed mrueg closed 7 years ago

mrueg commented 7 years ago

Install path /usr Compiler flags: C -march=native -O2 -pipe C++
Linker flags: Executable -Wl,-O1 -Wl,--as-needed Module -Wl,-O1 -Wl,--as-needed Shared -Wl,-O1 -Wl,--as-needed

[ 92%] Building CXX object src/CMakeFiles/flow.dir/tooltipcontroller.cpp.o cd /var/tmp/portage/x11-misc/flow-pomodoro-1.1.2/work/flow-pomodoro-1.1.2_build/src && /usr/bin/x86_64-pc-linux-gnu-g++ -DNO_WEBDAV -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_QML_LIB -DQT_QUICK_LIB -DQT_WIDGETS_LIB -I/var/tmp/portage/x11-misc/flow-pomodoro-1.1.2/work/flow-pomodoro-1.1.2_build/src -I/var/tmp/portage/x11-misc/flow-pomodoro-1.1.2/work/flow-pomodoro-1.1.2/src -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtQuick -isystem /usr/include/qt5/QtQml -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtWidgets -DNDEBUG -fPIC -o CMakeFiles/flow.dir/tooltipcontroller.cpp.o -c /var/tmp/portage/x11-misc/flow-pomodoro-1.1.2/work/flow-pomodoro-1.1.2/src/tooltipcontroller.cpp /var/tmp/portage/x11-misc/flow-pomodoro-1.1.2/work/flow-pomodoro-1.1.2/src/storage.cpp: In member function ‘int Storage::nonRecurringTaskCount() const’: /var/tmp/portage/x11-misc/flow-pomodoro-1.1.2/work/flow-pomodoro-1.1.2/src/storage.cpp:633:5: warning: lambda expressions only available with -std=c++11 or -std=gnu++11 }); ^ /var/tmp/portage/x11-misc/flow-pomodoro-1.1.2/work/flow-pomodoro-1.1.2/src/storage.cpp:633:6: error: no matching function for call to ‘count_if(QList<QSharedPointer<Task> >::const_iterator, QList<QSharedPointer<Task> >::const_iterator, Storage::nonRecurringTaskCount() const::<lambda(const Ptr&)>)’ }); ^ /var/tmp/portage/x11-misc/flow-pomodoro-1.1.2/work/flow-pomodoro-1.1.2/src/storage.cpp:633:6: note: candidate is: In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/algorithm:62:0, from /usr/include/qt5/QtCore/qglobal.h:88, from /usr/include/qt5/QtCore/qalgorithms.h:37, from /usr/include/qt5/QtCore/qlist.h:37, from /usr/include/qt5/QtCore/QList:1, from /var/tmp/portage/x11-misc/flow-pomodoro-1.1.2/work/flow-pomodoro-1.1.2/src/genericlistmodel.h:4, from /var/tmp/portage/x11-misc/flow-pomodoro-1.1.2/work/flow-pomodoro-1.1.2/src/tag.h:23, from /var/tmp/portage/x11-misc/flow-pomodoro-1.1.2/work/flow-pomodoro-1.1.2/src/task.h:26, from /var/tmp/portage/x11-misc/flow-pomodoro-1.1.2/work/flow-pomodoro-1.1.2/src/storage.h:23, from /var/tmp/portage/x11-misc/flow-pomodoro-1.1.2/work/flow-pomodoro-1.1.2/src/storage.cpp:20: /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/bits/stl_algo.h:3971:5: note: template<class _IIter, class _Predicate> typename std::iterator_traits<_Iterator>::difference_type std::count_if(_IIter, _IIter, _Predicate) count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) ^ /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/bits/stl_algo.h:3971:5: note: template argument deduction/substitution failed: /var/tmp/portage/x11-misc/flow-pomodoro-1.1.2/work/flow-pomodoro-1.1.2/src/storage.cpp: In substitution of ‘template<class _IIter, class _Predicate> typename std::iterator_traits<_Iterator>::difference_type std::count_if(_IIter, _IIter, _Predicate) [with _IIter = QList<QSharedPointer<Task> >::const_iterator; _Predicate = Storage::nonRecurringTaskCount() const::<lambda(const Ptr&)>]’: /var/tmp/portage/x11-misc/flow-pomodoro-1.1.2/work/flow-pomodoro-1.1.2/src/storage.cpp:633:6: required from here /var/tmp/portage/x11-misc/flow-pomodoro-1.1.2/work/flow-pomodoro-1.1.2/src/storage.cpp:633:6: error: template argument for ‘template<class _IIter, class _Predicate> typename std::iterator_traits<_Iterator>::difference_type std::count_if(_IIter, _IIter, _Predicate)’ uses local type ‘Storage::nonRecurringTaskCount() const::<lambda(const Ptr&)>’ }); ^ /var/tmp/portage/x11-misc/flow-pomodoro-1.1.2/work/flow-pomodoro-1.1.2/src/storage.cpp:633:6: error: trying to instantiate ‘template<class _IIter, class _Predicate> typename std::iterator_traits<_Iterator>::difference_type std::count_if(_IIter, _IIter, _Predicate)’

iamsergio commented 7 years ago

Which compiler is that ?

mrueg commented 7 years ago

I'm using gcc-4.9.3 and cmake-3.6.2

iamsergio commented 7 years ago

Are you building through emerge/portage or directly using cmake ?

mrueg commented 7 years ago

I'm building it via emerge. Can try to build it directly later.

mrueg commented 7 years ago

it fails via direct cmake as well

iamsergio commented 7 years ago

Can you try adding -std=c++11 to CXXFLAGS ?

iamsergio commented 7 years ago

Fixed in 1.1 branch, can you test before I tag it ?

mrueg commented 7 years ago

@iamsergio Yes that patch fixes it. Thanks!