nerves-web-kiosk / webengine_kiosk

Qt WebEngine-based kiosk
Other
74 stars 14 forks source link

Fails to build with qt 5.14.0 #25

Open tobias-- opened 4 years ago

tobias-- commented 4 years ago

When trying to build on mac os and qt 5.14.0 I get the following error:

...linux-buildroot-g++ -o moc_Kiosk.o moc_Kiosk.cpp
moc_ElixirComs.cpp:99:18: error: 'QMetaObject::SuperData' has not been declared
     QMetaObject::SuperData::link<QObject::staticMetaObject>(),
                  ^~~~~~~~~
moc_ElixirComs.cpp:99:61: error: expected primary-expression before ')' token
     QMetaObject::SuperData::link<QObject::staticMetaObject>(),
                                                             ^
make[1]: *** [moc_ElixirComs.o] Error 1
make[1]: *** Waiting for unfinished jobs....
moc_KioskView.cpp:81:18: error: 'QMetaObject::SuperData' has not been declared
     QMetaObject::SuperData::link<QWebEngineView::staticMetaObject>(),
                  ^~~~~~~~~
moc_KioskView.cpp:81:68: error: expected primary-expression before ')' token
     QMetaObject::SuperData::link<QWebEngineView::staticMetaObject>(),
                                                                    ^
moc_Kiosk.cpp:147:18: error: 'QMetaObject::SuperData' has not been declared
     QMetaObject::SuperData::link<QObject::staticMetaObject>(),
                  ^~~~~~~~~
moc_Kiosk.cpp:147:61: error: expected primary-expression before ')' token
     QMetaObject::SuperData::link<QObject::staticMetaObject>(),
                                                             ^
make[1]: *** [moc_KioskView.o] Error 1
make[1]: *** [moc_Kiosk.o] Error 1
make: *** [submake] Error 2

Is it an incompatibility with qt 5.14?

fhunleth commented 4 years ago

I've been using Qt 5.12 and 5.13. I haven't tried 5.14.

Could you try a completely clean build? Like erase the deps and _build directory first and see what happens.

I expect to be making a pass on issues like this next week when I work with Justin Schneck to go over any updates to his kiosk training class. Thanks for the heads up that Qt 5.14 might have caused a regression.

tobias-- commented 4 years ago

I tried a clean build, but unfortunately it does not change anything

mobileoverlord commented 4 years ago

I tried this on Mac OS with qt 5.14 installed from homebrew and I did not receive this error. How did you go about installing QT 5.14?

tobias-- commented 4 years ago

I installed it using brew install qt5 and brew link qt5.

$ qmake --version
QMake version 3.1
Using Qt version 5.14.0 in /usr/local/Cellar/qt/5.14.0/lib
$ make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
tobias-- commented 4 years ago

It only fails when trying to compile with MIX_TARGET=rpi3. The workaround provided by @arjan in https://github.com/LeToteTeam/kiosk_system_rpi3/issues/49 works for me as well.

arjan commented 4 years ago

Yep.. I don't have enough Qt experience to see what's going wrong exactly.. some trial and error brought me to this workaround.

fhunleth commented 4 years ago

FYI - https://github.com/nerves-project/nerves_system_br/pull/421. This should be available soon in kiosk_system_rpi3 (or so I'm told).