BOSSoNe0013 / track-o-bot

The friendly Hearthstone Tracker (Linux port)
https://trackobot.com
GNU Lesser General Public License v2.1
39 stars 6 forks source link

Build environment in Ubuntu 14.04 issue #46

Closed ajukraine closed 8 years ago

ajukraine commented 8 years ago

I can't properly configure my build environment. Installed Qt5.6 and still getting linker errors (with g++-4.8). Can you describe your build environment (especially Qt5+ details)?

angrylinuxuser commented 8 years ago

are you using some kind of ide to build or are you building by hand?

ajukraine commented 8 years ago

I don't think this matter whether I use QtCreator or just qmake/make. Tried both of them, got same linker error list.

angrylinuxuser commented 8 years ago

Could you post those linker errors? That can shed some light on your problem (im thinking you are missing some dev packages)

BOSSoNe0013 commented 8 years ago

Hi, except qtbase5-dev, there's no requirement for Qt5. As said by @angrylinuxuser, provide your linker output and we will be able to help you.

angrylinuxuser commented 8 years ago

quick look at project file: -lGL -lGLU -lXext -lX11 -lXfixes so you need all those dev packackes besides qt

ajukraine commented 8 years ago

This is what I get, when compiling with latest installed qtbase5-dev package (5.2.1+dfsg-1ubuntu14.3):

In file included from /usr/include/qt5/QtCore/qjsonobject.h:45:0,
                 from /usr/include/qt5/QtCore/QJsonObject:1,
                 from src/Result.h:5,
                 from src/ResultTracker.h:3,
                 from src/Trackobot.h:6,
                 from src/Main.cpp:1:
/usr/include/qt5/QtCore/qjsonvalue.h: In member function 'QJsonObject Result::AsJson() const':
/usr/include/qt5/QtCore/qjsonvalue.h:119:12: error: 'QJsonValue::QJsonValue(const void*)' is private
     inline QJsonValue(const void *) {}
            ^
In file included from src/ResultTracker.h:3:0,
                 from src/Trackobot.h:6,
                 from src/Main.cpp:1:
src/Result.h:150:26: error: within this context
     result[ "hero" ]     = CLASS_NAMES[ hero ];
                          ^
In file included from /usr/include/qt5/QtCore/qjsonobject.h:45:0,
                 from /usr/include/qt5/QtCore/QJsonObject:1,
                 from src/Result.h:5,
                 from src/ResultTracker.h:3,
                 from src/Trackobot.h:6,
                 from src/Main.cpp:1:
/usr/include/qt5/QtCore/qjsonvalue.h:119:12: error: 'QJsonValue::QJsonValue(const void*)' is private
     inline QJsonValue(const void *) {}
            ^
In file included from src/ResultTracker.h:3:0,
                 from src/Trackobot.h:6,
                 from src/Main.cpp:1:
src/Result.h:151:26: error: within this context
     result[ "opponent" ] = CLASS_NAMES[ opponent ];
                          ^
In file included from /usr/include/qt5/QtCore/qjsonobject.h:45:0,
                 from /usr/include/qt5/QtCore/QJsonObject:1,
                 from src/Result.h:5,
                 from src/ResultTracker.h:3,
                 from src/Trackobot.h:6,
                 from src/Main.cpp:1:
/usr/include/qt5/QtCore/qjsonvalue.h:119:12: error: 'QJsonValue::QJsonValue(const void*)' is private
     inline QJsonValue(const void *) {}
            ^
In file included from src/ResultTracker.h:3:0,
                 from src/Trackobot.h:6,
                 from src/Main.cpp:1:
src/Result.h:153:26: error: within this context
     result[ "mode" ]     = MODE_NAMES[ mode ];
                          ^
In file included from /usr/include/qt5/QtCore/qjsonobject.h:45:0,
                 from /usr/include/qt5/QtCore/QJsonObject:1,
                 from src/Result.h:5,
                 from src/ResultTracker.h:3,
                 from src/Trackobot.h:6,
                 from src/Main.cpp:1:
