rosmed / slicer_ros2_module

Slicer module that can interface directly with ROS 2 using ROS parameters, topics, tf...
MIT License
27 stars 4 forks source link

Getting error while colcon build #68

Closed akanksha-jarwal closed 1 day ago

akanksha-jarwal commented 9 months ago

I am trying to install slicerros2 in my linux machine. I already build Slicer and Installed ROS2. But when I am trying to colcon build the Slicerros2, i am getting this error

akanksha@inhmctehpws1580-HP-Z4-G4-Workstation:~/ros2_ws$ colcon build --cmake-args -DSlicer_DIR:PATH=/home/akanksha/Slicer-SuperBuild-Debug/Slicer-build WARNING: Package name "ROS2" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes. Starting >>> ROS2
--- stderr: ROS2
WARNING: Package name "ROS2" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes. CMake Warning at /home/akanksha/Slicer/CMake/SlicerMacroBuildLoadableModule.cmake:191 (add_library): Cannot generate a safe runtime search path for target qSlicerROS2Module because files in some directories may conflict with libraries in implicit directories:

runtime library [libQt5Widgets.so.5] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /opt/qt/5.15.2/gcc_64/lib
runtime library [libQt5Gui.so.5] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /opt/qt/5.15.2/gcc_64/lib
runtime library [libQt5Core.so.5] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /opt/qt/5.15.2/gcc_64/lib

Some of these libraries may not be found correctly. Call Stack (most recent call first): CMakeLists.txt:111 (slicerMacroBuildLoadableModule)

CMake Warning at /home/akanksha/Slicer-SuperBuild-Debug/CTK/CMake/ctkFunctionAddExecutableUtf8.cmake:18 (add_executable): Cannot generate a safe runtime search path for target qSlicerROS2ModuleGenericCxxTests because files in some directories may conflict with libraries in implicit directories:

runtime library [libQt5Widgets.so.5] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /opt/qt/5.15.2/gcc_64/lib
runtime library [libQt5Gui.so.5] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /opt/qt/5.15.2/gcc_64/lib
runtime library [libQt5Core.so.5] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /opt/qt/5.15.2/gcc_64/lib

Some of these libraries may not be found correctly. Call Stack (most recent call first): /home/akanksha/Slicer/CMake/SlicerMacroBuildLoadableModule.cmake:284 (ctk_add_executable_utf8) CMakeLists.txt:111 (slicerMacroBuildLoadableModule)

CMake Warning at /home/akanksha/Slicer-SuperBuild-Debug/vtkAddon/CMake/vtkMacroKitPythonWrap.cmake:331 (add_library): Cannot generate a safe runtime search path for target vtkSlicerROS2ModuleMRMLPython because files in some directories may conflict with libraries in implicit directories:

runtime library [libQt5Widgets.so.5] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /opt/qt/5.15.2/gcc_64/lib
runtime library [libQt5Gui.so.5] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /opt/qt/5.15.2/gcc_64/lib
runtime library [libQt5Core.so.5] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /opt/qt/5.15.2/gcc_64/lib

Some of these libraries may not be found correctly. Call Stack (most recent call first): /home/akanksha/Slicer/CMake/SlicerMacroPythonWrapModuleVTKLibrary.cmake:73 (vtkMacroKitPythonWrap) /home/akanksha/Slicer/CMake/SlicerMacroBuildModuleMRML.cmake:94 (SlicerMacroPythonWrapModuleVTKLibrary) MRML/CMakeLists.txt:66 (SlicerMacroBuildModuleMRML)

CMake Warning at /home/akanksha/Slicer/CMake/SlicerMacroBuildModuleVTKLibrary.cmake:120 (add_library): Cannot generate a safe runtime search path for target vtkSlicerROS2ModuleMRML because files in some directories may conflict with libraries in implicit directories:

runtime library [libQt5Widgets.so.5] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /opt/qt/5.15.2/gcc_64/lib
runtime library [libQt5Gui.so.5] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /opt/qt/5.15.2/gcc_64/lib
runtime library [libQt5Core.so.5] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /opt/qt/5.15.2/gcc_64/lib

Some of these libraries may not be found correctly. Call Stack (most recent call first): /home/akanksha/Slicer/CMake/SlicerMacroBuildModuleMRML.cmake:65 (SlicerMacroBuildModuleVTKLibrary) MRML/CMakeLists.txt:66 (SlicerMacroBuildModuleMRML)

CMake Warning at /home/akanksha/Slicer-SuperBuild-Debug/vtkAddon/CMake/vtkMacroKitPythonWrap.cmake:331 (add_library): Cannot generate a safe runtime search path for target vtkSlicerROS2ModuleLogicPython because files in some directories may conflict with libraries in implicit directories:

runtime library [libQt5Widgets.so.5] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /opt/qt/5.15.2/gcc_64/lib
runtime library [libQt5Gui.so.5] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /opt/qt/5.15.2/gcc_64/lib
runtime library [libQt5Core.so.5] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /opt/qt/5.15.2/gcc_64/lib

Some of these libraries may not be found correctly. Call Stack (most recent call first): /home/akanksha/Slicer/CMake/SlicerMacroPythonWrapModuleVTKLibrary.cmake:73 (vtkMacroKitPythonWrap) /home/akanksha/Slicer/CMake/SlicerMacroBuildModuleLogic.cmake:127 (SlicerMacroPythonWrapModuleVTKLibrary) Logic/CMakeLists.txt:20 (SlicerMacroBuildModuleLogic)

CMake Warning at /home/akanksha/Slicer/CMake/SlicerMacroBuildModuleVTKLibrary.cmake:120 (add_library): Cannot generate a safe runtime search path for target vtkSlicerROS2ModuleLogic because files in some directories may conflict with libraries in implicit directories:

