Build error

Issue #77 resolved
Corentin Breton created an issue

Hello,

I have discover your sofware after I got lost in the Internet and I love it. It's very powerful and useful! Thank you for sharing his source code! :)

But I have a little problem... I can't compil it on my Archlinux machine. I have qt4 installed in /usr/include but it doesn't want to compile...

I have the following error (I have translated the messages to english, sorry if the traduction is not enough good :/). Can you help me please ? :)

➜  zxtune git:(master) make system.zlib=1 -C apps/zxtune-qt platform=linux        
make : we enter in the directory « /home/neodarz/apps/zxtune/apps/zxtune-qt »
g++ -g -O2 -DNDEBUG -funroll-loops -finline-functions -fdata-sections -ffunction-sections    -DQT_NO_DEBUG -DHAVE_BOOST -DGUI_THEME=restorer -funsigned-char -fno-strict-aliasing -W -Wall -Wextra -pipe -I. -I../.. -I../../include -I../../obj/linux/release/zxtune-qt/.qt -I../../src -std=c++11 -fvisibility=hidden -fvisibility-inlines-hidden -c /home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/playback_supp.moc.cpp -o ../../obj/linux/release/zxtune-qt/playback_supp.moc.cpp.o -MMD
/home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/playback_supp.moc.cpp:15:2: error : #error "This file was generated using the moc from 5.8.0. It"
 #error "This file was generated using the moc from 5.8.0. It"
  ^~~~~
/home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/playback_supp.moc.cpp:16:2: error : #error "cannot be used with the include files from this version of Qt."
 #error "cannot be used with the include files from this version of Qt."
  ^~~~~
/home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/playback_supp.moc.cpp:17:2: error : #error "(The moc has changed too much.)"
 #error "(The moc has changed too much.)"
  ^~~~~
/home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/playback_supp.moc.cpp:21:1: error : « QT_WARNING_PUSH » does not name a type
 QT_WARNING_PUSH
 ^~~~~~~~~~~~~~~
