Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not build ORB-SLAM2 #8

Closed
Masrur02 opened this issue Jun 26, 2024 · 10 comments
Closed

Can not build ORB-SLAM2 #8

Masrur02 opened this issue Jun 26, 2024 · 10 comments

Comments

@Masrur02
Copy link

When I run bash build_orb.sh I got several errors and renaming option for some packages of opencv keep coming
Screenshot from 2024-06-26 13-04-56
What is the issue here, how can I succesfully build the ORB-SLAM2

@jeezrick
Copy link

you seems to failed to build pangolin, did you change the code according to this ?https://github.com/stevenlovegrove/Pangolin/pull/318/files?diff=split&w=0

@Masrur02
Copy link
Author

CMakeModules/FindFFMPEG.cmake

Is this file inside the RTG-SLAM repo? I do not find this file.

@Masrur02
Copy link
Author

After running bash build_orb.sh , the errors keep coming. As you said I need to follow the link you provided. It seems to me that the files are under pangolin folder. So, when should I modify the code according to the fix? After the first run of bash build_orb.sh ? Because after the first run, I observe that the pangolin folder appears inside the third party folder.

So, the pipeline is

  1. I clone the RTG-SLAM repo
  2. Install the env
  3. Run the bash build_orb.sh. During running, I got some errors and pangolin folder along with few other folders appear inside the third party folder. The bash build_orb.sh is still running and suddenly my PC got hung. It is on both RTX 2060 and RTX 4090 GPU

@Masrur02
Copy link
Author

I have run the bash build_oeb.sh command after the modification again. Now it is giving me options like this
image
I need to give a response every time. Is it normal? Or still there are some issues?

@MisEty
Copy link
Owner

MisEty commented Jun 27, 2024