runtime library [libQt5Widgets.so.5] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /opt/qt/5.15.2/gcc_64/lib
runtime library [libQt5Gui.so.5] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /opt/qt/5.15.2/gcc_64/lib
runtime library [libQt5Core.so.5] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /opt/qt/5.15.2/gcc_64/lib

Some of these libraries may not be found correctly. Call Stack (most recent call first): /home/akanksha/Slicer/CMake/SlicerMacroBuildModuleLogic.cmake:98 (SlicerMacroBuildModuleVTKLibrary) Logic/CMakeLists.txt:20 (SlicerMacroBuildModuleLogic)

In file included from /opt/qt/5.15.2/gcc_64/include/QtCore/qatomic.h:46, from /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:1210, from /usr/include/x86_64-linux-gnu/qt5/QtCore/QtGlobal:1, from /home/akanksha/Slicer-SuperBuild-Debug/CTK/Libs/Core/ctkPimpl.h:134, from /home/akanksha/Slicer/Base/QTGUI/qSlicerLoadableModule.h:25, from /home/akanksha/ros2_ws/build/ROS2/../../src/slicer_ros2_module/qSlicerROS2Module.h:22, from /home/akanksha/ros2_ws/build/ROS2/moc_qSlicerROS2Module.cpp:9: /opt/qt/5.15.2/gcc_64/include/QtCore/qbasicatomic.h:103:34: error: expected identifier before string constant 103 | QT_DEPRECATED_VERSION_X_5_14("Use loadRelaxed") T load() const noexcept { return loadRelaxed(); } | ^~~~~ /opt/qt/5.15.2/gcc_64/include/QtCore/qbasicatomic.h:103:34: error: expected ‘,’ or ‘...’ before string constant /opt/qt/5.15.2/gcc_64/include/QtCore/qbasicatomic.h:103:51: error: expected ‘;’ at end of member declaration 103 | QT_DEPRECATED_VERSION_X_5_14("Use loadRelaxed") T load() const noexcept { return loadRelaxed(); } | ^ | ; /opt/qt/5.15.2/gcc_64/include/QtCore/qbasicatomic.h:104:34: error: expected identifier before string constant 104 | QT_DEPRECATED_VERSION_X_5_14("Use storeRelaxed") void store(T newValue) noexcept { storeRelaxed(newValue); } | ^~~~~~ /opt/qt/5.15.2/gcc_64/include/QtCore/qbasicatomic.h:104:34: error: expected ‘,’ or ‘...’ before string constant /opt/qt/5.15.2/gcc_64/include/QtCore/qbasicatomic.h:104:52: error: expected ‘;’ at end of member declaration 104 | QT_DEPRECATED_VERSION_X_5_14("Use storeRelaxed") void store(T newValue) noexcept { storeRelaxed(newValue); } | ^ | ; /opt/qt/5.15.2/gcc_64/include/QtCore/qbasicatomic.h:104:5: error: ‘int QBasicAtomicInteger::QT_DEPRECATED_VERSION_X_5_14(int)’ cannot be overloaded with ‘int QBasicAtomicInteger::QT_DEPRECATED_VERSION_X_5_14(int)’ 104 | QT_DEPRECATED_VERSION_X_5_14("Use storeRelaxed") void store(T newValue) noexcept { storeRelaxed(newValue); } | ^~~~~~~~ /opt/qt/5.15.2/gcc_64/include/QtCore/qbasicatomic.h:103:5: note: previous declaration ‘int QBasicAtomicInteger::QT_DEPRECATED_VERSION_X_5_14(int)’ 103 | QT_DEPRECATED_VERSION_X_5_14("Use loadRelaxed") T load() const noexcept { return loadRelaxed(); } | ^~~~~~~~ /opt/qt/5.15.2/gcc_64/include/QtCore/qbasicatomic.h:244:34: error: expected identifier before string constant 244 | QT_DEPRECATED_VERSION_X_5_14("Use loadRelaxed") Type load() const noexcept { return loadRelaxed(); } | ^~~~~ /opt/qt/5.15.2/gcc_64/include/QtCore/qbasicatomic.h:244:34: error: expected ‘,’ or ‘...’ before string constant /opt/qt/5.15.2/gcc_64/include/QtCore/qbasicatomic.h:244:51: error: expected ‘;’ at end of member declaration 244 | QT_DEPRECATED_VERSION_X_5_14("Use loadRelaxed") Type load() const noexcept { return loadRelaxed(); } | ^ | ; /opt/qt/5.15.2/gcc_64/include/QtCore/qbasicatomic.h:245:34: error: expected identifier before string constant 245 | QT_DEPRECATED_VERSION_X_5_14("Use storeRelaxed") void store(Type newValue) noexcept { storeRelaxed(newValue); } | ^~~~~~ /opt/qt/5.15.2/gcc_64/include/QtCore/qbasicatomic.h:245:34: error: expected ‘,’ or ‘...’ before string constant /opt/qt/5.15.2/gcc_64/include/QtCore/qbasicatomic.h:245:52: error: expected ‘;’ at end of member declaration 245 | QT_DEPRECATED_VERSION_X_5_14("Use storeRelaxed") void store(Type newValue) noexcept { storeRelaxed(newValue); } | ^ | ; /opt/qt/5.15.2/gcc_64/include/QtCore/qbasicatomic.h:245:5: error: ‘int QBasicAtomicPointer::QT_DEPRECATED_VERSION_X_5_14(int)’ cannot be overloaded with ‘int QBasicAtomicPointer::QT_DEPRECATED_VERSION_X_5_14(int)’ 245 | QT_DEPRECATED_VERSION_X_5_14("Use storeRelaxed") void store(Type newValue) noexcept { storeRelaxed(newValue); } | ^~~~~~~~ /opt/qt/5.15.2/gcc_64/include/QtCore/qbasicatomic.h:244:5: note: previous declaration ‘int QBasicAtomicPointer::QT_DEPRECATED_VERSION_X_5_14(int)’ 244 | QT_DEPRECATED_VERSION_X_5_14("Use loadRelaxed") Type load() const noexcept { return loadRelaxed(); } | ^~~~~~~~ In file included from /opt/qt/5.15.2/gcc_64/include/QtCore/qstring.h:50, from /opt/qt/5.15.2/gcc_64/include/QtCore/qhashfunctions.h:44, from /opt/qt/5.15.2/gcc_64/include/QtCore/qlist.h:47, from /usr/include/x86_64-linux-gnu/qt5/QtGui/qicon.h:45, from /usr/include/x86_64-linux-gnu/qt5/QtGui/QIcon:1, from /home/akanksha/Slicer/Base/QTGUI/qSlicerAbstractModule.h:25, from /home/akanksha/Slicer/Base/QTGUI/qSlicerLoadableModule.h:28, from /home/akanksha/ros2_ws/build/ROS2/../../src/slicer_ros2_module/qSlicerROS2Module.h:22, from /home/akanksha/ros2_ws/build/ROS2/moc_qSlicerROS2Module.cpp:9: . . . . . .. .

  |                                                     ^
  |                                                      ;