/home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/playback_supp.moc.cpp:32:14: error : « qt_meta_stringdata_PlaybackSupport_t » does not name a type
 static const qt_meta_stringdata_PlaybackSupport_t qt_meta_stringdata_PlaybackSupport = {
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/playback_supp.moc.cpp: In the static member function « static void PlaybackSupport::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) »:
/home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/playback_supp.moc.cpp:140:22: error : « IndexOfMethod » is not a member of « QMetaObject »
     } else if (_c == QMetaObject::IndexOfMethod) {
                      ^~~~~~~~~~~
/home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/playback_supp.moc.cpp: In global level:
/home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/playback_supp.moc.cpp:196:35: error : « qt_meta_stringdata_PlaybackSupport » was not declared in this scope
     { &QObject::staticMetaObject, qt_meta_stringdata_PlaybackSupport.data,
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/playback_supp.moc.cpp:197:58: error : « Q_NULLPTR » was not declared in this scope
       qt_meta_data_PlaybackSupport,  qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
                                                          ^~~~~~~~~
/home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/playback_supp.moc.cpp:197:69: error : « Q_NULLPTR » was not declared in this scope
       qt_meta_data_PlaybackSupport,  qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
                                                                     ^~~~~~~~~
/home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/playback_supp.moc.cpp: In the static member function « virtual const QMetaObject* PlaybackSupport::metaObject() const »:
/home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/playback_supp.moc.cpp:203:57: error : « class QObjectData » has no member named « dynamicMetaObject »; did you mean « metaObject »?
     return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
                                                         ^~~~~~~~~~~~~~~~~
/home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/playback_supp.moc.cpp: In the static member function « virtual void* PlaybackSupport::qt_metacast(const char*) »:
/home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/playback_supp.moc.cpp:208:26: error : « Q_NULLPTR » was not declared in this scope
     if (!_clname) return Q_NULLPTR;
                          ^~~~~~~~~
/home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/playback_supp.moc.cpp:209:26: error : « qt_meta_stringdata_PlaybackSupport » was not declared in this scope
     if (!strcmp(_clname, qt_meta_stringdata_PlaybackSupport.stringdata0))
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/playback_supp.moc.cpp: In the static member function « virtual int PlaybackSupport::qt_metacall(QMetaObject::Call, int, void**) »:
/home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/playback_supp.moc.cpp:223:22: error : « RegisterMethodArgumentMetaType » is not a member of « QMetaObject »
     } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
                      ^~~~~~~~~~~
/home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/playback_supp.moc.cpp: In the static member function « void PlaybackSupport::OnStartModule(Sound::Backend::Ptr, Playlist::Item::Data::Ptr) »:
/home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/playback_supp.moc.cpp:234:20: error : « Q_NULLPTR » was not declared in this scope
     void *_a[] = { Q_NULLPTR, const_cast<void*>(reinterpret_cast<const void*>(&_t1)), const_cast<void*>(reinterpret_cast<const void*>(&_t2)) };
                    ^~~~~~~~~
/home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/playback_supp.moc.cpp: In the static member function « void PlaybackSupport::OnUpdateState() »:
/home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/playback_supp.moc.cpp:241:55: error : « Q_NULLPTR » was not declared in this scope
     QMetaObject::activate(this, &staticMetaObject, 1, Q_NULLPTR);
                                                       ^~~~~~~~~
/home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/playback_supp.moc.cpp: In the static member function « void PlaybackSupport::OnPauseModule() »:
/home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/playback_supp.moc.cpp:247:55: error : « Q_NULLPTR » was not declared in this scope
     QMetaObject::activate(this, &staticMetaObject, 2, Q_NULLPTR);
                                                       ^~~~~~~~~
/home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/playback_supp.moc.cpp: In the static member function « void PlaybackSupport::OnResumeModule() »:
/home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/playback_supp.moc.cpp:253:55: error : « Q_NULLPTR » was not declared in this scope
     QMetaObject::activate(this, &staticMetaObject, 3, Q_NULLPTR);
                                                       ^~~~~~~~~
/home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/playback_supp.moc.cpp: In the static member function « void PlaybackSupport::OnStopModule() »:
/home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/playback_supp.moc.cpp:259:55: error : « Q_NULLPTR » was not declared in this scope
     QMetaObject::activate(this, &staticMetaObject, 4, Q_NULLPTR);
                                                       ^~~~~~~~~
/home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/playback_supp.moc.cpp: In the static member function « void PlaybackSupport::OnFinishModule() »:
/home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/playback_supp.moc.cpp:265:55: error : « Q_NULLPTR » was not declared in this scope
     QMetaObject::activate(this, &staticMetaObject, 5, Q_NULLPTR);
                                                       ^~~~~~~~~
/home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/playback_supp.moc.cpp: In the static member function « void PlaybackSupport::ErrorOccurred(const Error&) »:
/home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/playback_supp.moc.cpp:271:20: error : « Q_NULLPTR » was not declared in this scope
     void *_a[] = { Q_NULLPTR, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
                    ^~~~~~~~~
/home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/playback_supp.moc.cpp: In global level:
/home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/playback_supp.moc.cpp:274:1: error : « QT_WARNING_POP » does not name a type
 QT_WARNING_POP
 ^~~~~~~~~~~~~~
make: *** [../../makefile.mak:161: ../../obj/linux/release/zxtune-qt/playback_supp.moc.cpp.o] Error 1
make : we leave the repertory « /home/neodarz/apps/zxtune/apps/zxtune-qt »

Comments (7)

  1. Vitamin Vitamin

    Hello! You have to use QT 4.x for ZXTune building.

    Create variables.mak at the root of your ZXTune sources tree with the next content:

    platform ?= linux
    qt.includes=/usr/include/qt4
    tools.uic=uic-qt4
    tools.moc=moc-qt4
    tools.rcc=rcc-qt4
    

    and install qt4 package for archlinux. After that just try to build:

    make -C apps/zxtune-qt -j X
    

    where X - is number of CPU cores you have (or decreased number to reserve some CPU for system).

  2. Corentin Breton reporter

    Thank you, but it's seems that it's dind't work... :/

    I have already installed the package and he's in the good place, the code search the qt4 library in /usr/include so I have made a dirty copy of the content of /usr/include/qt4 in /usr/include.

    A message say the file /home/neodarz/apps/zxtune/apps/zxtune-qt/../../obj/linux/release/zxtune-qt/.qt/singlemode.moc.cpp was generated using the moc from 5.8.0, this file is compiled by my or it's already compiled when I made the clone from the server ?

    I have pasted the error here (If you see some french text, sorry I didn't translate) :

    https://privatebin.net/?625fa91a8d88ade4#LNGUfRJzCISFqtmnDng/t9Qrh2WV+I7qM60K0QLVE4A=

  3. Vitamin Vitamin

    You should also remove obj and lib directores in source tree root before rebuild - you have invalid artifacts from previous build.

    You don't have to copy /usr/include/qt4 to /usr/include! The special option qt.includes points to the location where compiler can find proper headers!

  4. Corentin Breton reporter

    Oh ! Thanks, the obj and lib folders was the problem.

    I don't know the spetial option qt.includes.

    Now It's work ! \o/

    Thank you for your help ! :)

  5. Vitamin Vitamin

    Look at the contents of the proposet variables.mak file - it contains mentioned qt.includes option. Also you can use that file to keep all the options you are usually specifying via cmdline.

  6. Log in to comment