I’m facing issues while attempting to run a C++ executable, which is an example from the Point Cloud Library (PCL), on an Ubuntu virtual machine remotely from my Mac using SSH. When I execute the binary, I receive the following error messages:
node1@vm2:~/Desktop/sdb/CLion/test/cmake-build-debug$ ./test libGL error: No matching fbConfigs or visuals foundlibGL error: failed to load driver: swrast2024-05-21 12:29:07.364 ( 2.230s) [ E9154880]vtkXOpenGLRenderWindow.:651 ERR| vtkXOpenGLRenderWindow (0x623a0afb1020): Cannot create GLX context. Aborting.Aborted (core dumped)
I have already installed xorg-server
(XQuartz) using MacPorts on my Mac and successfully tested xclock
over SSH, which displays normally on my Mac.
I have tried installing libgl1-mesa-glx
and libgl1-mesa-dri
on the Ubuntu VM, but the problem persists.And I have not installed any NVIDIA drivers on this Ubuntu server, and there is no dedicated graphics card installed. So I think there should be no mesa/NVIDIa conflict.
Here’s the output of ldconfig -p grep for GL libraries, which shows the available OpenGL and GL libraries:
node1@vm2:~$ sudo ldconfig -p | grep -i gl.solibwayland-egl.so.1 (libc6,x86-64) => /lib/x86_64-linux-gnu/libwayland-egl.so.1libcogl.so.20 (libc6,x86-64) => /lib/x86_64-linux-gnu/libcogl.so.20libQt5OpenGL.so.5 (libc6,x86-64) => /lib/x86_64-linux-gnu/libQt5OpenGL.so.5libQt5OpenGL.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libQt5OpenGL.solibOpenGL.so.0 (libc6,x86-64) => /lib/x86_64-linux-gnu/libOpenGL.so.0libOpenGL.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libOpenGL.solibGL.so.1 (libc6,x86-64) => /lib/x86_64-linux-gnu/libGL.so.1libGL.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libGL.solibEGL.so.1 (libc6,x86-64) => /lib/x86_64-linux-gnu/libEGL.so.1libEGL.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libEGL.so
Additionally, when I run glxinfo
on the remote machine, I get similar errors:
node1@vm2:~$ glxinfoname of display: localhost:11.0libGL error: No matching fbConfigs or visuals foundlibGL error: failed to load driver: swrastX Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 148 (GLX) Minor opcode of failed request: 24 (X_GLXCreateNewContext) Value in failed request: 0x0 Serial number of failed request: 27 Current serial number in output stream: 28
However when I run the executable on my Ubuntu virtual machine directly (without SSH), VTK renders visuals without any issues.
Does anyone have any insights into how to resolve this issue when running a PCL C++ executable remotely from a Mac via SSH? Your help would be greatly appreciated.
My environment details are as follows:
Host Operating System: macOS Sonoma 14.5
Remote Operating System: Ubuntu 22.04 LTS
CMake version: 3.28
Compiler: g++ 12