/opt/qt/5.15.2/gcc_64/include/QtCore/qobject.h:416:34: error: expected identifier before string constant 416 | QT_DEPRECATED_VERSION_X_5_14("Use property()") | ^~~~ /opt/qt/5.15.2/gcc_64/include/QtCore/qobject.h:416:34: error: expected ‘,’ or ‘...’ before string constant /opt/qt/5.15.2/gcc_64/include/QtCore/qobject.h:416:50: error: expected ‘;’ at end of member declaration 416 | QT_DEPRECATED_VERSION_X_5_14("Use property()") | ^ | ; /opt/qt/5.15.2/gcc_64/include/QtCore/qobject.h:416:5: error: ‘int QObject::QT_DEPRECATED_VERSION_X_5_14(int)’ cannot be overloaded with ‘int QObject::QT_DEPRECATED_VERSION_X_5_14(int)’ 416 | QT_DEPRECATED_VERSION_X_5_14("Use property()") | ^~~~~~~~ /opt/qt/5.15.2/gcc_64/include/QtCore/qobject.h:414:5: note: previous declaration ‘int QObject::QT_DEPRECATED_VERSION_X_5_14(int)’ 414 | QT_DEPRECATED_VERSION_X_5_14("Use setProperty()") | ^~~~~~~~ In file included from /opt/qt/5.15.2/gcc_64/include/QtGui/qmatrix.h:47, from /opt/qt/5.15.2/gcc_64/include/QtGui/qtransform.h:43, from /opt/qt/5.15.2/gcc_64/include/QtGui/qimage.h:48, from /opt/qt/5.15.2/gcc_64/include/QtGui/qpixmap.h:49, from /usr/include/x86_64-linux-gnu/qt5/QtGui/qicon.h:46, from /usr/include/x86_64-linux-gnu/qt5/QtGui/QIcon:1, from /home/akanksha/Slicer/Base/QTGUI/qSlicerAbstractModule.h:25, from /home/akanksha/Slicer/Base/QTGUI/qSlicerLoadableModule.h:28, from /home/akanksha/ros2_ws/src/slicer_ros2_module/qSlicerROS2Module.h:22, from /home/akanksha/ros2_ws/src/slicer_ros2_module/qSlicerROS2Module.cxx:22: /opt/qt/5.15.2/gcc_64/include/QtCore/qline.h:255:29: error: expected identifier before numeric constant 255 | QT_DEPRECATED_VERSION_X(5, 14, "Use intersects() instead") | ^ /opt/qt/5.15.2/gcc_64/include/QtCore/qline.h:255:29: error: expected ‘,’ or ‘...’ before numeric constant /opt/qt/5.15.2/gcc_64/include/QtCore/qline.h:255:62: error: expected ‘;’ at end of member declaration 255 | QT_DEPRECATED_VERSION_X(5, 14, "Use intersects() instead") | ^ | ; In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:55, from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QWidget:1, from /home/akanksha/Slicer/Base/QTGUI/qSlicerWidget.h:25, from /home/akanksha/Slicer/Base/QTGUI/qSlicerAbstractModuleWidget.h:33, from /home/akanksha/ros2_ws/src/slicer_ros2_module/qSlicerROS2ModuleWidget.h:22, from /home/akanksha/ros2_ws/src/slicer_ros2_module/qSlicerROS2Module.cxx:23: /opt/qt/5.15.2/gcc_64/include/QtGui/qcursor.h:101:29: error: expected identifier before numeric constant 101 | QT_DEPRECATED_VERSION_X(5, 15, "Use the other overload which returns QBitmap by-value") | ^ /opt/qt/5.15.2/gcc_64/include/QtGui/qcursor.h:101:29: error: expected ‘,’ or ‘...’ before numeric constant /opt/qt/5.15.2/gcc_64/include/QtGui/qcursor.h:102:5: error: expected ‘;’ at end of member declaration 102 | const QBitmap bitmap() const; // ### Qt 7: Remove function | ^~~~~ | ; /opt/qt/5.15.2/gcc_64/include/QtGui/qcursor.h:104:29: error: expected identifier before numeric constant 104 | QT_DEPRECATED_VERSION_X(5, 15, "Use the other overload which returns QBitmap by-value") | ^ /opt/qt/5.15.2/gcc_64/include/QtGui/qcursor.h:104:29: error: expected ‘,’ or ‘...’ before numeric constant /opt/qt/5.15.2/gcc_64/include/QtGui/qcursor.h:105:5: error: expected ‘;’ at end of member declaration 105 | const QBitmap mask() const; // ### Qt 7: Remove function | ^~~~~ | ; /opt/qt/5.15.2/gcc_64/include/QtGui/qcursor.h:104:5: error: ‘int QCursor::QT_DEPRECATED_VERSION_X(int) const’ cannot be overloaded with ‘int QCursor::QT_DEPRECATED_VERSION_X(int) const’ 104 | QT_DEPRECATED_VERSION_X(5, 15, "Use the other overload which returns QBitmap by-value") | ^~~~~~~ /opt/qt/5.15.2/gcc_64/include/QtGui/qcursor.h:101:5: note: previous declaration ‘int QCursor::QT_DEPRECATED_VERSION_X(int) const’ 101 | QT_DEPRECATED_VERSION_X(5, 15, "Use the other overload which returns QBitmap by-value") | ^~~~~~~ In file included from /opt/qt/5.15.2/gcc_64/include/QtCore/qvariant.h:47, from /usr/include/x86_64-linux-gnu/qt5/QtGui/qevent.h:50, from /usr/include/x86_64-linux-gnu/qt5/QtGui/QList:1, from /home/akanksha/Slicer-SuperBuild-Debug/CTK/Libs/Visualization/VTK/Core/ctkVTKObjectEventsObserver.h:26, from /home/akanksha/Slicer-SuperBuild-Debug/CTK/Libs/Visualization/VTK/Core/ctkVTKObject.h:25, from /home/akanksha/Slicer/Base/QTGUI/qSlicerWidget.h:29, from /home/akanksha/Slicer/Base/QTGUI/qSlicerAbstractModuleWidget.h:33, from /home/akanksha/ros2_ws/src/slicer_ros2_module/qSlicerROS2ModuleWidget.h:22, from /home/akanksha/ros2_ws/src/slicer_ros2_module/qSlicerROS2Module.cxx:23: /opt/qt/5.15.2/gcc_64/include/QtCore/qmap.h:387:34: error: expected identifier before string constant 387 | QT_DEPRECATED_VERSION_X_5_15("Use QMultiMap for maps storing multiple values with the same key.") QList uniqueKeys() const; | ^~~~~~~~~~~~~~~ /opt/qt/5.15.2/gcc_64/include/QtCore/qmap.h:387:34: error: expected ‘,’ or ‘...’ before string constant /opt/qt/5.15.2/gcc_64/include/QtCore/qmap.h:387:101: error: expected ‘;’ at end of member declaration 387 | QT_DEPRECATED_VERSION_X_5_15("Use QMultiMap for maps storing multiple values with the same key.") QList uniqueKeys() const; | ^ | ; /opt/qt/5.15.2/gcc_64/include/QtCore/qmap.h:388:34: error: expected identifier before string constant 388 | QT_DEPRECATED_VERSION_X_5_15("Use QMultiMap for maps storing multiple values with the same key.") QList values(const Key &key) const; | ^~~~~~~~~~~~~~~ /opt/qt/5.15.2/gcc_64/include/QtCore/qmap.h:388:34: error: expected ‘,’ or ‘...’ before string constant /opt/qt/5.15.2/gcc_64/include/QtCore/qmap.h:388:101: error: expected ‘;’ at end of member declaration 388 | QT_DEPRECATED_VERSION_X_5_15("Use QMultiMap for maps storing multiple values with the same key.") QList values(const Key &key) const; | ^ | ; /opt/qt/5.15.2/gcc_64/include/QtCore/qmap.h:388:5: error: ‘int QMap<K, V>::QT_DEPRECATED_VERSION_X_5_15(int)’ cannot be overloaded with ‘int QMap<K, V>::QT_DEPRECATED_VERSION_X_5_15(int)’ 388 | QT_DEPRECATED_VERSION_X_5_15("Use QMultiMap for maps storing multiple values with the same key.") QList values(const Key &key) const; | ^~~~~~~~ /opt/qt/5.15.2/gcc_64/include/QtCore/qmap.h:387:5: note: previous declaration ‘int QMap<K, V>::QT_DEPRECATED_VERSION_X_5_15(int)’ 387 | QT_DEPRECATED_VERSION_X_5_15("Use QMultiMap for maps storing multiple values with the same key.") QList uniqueKeys() const; | ^~~~~~~~ /opt/qt/5.15.2/gcc_64/include/QtCore/qmap.h:588:34: error: expected identifier before string constant 588 | QT_DEPRECATED_VERSION_X_5_15("Use QMultiMap for maps storing multiple values with the same key.") iterator insertMulti(const Key &key, const T &value); | ^~~~~~~~~~~~~~~ /opt/qt/5.15.2/gcc_64/include/QtCore/qmap.h:588:34: error: expected ‘,’ or ‘...’ before string constant /opt/qt/5.15.2/gcc_64/include/QtCore/qmap.h:588:101: error: expected ‘;’ at end of member declaration 588 | QT_DEPRECATED_VERSION_X_5_15("Use QMultiMap for maps storing multiple values with the same key.") iterator insertMulti(const Key &key, const T &value); | ^ | ; /opt/qt/5.15.2/gcc_64/include/QtCore/qmap.h:588:5: error: ‘int QMap<K, V>::QT_DEPRECATED_VERSION_X_5_15(int)’ cannot be overloaded with ‘int QMap<K, V>::QT_DEPRECATED_VERSION_X_5_15(int)’ 588 | QT_DEPRECATED_VERSION_X_5_15("Use QMultiMap for maps storing multiple values with the same key.") iterator insertMulti(const Key &key, const T &value); | ^~~~~~~~ /opt/qt/5.15.2/gcc_64/include/QtCore/qmap.h:387:5: note: previous declaration ‘int QMap<K, V>::QT_DEPRECATED_VERSION_X_5_15(int)’ 387 | QT_DEPRECATED_VERSION_X_5_15("Use QMultiMap for maps storing multiple values with the same key.") QList uniqueKeys() const; | ^~~~~~~~ /opt/qt/5.15.2/gcc_64/include/QtCore/qmap.h:589:34: error: expected identifier before string constant 589 | QT_DEPRECATED_VERSION_X_5_15("Use QMultiMap for maps storing multiple values with the same key.") iterator insertMulti(const_iterator pos, const Key &akey, const T &avalue); | ^~~~~~~~~~~~~~~ /opt/qt/5.15.2/gcc_64/include/QtCore/qmap.h:589:34: error: expected ‘,’ or ‘...’ before string constant /opt/qt/5.15.2/gcc_64/include/QtCore/qmap.h:589:101: error: expected ‘;’ at end of member declaration 589 | QT_DEPRECATED_VERSION_X_5_15("Use QMultiMap for maps storing multiple values with the same key.") iterator insertMulti(const_iterator pos, const Key &akey, const T &avalue); | ^ | ; /opt/qt/5.15.2/gcc_64/include/QtCore/qmap.h:589:5: error: ‘int QMap<K, V>::QT_DEPRECATED_VERSION_X_5_15(int)’ cannot be overloaded with ‘int QMap<K, V>::QT_DEPRECATED_VERSION_X_5_15(int)’ 589 | QT_DEPRECATED_VERSION_X_5_15("Use QMultiMap for maps storing multiple values with the same key.") iterator insertMulti(const_iterator pos, const Key &akey, const T &avalue); | ^~~~~~~~ /opt/qt/5.15.2/gcc_64/include/QtCore/qmap.h:387:5: note: previous declaration ‘int QMap<K, V>::QT_DEPRECATED_VERSION_X_5_15(int)’ 387 | QT_DEPRECATED_VERSION_X_5_15("Use QMultiMap for maps storing multiple values with the same key.") QList uniqueKeys() const; | ^~~~~~~~ /opt/qt/5.15.2/gcc_64/include/QtCore/qmap.h:590:34: error: expected identifier before string constant 590 | QT_DEPRECATED_VERSION_X_5_15("Use QMultiMap for maps storing multiple values with the same key.") QMap<Key, T> &unite(const QMap<Key, T> &other); | ^~~~~~~~~~~~~~~ /opt/qt/5.15.2/gcc_64/include/QtCore/qmap.h:590:34: error: expected ‘,’ or ‘...’ before string constant /opt/qt/5.15.2/gcc_64/include/QtCore/qmap.h:590:101: error: expected ‘;’ at end of member declaration 590 | QT_DEPRECATED_VERSION_X_5_15("Use QMultiMap for maps storing multiple values with the same key.") QMap<Key, T> &unite(const QMap<Key, T> &other); | ^ | ; /opt/qt/5.15.2/gcc_64/include/QtCore/qmap.h:590:5: error: ‘int QMap<K, V>::QT_DEPRECATED_VERSION_X_5_15(int)’ cannot be overloaded with ‘int QMap<K, V>::QT_DEPRECATED_VERSION_X_5_15(int)’ 590 | QT_DEPRECATED_VERSION_X_5_15("Use QMultiMap for maps storing multiple values with the same key.") QMap<Key, T> &unite(const QMap<Key, T> &other); | ^~~~~~~~ /opt/qt/5.15.2/gcc_64/include/QtCore/qmap.h:387:5: note: previous declaration ‘int QMap<K, V>::QT_DEPRECATED_VERSION_X_5_15(int)’ 387 | QT_DEPRECATED_VERSION_X_5_15("Use QMultiMap for maps storing multiple values with the same key.") QList uniqueKeys() const; | ^~~~~~~~ In file included from /usr/include/x86_64-linux-gnu/qt5/QtGui/qevent.h:53, from /usr/include/x86_64-linux-gnu/qt5/QtGui/QList:1, from /home/akanksha/Slicer-SuperBuild-Debug/CTK/Libs/Visualization/VTK/Core/ctkVTKObjectEventsObserver.h:26, from /home/akanksha/Slicer-SuperBuild-Debug/CTK/Libs/Visualization/VTK/Core/ctkVTKObject.h:25, from /home/akanksha/Slicer/Base/QTGUI/qSlicerWidget.h:29, from /home/akanksha/Slicer/Base/QTGUI/qSlicerAbstractModuleWidget.h:33, from /home/akanksha/ros2_ws/src/slicer_ros2_module/qSlicerROS2ModuleWidget.h:22, from /home/akanksha/ros2_ws/src/slicer_ros2_module/qSlicerROS2Module.cxx:23: /opt/qt/5.15.2/gcc_64/include/QtCore/qset.h:136:16: error: ‘QT_DEPRECATED_VERSION_5_15’ does not name a type; did you mean ‘QT_DEPRECATED_VARIABLE’? 136 | inline QT_DEPRECATED_VERSION_5_15 iterator &operator--() { --i; return this; } | ^~~~~~ | QT_DEPRECATED_VARIABLE /opt/qt/5.15.2/gcc_64/include/QtCore/qset.h:137:16: error: ‘QT_DEPRECATED_VERSION_5_15’ does not name a type; did you mean ‘QT_DEPRECATED_VARIABLE’? 137 | inline QT_DEPRECATED_VERSION_5_15 iterator operator--(int) { iterator r = this; --i; return r; } | ^~~~~~ | QT_DEPRECATED_VARIABLE /opt/qt/5.15.2/gcc_64/include/QtCore/qset.h:138:16: error: ‘QT_DEPRECATED_VERSION_5_15’ does not name a type; did you mean ‘QT_DEPRECATED_VARIABLE’? 138 | inline QT_DEPRECATED_VERSION_5_15 iterator operator+(int j) const { return i + j; } | ^~~~~~ | QT_DEPRECATED_VARIABLE /opt/qt/5.15.2/gcc_64/include/QtCore/qset.h:139:16: error: ‘QT_DEPRECATED_VERSION_5_15’ does not name a type; did you mean ‘QT_DEPRECATED_VARIABLE’? 139 | inline QT_DEPRECATED_VERSION_5_15 iterator operator-(int j) const { return i - j; } | ^~~~~~ | QT_DEPRECATED_VARIABLE /opt/qt/5.15.2/gcc_64/include/QtCore/qset.h:140:23: error: ‘QT_DEPRECATED_VERSION_5_15’ does not name a type; did you mean ‘QT_DEPRECATED_VARIABLE’? 140 | friend inline QT_DEPRECATED_VERSION_5_15 iterator operator+(int j, iterator k) { return k + j; } | ^~~~~~ | QT_DEPRECATED_VARIABLE /opt/qt/5.15.2/gcc_64/include/QtCore/qset.h:141:16: error: ‘QT_DEPRECATED_VERSION_5_15’ does not name a type; did you mean ‘QT_DEPRECATED_VARIABLE’? 141 | inline QT_DEPRECATED_VERSION_5_15 iterator &operator+=(int j) { i += j; return this; } | ^~~~~~ | QT_DEPRECATED_VARIABLE /opt/qt/5.15.2/gcc_64/include/QtCore/qset.h:142:16: error: ‘QT_DEPRECATED_VERSION_5_15’ does not name a type; did you mean ‘QT_DEPRECATED_VARIABLE’? 142 | inline QT_DEPRECATED_VERSION_5_15 iterator &operator-=(int j) { i -= j; return this; } | ^~~~~~ | QT_DEPRECATED_VARIABLE /opt/qt/5.15.2/gcc_64/include/QtCore/qset.h:177:16: error: ‘QT_DEPRECATED_VERSION_5_15’ does not name a type; did you mean ‘QT_DEPRECATED_VARIABLE’? 177 | inline QT_DEPRECATED_VERSION_5_15 const_iterator &operator--() { --i; return this; } | ^~~~~~ | QT_DEPRECATED_VARIABLE /opt/qt/5.15.2/gcc_64/include/QtCore/qset.h:178:16: error: ‘QT_DEPRECATED_VERSION_5_15’ does not name a type; did you mean ‘QT_DEPRECATED_VARIABLE’? 178 | inline QT_DEPRECATED_VERSION_5_15 const_iterator operator--(int) { const_iterator r = this; --i; return r; } | ^~~~~~ | QT_DEPRECATED_VARIABLE /opt/qt/5.15.2/gcc_64/include/QtCore/qset.h:179:16: error: ‘QT_DEPRECATED_VERSION_5_15’ does not name a type; did you mean ‘QT_DEPRECATED_VARIABLE’? 179 | inline QT_DEPRECATED_VERSION_5_15 const_iterator operator+(int j) const { return i + j; } | ^~~~~~ | QT_DEPRECATED_VARIABLE /opt/qt/5.15.2/gcc_64/include/QtCore/qset.h:180:16: error: ‘QT_DEPRECATED_VERSION_5_15’ does not name a type; did you mean ‘QT_DEPRECATED_VARIABLE’? 180 | inline QT_DEPRECATED_VERSION_5_15 const_iterator operator-(int j) const { return i - j; } | ^~~~~~ | QT_DEPRECATED_VARIABLE /opt/qt/5.15.2/gcc_64/include/QtCore/qset.h:181:23: error: ‘QT_DEPRECATED_VERSION_5_15’ does not name a type; did you mean ‘QT_DEPRECATED_VARIABLE’? 181 | friend inline QT_DEPRECATED_VERSION_5_15 const_iterator operator+(int j, const_iterator k) { return k + j; } | ^~~~~~ | QT_DEPRECATED_VARIABLE /opt/qt/5.15.2/gcc_64/include/QtCore/qset.h:182:16: error: ‘QT_DEPRECATED_VERSION_5_15’ does not name a type; did you mean ‘QT_DEPRECATED_VARIABLE’? 182 | inline QT_DEPRECATED_VERSION_5_15 const_iterator &operator+=(int j) { i += j; return this; } | ^~~~~~ | QT_DEPRECATED_VARIABLE /opt/qt/5.15.2/gcc_64/include/QtCore/qset.h:183:16: error: ‘QT_DEPRECATED_VERSION_5_15’ does not name a type; did you mean ‘QT_DEPRECATED_VARIABLE’? 183 | inline QT_DEPRECATED_VERSION_5_15 const_iterator &operator-=(int j) { i -= j; return this; } | ^~~~~~ | QT_DEPRECATED_VARIABLE /opt/qt/5.15.2/gcc_64/include/QtCore/qset.h:201:22: error: expected ‘;’ at end of member declaration 201 | reverse_iterator QT_DEPRECATED_VERSION_5_15 rbegin() { return reverse_iterator(end()); } | ^~~~~~ | ; /opt/qt/5.15.2/gcc_64/include/QtCore/qset.h:202:22: error: expected ‘;’ at end of member declaration 202 | reverse_iterator QT_DEPRECATED_VERSION_5_15 rend() { return reverse_iterator(begin()); } | ^~~~~~ | ; /opt/qt/5.15.2/gcc_64/include/QtCore/qset.h:202:22: error: redeclaration of ‘QSet::reverse_iterator QSet::QT_DEPRECATED_VERSION_5_15’ /opt/qt/5.15.2/gcc_64/include/QtCore/qset.h:201:22: note: previous declaration ‘QSet::reverse_iterator QSet::QT_DEPRECATED_VERSION_5_15’ 201 | reverse_iterator QT_DEPRECATED_VERSION_5_15 rbegin() { return reverse_iterator(end()); } | ^~~~~~ /opt/qt/5.15.2/gcc_64/include/QtCore/qset.h:203:28: error: expected ‘;’ at end of member declaration 203 | const_reverse_iterator QT_DEPRECATED_VERSION_5_15 rbegin() const noexcept { return const_reverse_iterator(end()); } | ^~~~~~ | ; /opt/qt/5.15.2/gcc_64/include/QtCore/qset.h:203:28: error: redeclaration of ‘QSet::const_reverse_iterator QSet::QT_DEPRECATED_VERSION_5_15’ /opt/qt/5.15.2/gcc_64/include/QtCore/qset.h:201:22: note: previous declaration ‘QSet::reverse_iterator QSet::QT_DEPRECATED_VERSION_5_15’ 201 | reverse_iterator QT_DEPRECATED_VERSION_5_15 rbegin() { return reverse_iterator(end()); } | ^~~~~~ /opt/qt/5.15.2/gcc_64/include/QtCore/qset.h:204:28: error: expected ‘;’ at end of member declaration 204 | const_reverse_iterator QT_DEPRECATED_VERSION_5_15 rend() const noexcept { return const_reverse_iterator(begin()); } | ^~~~~~ | ; /opt/qt/5.15.2/gcc_64/include/QtCore/qset.h:204:28: error: redeclaration of ‘QSet::const_reverse_iterator QSet::QT_DEPRECATED_VERSION_5_15’ /opt/qt/5.15.2/gcc_64/include/QtCore/qset.h:201:22: note: previous declaration ‘QSet::reverse_iterator QSet::QT_DEPRECATED_VERSION_5_15’ 201 | reverse_iterator QT_DEPRECATED_VERSION_5_15 rbegin() { return reverse_iterator(end()); } | ^~~~~~ /opt/qt/5.15.2/gcc_64/include/QtCore/qset.h:205:28: error: expected ‘;’ at end of member declaration 205 | const_reverse_iterator QT_DEPRECATED_VERSION_5_15 crbegin() const noexcept { return const_reverse_iterator(end()); } | ^~~~~~ | ; /opt/qt/5.15.2/gcc_64/include/QtCore/qset.h:205:28: error: redeclaration of ‘QSet::const_reverse_iterator QSet::QT_DEPRECATED_VERSION_5_15’ /opt/qt/5.15.2/gcc_64/include/QtCore/qset.h:201:22: note: previous declaration ‘QSet::reverse_iterator QSet::QT_DEPRECATED_VERSION_5_15’ 201 | reverse_iterator QT_DEPRECATED_VERSION_5_15 rbegin() { return reverse_iterator(end()); } | ^~~~~~ /opt/qt/5.15.2/gcc_64/include/QtCore/qset.h:206:28: error: expected ‘;’ at end of member declaration 206 | const_reverse_iterator QT_DEPRECATED_VERSION_5_15 crend() const noexcept { return const_reverse_iterator(begin()); } | ^~~~~~ | ; /opt/qt/5.15.2/gcc_64/include/QtCore/qset.h:206:28: error: redeclaration of ‘QSet::const_reverse_iterator QSet::QT_DEPRECATED_VERSION_5_15’ /opt/qt/5.15.2/gcc_64/include/QtCore/qset.h:201:22: note: previous declaration ‘QSet::reverse_iterator QSet::QT_DEPRECATED_VERSION_5_15’ 201 | reverse_iterator QT_DEPRECATED_VERSION_5_15 rbegin() { return reverse_iterator(end()); } | ^~~~~~ /opt/qt/5.15.2/gcc_64/include/QtCore/qset.h:459:12: error: ‘QT_DEPRECATED_VERSION_5_15’ does not name a type; did you mean ‘QT_DEPRECATED_VARIABLE’? 459 | inline QT_DEPRECATED_VERSION_5_15 bool hasPrevious() const { return c->constBegin() != i; } | ^~~~~~ | QT_DEPRECATED_VARIABLE /opt/qt/5.15.2/gcc_64/include/QtCore/qset.h:460:12: error: ‘QT_DEPRECATED_VERSION_5_15’ does not name a type; did you mean ‘QT_DEPRECATED_VARIABLE’? 460 | inline QT_DEPRECATED_VERSION_5_15 const T &previous() { n = --i; return n; } | ^~~~~~ | QT_DEPRECATED_VARIABLE /opt/qt/5.15.2/gcc_64/include/QtCore/qset.h:461:12: error: ‘QT_DEPRECATED_VERSION_5_15’ does not name a type; did you mean ‘QT_DEPRECATED_VARIABLE’? 461 | inline QT_DEPRECATED_VERSION_5_15 const T &peekPrevious() const { iterator p = i; return --p; } | ^~~~~~ | QT_DEPRECATED_VARIABLE /opt/qt/5.15.2/gcc_64/include/QtCore/qset.h:462:12: error: ‘QT_DEPRECATED_VERSION_5_15’ does not name a type; did you mean ‘QT_DEPRECATED_VARIABLE’? 462 | inline QT_DEPRECATED_VERSION_5_15 bool findPrevious(const T &t) | ^~~~~~ | QT_DEPRECATED_VARIABLE In file included from /usr/include/c++/9/bits/stl_algobase.h:66, from /usr/include/c++/9/bits/char_traits.h:39, from /usr/include/c++/9/ios:40, from /usr/include/c++/9/istream:38, from /usr/include/c++/9/fstream:38, from /home/akanksha/Slicer-SuperBuild-Debug/VTK/Common/Core/vtkIOStream.h:29, from /home/akanksha/Slicer-SuperBuild-Debug/VTK/Common/Core/vtkSystemIncludes.h:39, from /home/akanksha/Slicer-SuperBuild-Debug/VTK/Common/Core/vtkIndent.h:28, from /home/akanksha/Slicer-SuperBuild-Debug/VTK/Common/Core/vtkObjectBase.h:53, from /home/akanksha/Slicer-SuperBuild-Debug/VTK/Common/Core/vtkObject.h:45, from /home/akanksha/Slicer/Libs/MRML/Core/vtkObserverManager.h:22, from /home/akanksha/Slicer/Libs/MRML/Logic/vtkMRMLAbstractLogic.h:17, from /home/akanksha/Slicer/Libs/MRML/Logic/vtkMRMLApplicationLogic.h:25, from /home/akanksha/Slicer/Base/Logic/vtkSlicerApplicationLogic.h:25, from /home/akanksha/Slicer/Base/Logic/vtkSlicerModuleLogic.h:18, from /home/akanksha/ros2_ws/src/slicer_ros2_module/Logic/vtkSlicerROS2Logic.h:40, from /home/akanksha/ros2_ws/src/slicer_ros2_module/qSlicerROS2Module.cxx:19: /usr/include/c++/9/bits/stl_iterator_base_funcs.h: In instantiation of ‘constexpr void std::advance(_BidirectionalIterator&, _Distance, std::bidirectional_iterator_tag) [with _BidirectionalIterator = QHash<QString, QVariant>::const_iterator; _Distance = long long int]’: /usr/include/c++/9/bits/stl_iterator_base_funcs.h:206:21: required from ‘constexpr void std::advance(_InputIterator&, _Distance) [with _InputIterator = QHash<QString, QVariant>::const_iterator; _Distance = int]’ /opt/qt/5.15.2/gcc_64/include/QtCore/qmetatype.h:1322:19: required from ‘static void QtMetaTypePrivate::QAssociativeIterableImpl::advanceImpl(void*, int) [with T = QHash<QString, QVariant>]’ /opt/qt/5.15.2/gcc_64/include/QtCore/qmetatype.h:1358:68: required from ‘QtMetaTypePrivate::QAssociativeIterableImpl::QAssociativeIterableImpl(const T) [with T = QHash<QString, QVariant>]’ /opt/qt/5.15.2/gcc_64/include/QtCore/qvariant.h:795:141: required from here /usr/include/c++/9/bits/stl_iterator_base_funcs.h:169:4: error: no match for ‘operator--’ (operand type is ‘QHash<QString, QVariant>::const_iterator’) 169 | --i; | ^~~~~ make[2]: [CMakeFiles/qSlicerROS2Module.dir/build.make:96: CMakeFiles/qSlicerROS2Module.dir/qSlicerROS2Module.cxx.o] Error 1 make[1]: [CMakeFiles/Makefile2:197: CMakeFiles/qSlicerROS2Module.dir/all] Error 2 make: *** [Makefile:141: all] Error 2

