Khronos icon indicating copy to clipboard operation
Khronos copied to clipboard

Errors with cakin build

Open Vishnu-AP opened this issue 11 months ago • 3 comments

Hi there!

After follwing the setup instructions, I face this issue when I run catkin build:


Errors << kimera_vio_ros:make /catkin_ws/logs/kimera_vio_ros/build.make.000.log
/usr/bin/ld: cannot find -lpango_core /usr/bin/ld: cannot find -lpango_display /usr/bin/ld: cannot find -lpango_geometry /usr/bin/ld: cannot find -lpango_glgeometry /usr/bin/ld: cannot find -lpango_image /usr/bin/ld: cannot find -lpango_opengl /usr/bin/ld: cannot find -lpango_packetstream /usr/bin/ld: cannot find -lpango_plot /usr/bin/ld: cannot find -lpango_python /usr/bin/ld: cannot find -lpango_scene /usr/bin/ld: cannot find -lpango_tools /usr/bin/ld: cannot find -lpango_vars /usr/bin/ld: cannot find -lpango_video /usr/bin/ld: cannot find -lpango_windowing /usr/bin/ld: cannot find -ltinyobj collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/kimera_vio_ros.dir/build.make:450: /catkin_ws/devel/lib/libkimera_vio_ros.so] Error 1 make[1]: *** [CMakeFiles/Makefile2:413: CMakeFiles/kimera_vio_ros.dir/all] Error 2 make: *** [Makefile:141: all] Error 2 cd /catkin_ws/build/kimera_vio_ros; catkin build --get-env kimera_vio_ros | catkin env -si /usr/bin/make --jobserver-auth=3,4; cd -


I have built and used Kimera-VIO-ROS with Kimera-Semantics and I did not face this issue. Additional info: I had to install libepoxy-dev and I had to change the pangolin branch to v0.9.2 tag since I was getting this error:


