Bacon2D/Bacon2D

Build errors on Debian 10.3

LavThibault opened this issue · 1 comments

Hello, today I tried to install Bacon 2D on my Debian 10.3 in order to play with it in Qt Creator (Qt5).
I followed documentation, installation Tiled, qml-box2d and zlib.

Then I run the
mkdir build && cd build
qmake ..
make

at that step I got these logs

../../3rdparty/tiled/src/libtiled/map.cpp:327:19: error: ‘make_unique’ is not a member of ‘std’

Looks like the problem is from my gcc compiler which does not "fully implemented" c++11, so I changed in src/src.pro CONFIG += c++11 in CONFIG += c++14

After that I restart all the install commands and the same step goes a little further but got

In file included from ../../src/tmx/tmxcell.h:31,
from ../../src/tmx/tmxmapobject.h:30,
from ../../src/tmx/tmxobjectlayer.h:30,
from ../../src/tmx/tmxmap.h:31,
from ../../src/tiledscene.h:31,
from ../../src/plugins.cpp:63:
../../src/tmx/tmxtile.h: In member function ‘QString TMXTile::imageSource() const’:
../../src/tmx/tmxtile.h:51:61: error: could not convert ‘((Tiled::Tile*)((const TMXTile*)this)->TMXTile::m_tile)->Tiled::Tile::imageSource()’ from ‘const QUrl’ to ‘QString’
QString imageSource() const { return m_tile->imageSource(); }
~~~~~~~~~~~~~~~~~~~^~
In file included from ../../src/tmx/tmxmapobject.h:30,
from ../../src/tmx/tmxobjectlayer.h:30,
from ../../src/tmx/tmxmap.h:31,
from ../../src/tiledscene.h:31,
from ../../src/plugins.cpp:63:
../../src/tmx/tmxcell.h: In copy constructor ‘TMXCell::TMXCell(const TMXCell&)’:
../../src/tmx/tmxcell.h:45:5: warning: base class ‘class QObject’ should be explicitly initialized in the copy constructor [-Wextra]
TMXCell(const TMXCell &other) { setCell(other.cell()); }
^~~~~~~
In file included from ../../src/tmx/tmxmap.h:32,
from ../../src/tiledscene.h:31,
from ../../src/plugins.cpp:63:
../../src/tmx/tmxtilelayer.h: In member function ‘TMXCell TMXTileLayer::cellAt(const QPoint&) const’:
../../src/tmx/tmxtilelayer.h:51:91: warning: no return statement in function returning non-void [-Wreturn-type]
TMXCell cellAt(const QPoint &point) const {m_tileLayer->cellAt(point.x(), point.y()); }
^
../../src/tmx/tmxtilelayer.h: In member function ‘TMXCell TMXTileLayer::cellAt(int, int) const’:
../../src/tmx/tmxtilelayer.h:52:68: warning: no return statement in function returning non-void [-Wreturn-type]
TMXCell cellAt(int x, int y) const {m_tileLayer->cellAt(x, y); }
^
In file included from ../../src/tmx/tmxmap.h:35,
from ../../src/tiledscene.h:31,
from ../../src/plugins.cpp:63:
../../src/tmx/tmxtileset.h: In member function ‘QString TMXTileset::imageSource() const’:
../../src/tmx/tmxtileset.h:55:64: error: could not convert ‘((Tiled::Tileset*)((const TMXTileset*)this)->TMXTileset::m_tileset)->Tiled::Tileset::imageSource()’ from ‘const QUrl’ to ‘QString’
QString imageSource() const { return m_tileset->imageSource(); }
~~~~~~~~~~~~~~~~~~~~~~^~
../../src/tmx/tmxtileset.h: In member function ‘const QList& TMXTileset::tiles() const’:
../../src/tmx/tmxtileset.h:60:24: warning: reference to local variable ‘allTiles’ returned [-Wreturn-local-addr]
QList allTiles;
^~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/QtGlobal:1,
from ../../src/plugins.h:32,
from ../../src/plugins.cpp:29:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h: In instantiation of ‘class QtPrivate::QForeachContainerTiled::Map::LayerIteratorHelper’:
../../src/tmx/tmxmap.h:71:9: required from here
/usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:997:32: error: no type named ‘const_iterator’ in ‘class Tiled::Map::LayerIteratorHelper’
typename T::const_iterator i, e;
^
/usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:997:35: error: no type named ‘const_iterator’ in ‘class Tiled::Map::LayerIteratorHelper’
typename T::const_iterator i, e;
^
../../src/tmx/tmxmap.h: In member function ‘QList TMXMap::objectGroups() const’:
../../src/tmx/tmxmap.h:71:9: error: ‘class QtPrivate::QForeachContainerTiled::Map::LayerIteratorHelper’ has no member named ‘i’
foreach(Tiled::ObjectGroup *objectGroup, m_tiledMap->objectGroups())
^~~~~~~
../../src/tmx/tmxmap.h:71:9: error: ‘class QtPrivate::QForeachContainerTiled::Map::LayerIteratorHelper’ has no member named ‘e’
foreach(Tiled::ObjectGroup *objectGroup, m_tiledMap->objectGroups())
^~~~~~~
../../src/tmx/tmxmap.h:71:9: error: ‘class QtPrivate::QForeachContainerTiled::Map::LayerIteratorHelper’ has no member named ‘i’
foreach(Tiled::ObjectGroup *objectGroup, m_tiledMap->objectGroups())
^~~~~~~
../../src/tmx/tmxmap.h:71:9: error: ‘class QtPrivate::QForeachContainerTiled::Map::LayerIteratorHelper’ has no member named ‘i’
foreach(Tiled::ObjectGroup *objectGroup, m_tiledMap->objectGroups())
^~~~~~~
../../src/tmx/tmxmap.h: In member function ‘QList TMXMap::tileLayers() const’:
../../src/tmx/tmxmap.h:79:9: error: ‘class QtPrivate::QForeachContainerTiled::Map::LayerIteratorHelper’ has no member named ‘i’
foreach(Tiled::TileLayer *tileLayer, m_tiledMap->tileLayers())
^~~~~~~
../../src/tmx/tmxmap.h:79:9: error: ‘class QtPrivate::QForeachContainerTiled::Map::LayerIteratorHelper’ has no member named ‘e’
foreach(Tiled::TileLayer *tileLayer, m_tiledMap->tileLayers())
^~~~~~~
../../src/tmx/tmxmap.h:79:9: error: ‘class QtPrivate::QForeachContainerTiled::Map::LayerIteratorHelper’ has no member named ‘i’
foreach(Tiled::TileLayer *tileLayer, m_tiledMap->tileLayers())
^~~~~~~
../../src/tmx/tmxmap.h:79:9: error: ‘class QtPrivate::QForeachContainerTiled::Map::LayerIteratorHelper’ has no member named ‘i’
foreach(Tiled::TileLayer tileLayer, m_tiledMap->tileLayers())
^~~~~~~
In file included from ../../src/tiledlayer.h:31,
from ../../src/tiledscene.h:39,
from ../../src/plugins.cpp:63:
../../src/tiledobject.h: In constructor ‘CollisionItem::CollisionItem(QQuickItem
)’:
../../src/tiledobject.h:143:9: warning: ‘CollisionItem::m_collisionIndex’ will be initialized after [-Wreorder]
int m_collisionIndex;
^~~~~~~~~~~~~~~~
../../src/tiledobject.h:126:104: warning: base ‘QQuickItem’ [-Wreorder]
CollisionItem(QQuickItem *parent = 0) : m_id(0), m_body(0), m_collisionIndex(-1), QQuickItem(parent) {}
^
../../src/tiledobject.h:126:5: warning: when initialized here [-Wreorder]
CollisionItem(QQuickItem *parent = 0) : m_id(0), m_body(0), m_collisionIndex(-1), QQuickItem(parent) {}
^~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/QtGlobal:1,
from ../../src/plugins.h:32,
from ../../src/plugins.cpp:29:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h: In instantiation of ‘QtPrivate::QForeachContainer::QForeachContainer(QtPrivate::QForeachContainer&&) [with T = Tiled::Map::LayerIteratorHelper]’:
../../src/tmx/tmxmap.h:71:9: required from here
/usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:983:43: error: using invalid field ‘QtPrivate::QForeachContainer::i’
control(std::move(other.control))
^
/usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:983:43: error: using invalid field ‘QtPrivate::QForeachContainer::e’
/usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h: In instantiation of ‘QtPrivate::QForeachContainer::QForeachContainer(T&&) [with T = Tiled::Map::LayerIteratorHelper]’:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:1004:12: required from ‘QtPrivate::QForeachContainer<typename std::decay<_Tp>::type> QtPrivate::qMakeForeachContainer(T&&) [with T = Tiled::Map::LayerIteratorHelper; typename std::decay<_Tp>::type = Tiled::Map::LayerIteratorHelper]’
../../src/tmx/tmxmap.h:71:9: required from here
/usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:977:92: error: using invalid field ‘QtPrivate::QForeachContainer::i’
QForeachContainer(T &&t) : c(std::move(t)), i(qAsConst(c).begin()), e(qAsConst(c).end()) {}
^
/usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:977:92: error: using invalid field ‘QtPrivate::QForeachContainer::e’

Can you see a reason why I got these errors ?

Thank you.

Ok, fixed, don't forget the

git submodule update --init

did it manually the first time, not a good idea