Failed <<< ROS2 [10.1s, exited with code 2]

Summary: 0 packages finished [12.0s] 1 package failed: ROS2 1 package had stderr output: ROS2

As I haveinstalled qt 5.15.2 also.

adeguet1 commented 9 months ago

Can you provide a bit more information before I start debugging this?

akanksha-jarwal commented 9 months ago

Hi, qt version has been resolved, but now i am facing this

akanksha@inhmctehpws1580-HP-Z4-G4-Workstation:~/ros2_ws$ colcon build --cmake-args -DSlicer_DIR:PATH=/home/akanksha/Slicer-SuperBuild-Debug/Slicer-build -DCMAKE_BUILD_TYPE=Release
WARNING: Package name "ROS2" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
Starting >>> ROS2    
--- stderr: ROS2                               
WARNING: Package name "ROS2" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
---
Finished <<< ROS2 [7.80s]

Summary: 1 package finished [13.7s]
  1 package had stderr output: ROS2

when I am trying to launch slicer using terminal (./Slicer), it is showing me

akanksha@inhmctehpws1580-HP-Z4-G4-Workstation:~/Slicer-SuperBuild-Debug/Slicer-build$ ./Slicer
error: [/home/akanksha/Slicer-SuperBuild-Debug/Slicer-build/bin/./SlicerApp-real] exit abnormally - Report the problem.

