bharath5673 / ORB-SLAM3

ORB-SLAM3 0n ubuntu 22
33 stars 2 forks source link

Error compiling orb-slam3 #4

Closed Vench1 closed 5 months ago

Vench1 commented 5 months ago

Thank you for your excellent work! I followed the steps in the README, but an error occurred when executing ./build.sh in the ORB-SLAM3 section. I tried many times, but still had problems. I tried to open the build.sh file and compile and install manually step by step. There were no problems until "Configuring and building ORB_SLAM3 ...", when I found that the last step, make -j4, could not be compiled and the following error occurred:

[26%]Linking CXX shared library /home/zjp/Dev/ORB_SLAM3/lib/LibORB_SLAM3.so /usr/bin/ld: cannot find -lepoxy:epoxy:No such file or directory /usr/bin/ld :cannot find -lOpenGL:EGL:No such file or directory collect2: error: ld returned 1 exit status make[2]: [CMakeFiles/ORB_SLAM3.dir/build.make:561:/home/zjp/Dev/ORB_SLAM3/Lib/liboRB_SLAM3.so] Error 1 make[1]: [CMakeFiles/Makefile2:148:CMakeFiles/ORB_SLAM3.dir/all] Error 2 make: **[Makefile:91:all]Error 2

image

This is weird. I have already installed epoxy and EGL.

image

Do you have any idea on how to solve this problem?

hermanndererdmann commented 5 months ago

same issue here

Vench1 commented 5 months ago

same issue here

Hi, @hermanndererdmann. This may help you ORB-SLAM3-STEREO-FIXED, I compiled it successfully with ubuntu 22.04 and opencv4.4.0. After this I also compiled its next step on ros2 humble, i.e. ORB_SLAM3_ROS2.

martongonczy commented 5 months ago

For the epoxy error this worked for me.

For EGL I added the following line to CMakeLists.txt to the find_package() section.

find_package(OpenGL REQUIRED COMPONENTS OpenGL EGL GLX)

Vench1 commented 5 months ago

For the epoxy error this worked for me.

For EGL I added the following line to CMakeLists.txt to the find_package() section.

find_package(OpenGL REQUIRED COMPONENTS OpenGL EGL GLX)

Thanks a lot, this worked for me.