Is it not normal. This seems to be a version issue with some third-party libraries but we are not certain about the exact cause. We cloned the code from ORB_SLAM2-PythonBindings, encountered problems during the compilation process, and made some modifications to resolve environmental compatibility issues. We do not test it on a variety of environments but some other users are able to install this version normally (#2, #7)

We only made a few changes to the source code and did not rely on any additional libraries, so I think you can try compiling the original version of ORB_SLAM2-PythonBindings and communicate with the original author about possible environment issues. Once those are resolved, you can try to compile our version.

@MisEty MisEty closed this as completed Jun 27, 2024
@smileyenot983
Copy link

I have encountered same error. Was someone able to fix this?

@ShreyaIAB
Copy link

can u clone the rep once again and try again? Thats how i fixed it

@azuryl
Copy link

azuryl commented Jul 24, 2024

I have run the bash build_oeb.sh command after the modification again. Now it is giving me options like this image I need to give a response every time. Is it normal? Or still there are some issues?

you can select A(all), you will not select every time

@ttsesm
Copy link

ttsesm commented Jul 29, 2024

I also have a similar issue with compiling Pangolin, does it need to be the 0.5 version?
If I use the 0.5 version that is getting downloaded in build_orb.sh I am getting errors related to ffmpeg, like those:

/run/media/ttsesm/pose_est_rp/hotel/hotel_/3rd_party_installation_files/Pangolin/src/video/drivers/ffmpeg.cpp: In function ‘std::string pangolin::FfmpegFmtToString(AVPixelFormat)’:
/run/media/ttsesm/pose_est_rp/hotel/hotel_/3rd_party_installation_files/Pangolin/src/video/drivers/ffmpeg.cpp:49:41: error: ‘AV_PIX_FMT_XVMC_MPEG2_MC’ was not declared in this scope
   49 | #  define TEST_PIX_FMT_RETURN(fmt) case AV_PIX_FMT_##fmt: return #fmt;
      |                                         ^~~~~~~~~~~
/run/media/ttsesm/pose_est_rp/hotel/hotel_/3rd_party_installation_files/Pangolin/src/video/drivers/ffmpeg.cpp:49:41: note: in definition of macro ‘TEST_PIX_FMT_RETURN’
   49 | #  define TEST_PIX_FMT_RETURN(fmt) case AV_PIX_FMT_##fmt: return #fmt;
      |                                         ^~~~~~~~~~~
/run/media/ttsesm/pose_est_rp/hotel/hotel_/3rd_party_installation_files/Pangolin/src/video/drivers/ffmpeg.cpp:49:41: error: ‘AV_PIX_FMT_XVMC_MPEG2_IDCT’ was not declared in this scope
   49 | #  define TEST_PIX_FMT_RETURN(fmt) case AV_PIX_FMT_##fmt: return #fmt;
      |                                         ^~~~~~~~~~~
/run/media/ttsesm/pose_est_rp/hotel/hotel_/3rd_party_installation_files/Pangolin/src/video/drivers/ffmpeg.cpp:49:41: note: in definition of macro ‘TEST_PIX_FMT_RETURN’
   49 | #  define TEST_PIX_FMT_RETURN(fmt) case AV_PIX_FMT_##fmt: return #fmt;
      |                                         ^~~~~~~~~~~
/run/media/ttsesm/pose_est_rp/hotel/hotel_/3rd_party_installation_files/Pangolin/src/video/drivers/ffmpeg.cpp:49:41: error: ‘AV_PIX_FMT_VAAPI_MOCO’ was not declared in this scope; did you mean ‘AV_PIX_FMT_VAAPI’?
   49 | #  define TEST_PIX_FMT_RETURN(fmt) case AV_PIX_FMT_##fmt: return #fmt;
      |                                         ^~~~~~~~~~~
/run/media/ttsesm/pose_est_rp/hotel/hotel_/3rd_party_installation_files/Pangolin/src/video/drivers/ffmpeg.cpp:49:41: note: in definition of macro ‘TEST_PIX_FMT_RETURN’
   49 | #  define TEST_PIX_FMT_RETURN(fmt) case AV_PIX_FMT_##fmt: return #fmt;
      |                                         ^~~~~~~~~~~
/run/media/ttsesm/pose_est_rp/hotel/hotel_/3rd_party_installation_files/Pangolin/src/video/drivers/ffmpeg.cpp:49:41: error: ‘AV_PIX_FMT_VAAPI_IDCT’ was not declared in this scope; did you mean ‘AV_PIX_FMT_VAAPI’?
   49 | #  define TEST_PIX_FMT_RETURN(fmt) case AV_PIX_FMT_##fmt: return #fmt;

if I use the latest version, Pangolin compiles fine but then I am getting an error when I am trying to compile pybind. Applying the ffmpeg patch linked in the description doesn't really seem to do anything with the latest version of Pangolin ORB-SLAM2-PYBIND seems to compile fine though only pybind seems to fail for some reason 🤔

@ttsesm
Copy link

ttsesm commented Jul 29, 2024

The error that I am getting if I install the latest version of Pangolin is the following:

/home/ttsesm/Development/RTG-SLAM/thirdParty/install/include/pangolin/gl/gl.hpp:348:5: error: ‘glCopyImageSubDataNV’ was not declared in this scope
  348 |     glCopyImageSubDataNV(tex.tid, GL_TEXTURE_2D, 0, 0, 0, 0,
      |     ^~~~~~~~~~~~~~~~~~~~
/home/ttsesm/Development/RTG-SLAM/thirdParty/install/include/pangolin/gl/gl.hpp: In member function ‘void pangolin::GlRenderBuffer::Reinitialise(GLint, GLint, GLint)’:
/home/ttsesm/Development/RTG-SLAM/thirdParty/install/include/pangolin/gl/gl.hpp:522:9: error: ‘glDeleteRenderbuffersEXT’ was not declared in this scope
  522 |         glDeleteRenderbuffersEXT(1, &rbid);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~
/home/ttsesm/Development/RTG-SLAM/thirdParty/install/include/pangolin/gl/gl.hpp:527:5: error: ‘glGenRenderbuffers’ was not declared in this scope; did you mean ‘GlRenderBuffer’?
  527 |     glGenRenderbuffers(1, &rbid);
      |     ^~~~~~~~~~~~~~~~~~
      |     GlRenderBuffer
/home/ttsesm/Development/RTG-SLAM/thirdParty/install/include/pangolin/gl/gl.hpp:528:5: error: ‘glBindRenderbuffer’ was not declared in this scope; did you mean ‘GlRenderBuffer’?
  528 |     glBindRenderbuffer(GL_RENDERBUFFER_EXT, rbid);
      |     ^~~~~~~~~~~~~~~~~~
      |     GlRenderBuffer
/home/ttsesm/Development/RTG-SLAM/thirdParty/install/include/pangolin/gl/gl.hpp:529:5: error: ‘glRenderbufferStorage’ was not declared in this scope
  529 |     glRenderbufferStorage(GL_RENDERBUFFER_EXT, internal_format, width, height);
      |     ^~~~~~~~~~~~~~~~~~~~~
/home/ttsesm/Development/RTG-SLAM/thirdParty/install/include/pangolin/gl/gl.hpp: In destructor ‘pangolin::GlRenderBuffer::~GlRenderBuffer()’:
/home/ttsesm/Development/RTG-SLAM/thirdParty/install/include/pangolin/gl/gl.hpp:536:9: error: ‘glDeleteRenderbuffers’ was not declared in this scope
  536 |         glDeleteRenderbuffers(1, &rbid);
      |         ^~~~~~~~~~~~~~~~~~~~~
/home/ttsesm/Development/RTG-SLAM/thirdParty/install/include/pangolin/gl/gl.hpp: In destructor ‘pangolin::GlFramebuffer::~GlFramebuffer()’:
/home/ttsesm/Development/RTG-SLAM/thirdParty/install/include/pangolin/gl/gl.hpp:585:9: error: ‘glDeleteFramebuffers’ was not declared in this scope
  585 |         glDeleteFramebuffers(1, &fbid);
      |         ^~~~~~~~~~~~~~~~~~~~
/home/ttsesm/Development/RTG-SLAM/thirdParty/install/include/pangolin/gl/gl.hpp: In constructor ‘pangolin::GlFramebuffer::GlFramebuffer(pangolin::GlTexture&)’:
/home/ttsesm/Development/RTG-SLAM/thirdParty/install/include/pangolin/gl/gl.hpp:592:5: error: ‘glGenFramebuffers’ was not declared in this scope; did you mean ‘GlFramebuffer’?
  592 |     glGenFramebuffers(1, &fbid);
      |     ^~~~~~~~~~~~~~~~~
      |     GlFramebuffer
/home/ttsesm/Development/RTG-SLAM/thirdParty/install/include/pangolin/gl/gl.hpp: In constructor ‘pangolin::GlFramebuffer::GlFramebuffer(pangolin::GlTexture&, pangolin::GlRenderBuffer&)’:
/home/ttsesm/Development/RTG-SLAM/thirdParty/install/include/pangolin/gl/gl.hpp:600:5: error: ‘glGenFramebuffers’ was not declared in this scope; did you mean ‘GlFramebuffer’?
  600 |     glGenFramebuffers(1, &fbid);
      |     ^~~~~~~~~~~~~~~~~
      |     GlFramebuffer
/home/ttsesm/Development/RTG-SLAM/thirdParty/install/include/pangolin/gl/gl.hpp: In constructor ‘pangolin::GlFramebuffer::GlFramebuffer(pangolin::GlTexture&, pangolin::GlTexture&, pangolin::GlRenderBuffer&)’:
/home/ttsesm/Development/RTG-SLAM/thirdParty/install/include/pangolin/gl/gl.hpp:609:5: error: ‘glGenFramebuffers’ was not declared in this scope; did you mean ‘GlFramebuffer’?
  609 |     glGenFramebuffers(1, &fbid);
      |     ^~~~~~~~~~~~~~~~~
      |     GlFramebuffer
/home/ttsesm/Development/RTG-SLAM/thirdParty/install/include/pangolin/gl/gl.hpp: In constructor ‘pangolin::GlFramebuffer::GlFramebuffer(pangolin::GlTexture&, pangolin::GlTexture&, pangolin::GlTexture&, pangolin::GlRenderBuffer&)’:
/home/ttsesm/Development/RTG-SLAM/thirdParty/install/include/pangolin/gl/gl.hpp:619:5: error: ‘glGenFramebuffers’ was not declared in this scope; did you mean ‘GlFramebuffer’?
  619 |     glGenFramebuffers(1, &fbid);
      |     ^~~~~~~~~~~~~~~~~
      |     GlFramebuffer
/home/ttsesm/Development/RTG-SLAM/thirdParty/install/include/pangolin/gl/gl.hpp: In constructor ‘pangolin::GlFramebuffer::GlFramebuffer(pangolin::GlTexture&, pangolin::GlTexture&, pangolin::GlTexture&, pangolin::GlTexture&, pangolin::GlRenderBuffer&)’:
/home/ttsesm/Development/RTG-SLAM/thirdParty/install/include/pangolin/gl/gl.hpp:630:5: error: ‘glGenFramebuffers’ was not declared in this scope; did you mean ‘GlFramebuffer’?
  630 |     glGenFramebuffers(1, &fbid);
      |     ^~~~~~~~~~~~~~~~~
      |     GlFramebuffer
/home/ttsesm/Development/RTG-SLAM/thirdParty/install/include/pangolin/gl/gl.hpp: In member function ‘void pangolin::GlFramebuffer::Bind() const’:
/home/ttsesm/Development/RTG-SLAM/thirdParty/install/include/pangolin/gl/gl.hpp:641:5: error: ‘glBindFramebuffer’ was not declared in this scope; did you mean ‘GlFramebuffer’?
  641 |     glBindFramebuffer(GL_FRAMEBUFFER_EXT, fbid);
      |     ^~~~~~~~~~~~~~~~~
      |     GlFramebuffer
/home/ttsesm/Development/RTG-SLAM/thirdParty/install/include/pangolin/gl/gl.hpp:642:5: error: ‘glDrawBuffers’ was not declared in this scope; did you mean ‘glDrawBuffer’?
  642 |     glDrawBuffers( attachments, attachment_buffers );
      |     ^~~~~~~~~~~~~
      |     glDrawBuffer
/home/ttsesm/Development/RTG-SLAM/thirdParty/install/include/pangolin/gl/gl.hpp: In member function ‘void pangolin::GlFramebuffer::Reinitialise()’:
/home/ttsesm/Development/RTG-SLAM/thirdParty/install/include/pangolin/gl/gl.hpp:648:9: error: ‘glDeleteFramebuffers’ was not declared in this scope
  648 |         glDeleteFramebuffers(1, &fbid);
      |         ^~~~~~~~~~~~~~~~~~~~
/home/ttsesm/Development/RTG-SLAM/thirdParty/install/include/pangolin/gl/gl.hpp:650:5: error: ‘glGenFramebuffers’ was not declared in this scope; did you mean ‘GlFramebuffer’?
  650 |     glGenFramebuffers(1, &fbid);
      |     ^~~~~~~~~~~~~~~~~
      |     GlFramebuffer
/home/ttsesm/Development/RTG-SLAM/thirdParty/install/include/pangolin/gl/gl.hpp: In member function ‘void pangolin::GlFramebuffer::Unbind() const’:
/home/ttsesm/Development/RTG-SLAM/thirdParty/install/include/pangolin/gl/gl.hpp:655:5: error: ‘glDrawBuffers’ was not declared in this scope; did you mean ‘glDrawBuffer’?
  655 |     glDrawBuffers( 1, attachment_buffers );
      |     ^~~~~~~~~~~~~

And this comes up when I try to compile the pybind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants