Hello, I'm getting marble master f52af133e3f8 build error of shp2pn2_automoc.cpp as below. gcc version 4.8.3 20140627 [ 92%] Building CXX object tools/shp2pn2/CMakeFiles/shp2pn2.dir/shp2pn2_automoc.cpp.o In file included from /usr/include/c++/4.8/algorithm:62:0, from /usr/include/qt5/QtCore/qglobal.h:88, from /usr/include/qt5/QtCore/qalgorithms.h:37, from /usr/include/qt5/QtCore/qvector.h:37, from /usr/include/qt5/QtCore/QVector:1, from /home/jarek/dev/src/marble/src/lib/marble/geodata/data/GeoDataLineString.h:16, from /home/jarek/dev/src/marble/src/lib/marble/geodata/data/GeoDataLinearRing.h:17, from /home/jarek/dev/src/marble/tools/osm-simplify/BaseClipper.h:16, from /home/jarek/dev/src/marble/tools/osm-simplify/BaseClipper.cpp:13: /usr/include/c++/4.8/bits/stl_algo.h: In instantiation of ‘_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, const _Tp&, _Compare) [with _RandomAccessIterator = QList<QSharedPointer<Marble::LinkedPoint> >::iterator; _Tp = QSharedPointer<Marble::LinkedPoint>; _Compare = Marble::BaseClipper::clipPolyObject(const QPolygonF&, QVector<QPolygonF>&, bool)::__lambda1]’: /usr/include/c++/4.8/bits/stl_algo.h:2296:78: required from ‘_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = QList<QSharedPointer<Marble::LinkedPoint> >::iterator; _Compare = Marble::BaseClipper::clipPolyObject(const QPolygonF&, QVector<QPolygonF>&, bool)::__lambda1]’ /usr/include/c++/4.8/bits/stl_algo.h:2337:62: required from ‘void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = QList<QSharedPointer<Marble::LinkedPoint> >::iterator; _Size = int; _Compare = Marble::BaseClipper::clipPolyObject(const QPolygonF&, QVector<QPolygonF>&, bool)::__lambda1]’ /usr/include/c++/4.8/bits/stl_algo.h:5490:44: required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = QList<QSharedPointer<Marble::LinkedPoint> >::iterator; _Compare = Marble::BaseClipper::clipPolyObject(const QPolygonF&, QVector<QPolygonF>&, bool)::__lambda1]’ /home/jarek/dev/src/marble/tools/osm-simplify/BaseClipper.cpp:454:14: required from here /usr/include/c++/4.8/bits/stl_algo.h:2263:35: error: no match for call to ‘(Marble::BaseClipper::clipPolyObject(const QPolygonF&, QVector<QPolygonF>&, bool)::__lambda1) (QSharedPointer<Marble::LinkedPoint>&, const QSharedPointer<Marble::LinkedPoint>&)’ while (__comp(*__first, __pivot)) ^ /home/jarek/dev/src/marble/tools/osm-simplify/BaseClipper.cpp:452:74: note: candidates are: std::sort(intersectionsTop.begin(), intersectionsTop.end(), [](QSharedPointer<LinkedPoint>& A, QSharedPointer<LinkedPoint>& B) { Reproducible: Always Steps to Reproduce: Make libshp1 available, configure, build. Actual Results: Build break Expected Results: Builds, installs
(opensuse 13.2)
BTW, Builds with gcc 4.9.2
Git commit c04efe5a74cc1d5e64562216d7d82adcec5e1add by Dennis Nienhüser. Committed on 06/09/2016 at 18:11. Pushed by nienhueser into branch 'master'. Pass const reference to lambda. Might fix build with GCC 4.8. M +4 -4 tools/vectorosm-tilecreator/BaseClipper.cpp http://commits.kde.org/marble/c04efe5a74cc1d5e64562216d7d82adcec5e1add
Thanks for the hints. I don't have easy access to such an old GCC version, but the commit above might still fix the problem. Can you give it a try and report back?
It fixes the problem, thanks Dennis! PS: I also like how Marble libs for Qt 5 evolved - now works much better than Qt 4 version with Kexi where Marble is used for rendering map both on paper reports (via KReport) and on forms as QWidget. Cool.