eProsima/ShapesDemo

Building on Linux fails with Qt related errors [13742]

gavanderhoorn opened this issue · 2 comments

While trying to build current HEAD on Linux (amd64, Ubuntu Xenial (16.04)) the following errors come up:

[ 88%] Building CXX object CMakeFiles/ShapesDemo.dir/forms/ui/moc_optionsdialog.cpp.o
/home/user/ShapesDemo/forms/ui/moc_optionsdialog.cpp:22:1: error: ‘QT_WARNING_DISABLE_DEPRECATED’ does not name a type
 QT_WARNING_DISABLE_DEPRECATED
 ^
/home/user/ShapesDemo/forms/ui/moc_optionsdialog.cpp:26:2: warning: extra ‘;’ [-Wpedantic]
 };
  ^
/home/user/ShapesDemo/forms/ui/moc_optionsdialog.cpp:32:14: error: ‘qt_meta_stringdata_OptionsDialog_t’ does not name a type
 static const qt_meta_stringdata_OptionsDialog_t qt_meta_stringdata_OptionsDialog = {
              ^
/home/user/ShapesDemo/forms/ui/moc_optionsdialog.cpp:65:2: warning: extra ‘;’ [-Wpedantic]
 };
  ^
/home/user/ShapesDemo/forms/ui/moc_optionsdialog.cpp:138:1: error: ‘QT_INIT_METAOBJECT’ does not name a type
 QT_INIT_METAOBJECT const QMetaObject OptionsDialog::staticMetaObject = { {
 ^
/home/user/ShapesDemo/forms/ui/moc_optionsdialog.cpp:145:4: warning: extra ‘;’ [-Wpedantic]
 } };
    ^
/home/user/ShapesDemo/forms/ui/moc_optionsdialog.cpp: In member function ‘virtual void* OptionsDialog::qt_metacast(const char*)’:
/home/user/ShapesDemo/forms/ui/moc_optionsdialog.cpp:156:26: error: ‘qt_meta_stringdata_OptionsDialog’ was not declared in this scope
     if (!strcmp(_clname, qt_meta_stringdata_OptionsDialog.stringdata0))
                          ^
CMakeFiles/ShapesDemo.dir/build.make:446: recipe for target 'CMakeFiles/ShapesDemo.dir/forms/ui/moc_optionsdialog.cpp.o' failed
make[2]: *** [CMakeFiles/ShapesDemo.dir/forms/ui/moc_optionsdialog.cpp.o] Error 1
CMakeFiles/Makefile2:69: recipe for target 'CMakeFiles/ShapesDemo.dir/all' failed
make[1]: *** [CMakeFiles/ShapesDemo.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

Hi @gavanderhoorn
Currently, ShapesDemo needs Qt 5.12 to compile. I created a PR that informs the user of this requirement when using CMake or QMake.
We plan to support older versions too, but we haven't scheduled that task yet.

I am going to proceed and close this issue because it was already clarified the supported Qt versions. Also, Ubuntu 16.04 is no longer an officially supported platform in Fast DDS.