Errors << pangolin:make /catkin_ws/logs/pangolin/build.make.000.log
In file included from /usr/include/OpenEXR/ImfXdr.h:108, from /usr/include/OpenEXR/ImfGenericOutputFile.h:40, from /usr/include/OpenEXR/ImfTiledOutputFile.h:50, from /usr/include/OpenEXR/ImfInputFile.h:48, from /catkin_ws/src/pangolin/components/pango_image/src/image_io_exr.cpp:8: /usr/include/OpenEXR/half.h: In member function ‘half half::round(unsigned int) const’: /usr/include/OpenEXR/half.h:515:10: error: implicitly-declared ‘constexpr half::half(const half&)’ is deprecated [-Werror=deprecated-copy] 515 | return *this; | ^~~~ /usr/include/OpenEXR/half.h:121:13: note: because ‘half’ has user-provided ‘half& half::operator=(half)’ 121 | half & operator = (half h); | ^~~~~~~~ /usr/include/OpenEXR/half.h:558:12: error: implicitly-declared ‘constexpr half::half(const half&)’ is deprecated [-Werror=deprecated-copy] 558 | return h; | ^ /usr/include/OpenEXR/half.h:121:13: note: because ‘half’ has user-provided ‘half& half::operator=(half)’ 121 | half & operator = (half h); | ^~~~~~~~ /usr/include/OpenEXR/half.h: In member function ‘half half::operator-() const’: /usr/include/OpenEXR/half.h:571:12: error: implicitly-declared ‘constexpr half::half(const half&)’ is deprecated [-Werror=deprecated-copy] 571 | return h; | ^ /usr/include/OpenEXR/half.h:121:13: note: because ‘half’ has user-provided ‘half& half::operator=(half)’ 121 | half & operator = (half h); | ^~~~~~~~ /usr/include/OpenEXR/half.h: In static member function ‘static half half::posInf()’: /usr/include/OpenEXR/half.h:717:12: error: implicitly-declared ‘constexpr half::half(const half&)’ is deprecated [-Werror=deprecated-copy] 717 | return h; | ^ /usr/include/OpenEXR/half.h:576:1: note: because ‘half’ has user-provided ‘half& half::operator=(half)’ 576 | half::operator = (half h) | ^~~~ /usr/include/OpenEXR/half.h: In static member function ‘static half half::negInf()’: /usr/include/OpenEXR/half.h:726:12: error: implicitly-declared ‘constexpr half::half(const half&)’ is deprecated [-Werror=deprecated-copy] 726 | return h; | ^ /usr/include/OpenEXR/half.h:576:1: note: because ‘half’ has user-provided ‘half& half::operator=(half)’ 576 | half::operator = (half h) | ^~~~ /usr/include/OpenEXR/half.h: In static member function ‘static half half::qNan()’: /usr/include/OpenEXR/half.h:735:12: error: implicitly-declared ‘constexpr half::half(const half&)’ is deprecated [-Werror=deprecated-copy] 735 | return h; | ^ /usr/include/OpenEXR/half.h:576:1: note: because ‘half’ has user-provided ‘half& half::operator=(half)’ 576 | half::operator = (half h) | ^~~~ /usr/include/OpenEXR/half.h: In static member function ‘static half half::sNan()’: /usr/include/OpenEXR/half.h:744:12: error: implicitly-declared ‘constexpr half::half(const half&)’ is deprecated [-Werror=deprecated-copy] 744 | return h; | ^ /usr/include/OpenEXR/half.h:576:1: note: because ‘half’ has user-provided ‘half& half::operator=(half)’ 576 | half::operator = (half h) | ^~~~ At global scope: cc1plus: error: unrecognized command line option ‘-Wno-deprecated-register’ [-Werror] cc1plus: error: unrecognized command line option ‘-Wno-null-pointer-subtraction’ [-Werror] cc1plus: error: unrecognized command line option ‘-Wno-null-pointer-arithmetic’ [-Werror] cc1plus: all warnings being treated as errors make[2]: *** [CMakeFiles/pango_image.dir/build.make:89: CMakeFiles/pango_image.dir/components/pango_image/src/image_io_exr.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [CMakeFiles/Makefile2:779: CMakeFiles/pango_image.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:130: all] Error 2 cd /catkin_ws/build/pangolin; catkin build --get-env pangolin | catkin env -si /usr/bin/make --jobserver-auth=3,4; cd -


Would be of great if you can help me fix this. Thanks!

Vishnu-AP avatar Feb 27 '25 07:02 Vishnu-AP

This looks like a Kimera problem, @marcusabate do you have any ideas?

Schmluk avatar Feb 27 '25 08:02 Schmluk

Hi @Vishnu-AP @Schmluk

I encountered a similar error when trying to build with catkin build. It seems there was an issue with building the Pangolin package, so I cloned and built the package independently. Here are the steps I followed:

  1. git clone --recursive https://github.com/stevenlovegrove/Pangolin.git
  2. cd /Pangolin
  3. bash /Pangolin/scripts/install_prerequisites.sh required
  4. sudo apt-get update
  5. sudo apt-get install python3-pip
  6. mkdir build
  7. cd build
  8. cmake ..
  9. make
  10. make install

After that, I returned to the workspace directory and ran: catkin build

May not be the best solution but this worked for me. Let me know if it works for you too! 😄

Anniebhalla16 avatar Mar 24 '25 13:03 Anniebhalla16

The Pangolin compile errors are described in this issue which provides a fix:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index ee499995..dd2498c5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -91,8 +91,7 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
     # add_compile_options(-Wpedantic)
     # ignore "parentheses" warning for custom "picojson" fork
     add_compile_options(-Wno-parentheses)
-    add_compile_options(-Wno-null-pointer-arithmetic)
-    add_compile_options(-Wno-null-pointer-subtraction)
+    add_compile_options(-Wno-error=deprecated-copy)
     if(CMAKE_COMPILER_IS_GNUCC)
         add_compile_options(-Werror=maybe-uninitialized)
     endif()
diff --git a/components/pango_image/CMakeLists.txt b/components/pango_image/CMakeLists.txt
index b82e7c3f..be12c11a 100644
--- a/components/pango_image/CMakeLists.txt
+++ b/components/pango_image/CMakeLists.txt
@@ -45,7 +45,7 @@ if(BUILD_PANGOLIN_LIBOPENEXR)
         target_link_libraries(${COMPONENT} PRIVATE ${OpenEXR_LIBRARY})
         target_compile_options(${COMPONENT} PRIVATE
             $<$<OR:$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:GNU>>:
-            -Wno-deprecated-register -Wno-deprecated>
+            -Wno-deprecated>
         )
         # https://github.com/stevenlovegrove/Pangolin/issues/677
         set_target_properties(${COMPONENT} PROPERTIES CXX_STANDARD 11)

You can save this into a file in the pangolin package and then run git apply <filename> to apply the fixes automatically.

For the linker errors I was able to solve it with basically the same procedure as what @Anniebhalla16 except I didn't have to re-clone the repository separately. Just run those commands in the pangolin package that's already in src of the catkin workspace and it should install and the rest of the build should work.

tylertian123 avatar Sep 15 '25 21:09 tylertian123