And I am using Linux (ubuntu) 20.04, ROS Galactic and Slicer 5.7

adeguet1 commented 9 months ago

The crash you see when loading SlicerROS is likely because it loads the system Qt libraries while being compiled against the new Qt libraries. Before starting slicer, can you set the LD_LIBRARY_PATH to point to the location of the runtime libraries for the Qt libraries you installed? I wish Slicer would just work with the default Ubuntu 20.04 Qt libraries. I'm quite busy these days but will investigate sometime next week.

akanksha-jarwal commented 9 months ago

By using LD_LIBRARY_PATH stderr has been removed. Thanks But still after loading the module path in Slicer, ./Slicer is showing same error

before loading module path

akanksha@inhmctehpws1580-HP-Z4-G4-Workstation:~/Slicer-SuperBuild-Debug/Slicer-build$ ./Slicer
Switch to module:  "Welcome"
Switch to module:  ""
Switch to module:  ""

after loading module path

akanksha@inhmctehpws1580-HP-Z4-G4-Workstation:~/Slicer-SuperBuild-Debug/Slicer-build$ ./Slicer
error: [/home/akanksha/Slicer-SuperBuild-Debug/Slicer-build/bin/./SlicerApp-real] exit abnormally - Report the problem.

Screenshot from 2024-02-22 14-48-01 Screenshot from 2024-02-22 14-47-17 Screenshot from 2024-02-22 14-40-12

LauraConnolly commented 8 months ago

Did you source ROS2 and your ROS2 workspace in the terminal before running ./Slicer? This might be the issue now.

adeguet1 commented 8 months ago

I finally got some time to look into this. My recommendation is to NOT install a newer version of Qt and build Slicer against the Ubuntu provided one. Unfortunately that means that you will need to use Slicer v5.2.2. Once you've cloned the Slicer source code, use:

git checkout v5.2.2 

Any Slicer version above 5.2.2 will not compile as-is using the Qt version on Ubuntu 20.04. It might be too hard to patch more recent versions of Slicer to work with the default Ubuntu Qt version.

I hope to provide binary installers as soon as possible.

adeguet1 commented 8 months ago

@akanksha-jarwal, A binary for Slicer 5.2.2, Ubuntu 22.04 with Galactic is now available: https://github.com/rosmed/slicer_ros2_module/releases/tag/v0.9