LUHbots / luh_youbot_os

The youbot driver, controller and tools from the LUHBots Team!
http://luhbots.de
11 stars 11 forks source link

Build Error during catkin_make #3

Closed jasjisdo closed 6 years ago

jasjisdo commented 6 years ago

Hi Jan (@JanCCarstensen), Hi Simon (@siaden), Hi Alexander (@wentz89),

i got the following errors during catkin_make

In file included from /home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/luh_youbot_gui_automoc.cpp:6:0:
/home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_main_window.cpp:65:27: error: ‘ros::message_traits::luh_youbot_gui’ has not been declared
 void ros::message_traits::luh_youbot_gui::MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
                           ^
/home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_main_window.cpp: In function ‘void qt_static_metacall(QObject*, QMetaObject::Call, int, void**)’:
/home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_main_window.cpp:68:9: error: ‘MainWindow’ was not declared in this scope
         MainWindow *_t = static_cast<MainWindow *>(_o);
         ^
/home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_main_window.cpp:68:9: note: suggested alternative:
In file included from /home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_main_window.cpp:9:0,
                 from /home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/luh_youbot_gui_automoc.cpp:6:
/home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/../../../src/luh_youbot_os/luh_youbot_gui/include/luh_youbot_gui/main_window.hpp:33:7: note:   ‘luh_youbot_gui::MainWindow’
 class MainWindow : public QMainWindow
       ^
In file included from /home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/luh_youbot_gui_automoc.cpp:6:0:
/home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_main_window.cpp:68:21: error: ‘_t’ was not declared in this scope
         MainWindow *_t = static_cast<MainWindow *>(_o);
                     ^
/home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_main_window.cpp:68:38: error: ‘MainWindow’ does not name a type
         MainWindow *_t = static_cast<MainWindow *>(_o);
                                      ^
/home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_main_window.cpp:68:49: error: expected ‘>’ before ‘*’ token
         MainWindow *_t = static_cast<MainWindow *>(_o);
                                                 ^
/home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_main_window.cpp:68:49: error: expected ‘(’ before ‘*’ token
/home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_main_window.cpp:68:50: error: expected primary-expression before ‘>’ token
         MainWindow *_t = static_cast<MainWindow *>(_o);
                                                  ^
/home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_main_window.cpp:68:55: error: expected ‘)’ before ‘;’ token
         MainWindow *_t = static_cast<MainWindow *>(_o);
                                                       ^
/home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_main_window.cpp: At global scope:
/home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_main_window.cpp:77:40: error: ‘ros::message_traits::luh_youbot_gui’ has not been declared
 const QMetaObject ros::message_traits::luh_youbot_gui::MainWindow::staticMetaObject = {
                                        ^
/home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_main_window.cpp:83:41: error: ‘ros::message_traits::luh_youbot_gui’ has not been declared
 const QMetaObject *ros::message_traits::luh_youbot_gui::MainWindow::metaObject() const
                                         ^
/home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_main_window.cpp:83:82: error: non-member function ‘const QMetaObject* metaObject()’ cannot have cv-qualifier
 const QMetaObject *ros::message_traits::luh_youbot_gui::MainWindow::metaObject() const
                                                                                  ^
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/QObject:1:0,
                 from /home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/../../../src/luh_youbot_os/luh_youbot_gui/include/luh_youbot_gui/angle_tool.hpp:25,
                 from /home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_angle_tool.cpp:9,
                 from /home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/luh_youbot_gui_automoc.cpp:2:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobject.h: In function ‘const QMetaObject* metaObject()’:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobject.h:444:33: error: ‘QScopedPointer<QObjectData> QObject::d_ptr’ is protected
     QScopedPointer<QObjectData> d_ptr;
                                 ^
In file included from /home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/luh_youbot_gui_automoc.cpp:6:0:
/home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_main_window.cpp:85:21: error: within this context
     return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
                     ^
/home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_main_window.cpp:85:21: error: invalid use of non-static data member ‘QObject::d_ptr’
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/QObject:1:0,
                 from /home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/../../../src/luh_youbot_os/luh_youbot_gui/include/luh_youbot_gui/angle_tool.hpp:25,
                 from /home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_angle_tool.cpp:9,
                 from /home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/luh_youbot_gui_automoc.cpp:2:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobject.h:444:33: note: declared here
     QScopedPointer<QObjectData> d_ptr;
                                 ^
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobject.h:444:33: error: ‘QScopedPointer<QObjectData> QObject::d_ptr’ is protected
In file included from /home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/luh_youbot_gui_automoc.cpp:6:0:
/home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_main_window.cpp:85:50: error: within this context
     return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
                                                  ^
/home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_main_window.cpp:85:50: error: invalid use of non-static data member ‘QObject::d_ptr’
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/QObject:1:0,
                 from /home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/../../../src/luh_youbot_os/luh_youbot_gui/include/luh_youbot_gui/angle_tool.hpp:25,
                 from /home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_angle_tool.cpp:9,
                 from /home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/luh_youbot_gui_automoc.cpp:2:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobject.h:444:33: note: declared here
     QScopedPointer<QObjectData> d_ptr;
                                 ^
In file included from /home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/luh_youbot_gui_automoc.cpp:6:0:
/home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_main_window.cpp: At global scope:
/home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_main_window.cpp:88:28: error: ‘ros::message_traits::luh_youbot_gui’ has not been declared
 void *ros::message_traits::luh_youbot_gui::MainWindow::qt_metacast(const char *_clname)
                            ^
/home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_main_window.cpp: In function ‘void* qt_metacast(const char*)’:
/home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_main_window.cpp:92:47: error: ‘MainWindow’ does not name a type
         return static_cast<void*>(const_cast< MainWindow*>(this));
                                               ^
/home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_main_window.cpp:92:57: error: expected ‘>’ before ‘*’ token
         return static_cast<void*>(const_cast< MainWindow*>(this));
                                                         ^
/home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_main_window.cpp:92:57: error: expected ‘(’ before ‘*’ token
/home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_main_window.cpp:92:58: error: expected primary-expression before ‘>’ token
         return static_cast<void*>(const_cast< MainWindow*>(this));
                                                          ^
/home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_main_window.cpp:92:60: error: invalid use of ‘this’ in non-member function
         return static_cast<void*>(const_cast< MainWindow*>(this));
                                                            ^
/home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_main_window.cpp:92:66: error: expected ‘)’ before ‘;’ token
         return static_cast<void*>(const_cast< MainWindow*>(this));
                                                                  ^
/home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_main_window.cpp:93:44: error: cannot call member function ‘virtual void* QMainWindow::qt_metacast(const char*)’ without object
     return QMainWindow::qt_metacast(_clname);
                                            ^
/home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_main_window.cpp: At global scope:
/home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_main_window.cpp:96:26: error: ‘ros::message_traits::luh_youbot_gui’ has not been declared
 int ros::message_traits::luh_youbot_gui::MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
                          ^
/home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_main_window.cpp: In function ‘int qt_metacall(QMetaObject::Call, int, void**)’:
/home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_main_window.cpp:98:47: error: cannot call member function ‘virtual int QMainWindow::qt_metacall(QMetaObject::Call, int, void**)’ without object
     _id = QMainWindow::qt_metacall(_c, _id, _a);
                                               ^
/home/domann/thesis/ros-kuka/workspace/build/luh_youbot_os/luh_youbot_gui/moc_main_window.cpp:103:32: error: invalid use of ‘this’ in non-member function
             qt_static_metacall(this, _c, _id, _a);

I think its related to Qt but the code is generated by catkin. Do you have any idea to solve this issue?

Thank you in advance and greetings from Berlin.

Jaschar (@jasjisdo)

mark-toma commented 6 years ago

Have you installed all the build dependencies listed in package.xml for the gui package? https://github.com/LUHbots/luh_youbot_os/blob/master/luh_youbot_gui/package.xml

I would specifically check for libqt4-dev and the ROS package qt_build.

jasjisdo commented 6 years ago

Yes I resolve all needed dependencies. But I changed my git branch with an outdated build folder in my ros workspace.

So deleting the workspace's build folder and run catkin_make again solve this issue.

rm -Rf ~/catkin_ws/build/* && catkin_make

Thanks Mark (@mark-toma)