/usr/include/qt5/QtCore/qjsonvalue.h:119:12: error: 'QJsonValue::QJsonValue(const void*)' is private
     inline QJsonValue(const void *) {}
            ^
In file included from src/ResultTracker.h:3:0,
                 from src/Trackobot.h:6,
                 from src/Main.cpp:1:
src/Result.h:172:24: error: within this context
       item[ "player" ] = chi.player == PLAYER_SELF ? "me" : "opponent";
                        ^
make[1]: *** [tmp/Main.o] Error 1
make[1]: Leaving directory `/home/ajukraine/Tools/track-o-bot'
make: *** [debug] Error 2
21:23:46: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project track-o-bot (kit: Qt 5.2.1)
When executing step "Make"
ajukraine commented 8 years ago

This is what I get, when compiling with manually downloaded Qt 5.6:

tmp/Main.o:(.qtversion[qt_version_tag]+0x0): undefined reference to `qt_version_tag'
make[1]: Leaving directory `/home/ajukraine/Tools/track-o-bot'
tmp/Hearthstone.o: In function `QString::toUtf8() const &':
/home/ajukraine/Tools/track-o-bot/../../Qt/5.6/gcc_64/include/QtCore/qstring.h:513: undefined reference to `QString::toUtf8_helper(QString const&)'
tmp/WebProfile.o: In function `QString::toLatin1() const &':
/home/ajukraine/Tools/track-o-bot/../../Qt/5.6/gcc_64/include/QtCore/qstring.h:509: undefined reference to `QString::toLatin1_helper(QString const&)'
tmp/WebProfile.o: In function `int qRegisterNormalizedMetaType<QList<QSslError> >(QByteArray const&, QList<QSslError>*, QtPrivate::MetaTypeDefinedHelper<QList<QSslError>, QMetaTypeId2<QList<QSslError> >::Defined&&(!QMetaTypeId2<QList<QSslError> >::IsBuiltIn)>::DefinedType)':
/home/ajukraine/Tools/track-o-bot/../../Qt/5.6/gcc_64/include/QtCore/qmetatype.h:1692: undefined reference to `QMetaType::registerNormalizedType(QByteArray const&, void (*)(void*), void* (*)(void*, void const*), int, QFlags<QMetaType::TypeFlag>, QMetaObject const*)'
tmp/WebProfile.o: In function `int qRegisterNormalizedMetaType<QNetworkReply*>(QByteArray const&, QNetworkReply**, QtPrivate::MetaTypeDefinedHelper<QNetworkReply*, QMetaTypeId2<QNetworkReply*>::Defined&&(!QMetaTypeId2<QNetworkReply*>::IsBuiltIn)>::DefinedType)':
/home/ajukraine/Tools/track-o-bot/../../Qt/5.6/gcc_64/include/QtCore/qmetatype.h:1692: undefined reference to `QMetaType::registerNormalizedType(QByteArray const&, void (*)(void*), void* (*)(void*, void const*), int, QFlags<QMetaType::TypeFlag>, QMetaObject const*)'
tmp/Window.o: In function `void QTimer::singleShot<void (Window::*)()>(int, Qt::TimerType, QtPrivate::FunctionPointer<void (Window::*)()>::Object const*, void (Window::*)())':
/home/ajukraine/Tools/track-o-bot/../../Qt/5.6/gcc_64/include/QtCore/qtimer.h:100: undefined reference to `QTimer::singleShotImpl(int, Qt::TimerType, QObject const*, QtPrivate::QSlotObjectBase*)'
tmp/Window.o: In function `int qRegisterNormalizedMetaType<QAction*>(QByteArray const&, QAction**, QtPrivate::MetaTypeDefinedHelper<QAction*, QMetaTypeId2<QAction*>::Defined&&(!QMetaTypeId2<QAction*>::IsBuiltIn)>::DefinedType)':
/home/ajukraine/Tools/track-o-bot/../../Qt/5.6/gcc_64/include/QtCore/qmetatype.h:1692: undefined reference to `QMetaType::registerNormalizedType(QByteArray const&, void (*)(void*), void* (*)(void*, void const*), int, QFlags<QMetaType::TypeFlag>, QMetaObject const*)'
tmp/LogTab.o: In function `QString::trimmed() const &':
/home/ajukraine/Tools/track-o-bot/../../Qt/5.6/gcc_64/include/QtCore/qstring.h:403: undefined reference to `QString::trimmed_helper(QString const&)'
tmp/HearthstoneLogWatcher.o: In function `QByteArray::trimmed() const &':
/home/ajukraine/Tools/track-o-bot/../../Qt/5.6/gcc_64/include/QtCore/qbytearray.h:267: undefined reference to `QByteArray::trimmed_helper(QByteArray const&)'
tmp/HearthstoneLogTracker.o: In function `singleShot<HearthstoneLogTracker::OnSceneLoaded(const QVariantMap&)::__lambda0>':
/home/ajukraine/Tools/track-o-bot/../../Qt/5.6/gcc_64/include/QtCore/qtimer.h:135: undefined reference to `QTimer::singleShotImpl(int, Qt::TimerType, QObject const*, QtPrivate::QSlotObjectBase*)'
tmp/HearthstoneLogTracker.o: In function `int qRegisterNormalizedMetaType<QList<CardHistoryItem> >(QByteArray const&, QList<CardHistoryItem>*, QtPrivate::MetaTypeDefinedHelper<QList<CardHistoryItem>, QMetaTypeId2<QList<CardHistoryItem> >::Defined&&(!QMetaTypeId2<QList<CardHistoryItem> >::IsBuiltIn)>::DefinedType)':
/home/ajukraine/Tools/track-o-bot/../../Qt/5.6/gcc_64/include/QtCore/qmetatype.h:1692: undefined reference to `QMetaType::registerNormalizedType(QByteArray const&, void (*)(void*), void* (*)(void*, void const*), int, QFlags<QMetaType::TypeFlag>, QMetaObject const*)'
tmp/ResultQueue.o: In function `QJsonValue::QJsonValue(char const*)':
/home/ajukraine/Tools/track-o-bot/../../Qt/5.6/gcc_64/include/QtCore/qjsonvalue.h:79: undefined reference to `QJsonValue::stringDataFromQStringHelper(QString const&)'
tmp/Trackobot.o: In function `QString::toLatin1() &&':
/home/ajukraine/Tools/track-o-bot/../../Qt/5.6/gcc_64/include/QtCore/qstring.h:511: undefined reference to `QString::toLatin1_helper_inplace(QString&)'
collect2: error: ld returned 1 exit status
make[1]: *** [build/Track-o-Bot] Error 1
make: *** [debug] Error 2
21:26:27: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project track-o-bot (kit: Desktop Qt 5.6.0 GCC 64bit)
When executing step "Make"
angrylinuxuser commented 8 years ago

you need qt5.5+ and you have 5.2 Go to http://www.qt.io/download/ and get it from there since i doubt that 14.04 will have 5.5 in repos. ok nvm this commnet.

ajukraine commented 8 years ago

I guess, I fixed that temporarily. The Qt project file contains default path to the library folder:

LIBS +=  -lGL -lGLU -lXext -lX11 -lXfixes -L/usr/lib/x86_64-linux-gnu/

But in my case (manual Qt distribution) I should have change that to:

LIBS +=  -lGL -lGLU -lXext -lX11 -lXfixes -L/home/ajukraine/Qt/5.6/gcc_64/lib
ajukraine commented 8 years ago

Sorry for disturbing :) I haven't touched C++ for 10 years

BOSSoNe0013 commented 8 years ago

You're welcome ;)

Le jeu. 24 mars 2016 à 20:39, Bohdan Makohin notifications@github.com a écrit :

Sorry for disturbing :) I haven't touched C++ for 10 years

— You are receiving this because you commented.

Reply to this email directly or view it on GitHub https://github.com/BOSSoNe0013/track-o-bot/issues/46#issuecomment-200986428

angrylinuxuser commented 8 years ago

well you can just export LD_LIBRARY_PATH=/path/to/qt5.6 then run make. should work. or is it export LIBRARY_PATH? one of those