habitat-sim icon indicating copy to clipboard operation
habitat-sim copied to clipboard

ImportError: /lib/x86_64-linux-gnu/libOpenGL.so.0: undefined symbol: _glapi_tls_Current

Open KenaHemnani opened this issue 4 years ago • 2 comments

❓ Questions and Help

Hello all; I was getting following error while running : python setup.py install --headless

-- Could NOT find EGL (missing: EGL_INCLUDE_DIR) CMake Error at deps/magnum/src/Magnum/Platform/CMakeLists.txt:796 (message): EGL library, required by some contexts, was not found. Set WITH_*APPLICATION and/or WITH_EGLCONTEXT to OFF to skip building them. -- Configuring incomplete, errors occurred!

Then I tried solution given in: https://github.com/facebookresearch/habitat-sim/issues/256 Hence, installed libgl1-mesa-dev and libegl1-mesa-dev sudo apt-get install libgl1-mesa-dev sudo apt-get install libegl1-mesa-dev

Now, I got following error while running python examples/example.py:

(habitat1) hemnani1@boss8:~/DIR1/habitat-lab$ python examples/example.py 2020-12-12 18:49:48,396 Initializing dataset PointNav-v1 Traceback (most recent call last): File "examples/example.py", line 28, in example() File "examples/example.py", line 14, in example config=habitat.get_config("configs/tasks/pointnav.yaml") File "/home/hemnani1/DIR1/habitat-lab/habitat/core/env.py", line 78, in _init _ id_dataset=config.DATASET.TYPE, config=config.DATASET File "/home/hemnani1/DIR1/habitat-lab/habitat/datasets/registration.py", line 2 0, in make_dataset return _dataset(**kwargs) File "/home/hemnani1/DIR1/habitat-lab/habitat/datasets/pointnav/init.py", l ine 30, in init raise pointnav_import_error File "/home/hemnani1/DIR1/habitat-lab/habitat/datasets/pointnav/init.py", l ine 20, in _try_register_pointnavdatasetv1 from habitat.datasets.pointnav.pointnav_dataset import ( # noqa: F401 File "/home/hemnani1/DIR1/habitat-lab/habitat/datasets/pointnav/pointnav_datase t.py", line 15, in from habitat.tasks.nav.nav import ( File "/home/hemnani1/DIR1/habitat-lab/habitat/tasks/nav/nav.py", line 31, in from habitat.sims.habitat_simulator.actions import HabitatSimActions File "/home/hemnani1/DIR1/habitat-lab/habitat/sims/habitat_simulator/actions.py ", line 12, in import habitat_sim File "/home/hemnani1/anaconda3/envs/habitat1/lib/python3.6/site-packages/habita t_sim-0.1.6-py3.6-linux-x86_64.egg/habitat_sim/init.py", line 13, in from habitat_sim import ( # noqa: F401 File "/home/hemnani1/anaconda3/envs/habitat1/lib/python3.6/site-packages/habita t_sim-0.1.6-py3.6-linux-x86_64.egg/habitat_sim/agent/init.py", line 7, in from .agent import * # noqa: F401,F403 File "/home/hemnani1/anaconda3/envs/habitat1/lib/python3.6/site-packages/habita t_sim-0.1.6-py3.6-linux-x86_64.egg/habitat_sim/agent/agent.py", line 10, in import magnum as mn File "/home/hemnani1/anaconda3/envs/habitat1/lib/python3.6/site-packages/magnum /init.py", line 28, in from _magnum import * ImportError: /lib/x86_64-linux-gnu/libOpenGL.so.0: undefined symbol: _glapi_tls_C urrent

Can anyone please help me resolve this error.

KenaHemnani avatar Dec 12 '20 14:12 KenaHemnani

Hi @KenaHemnani I had the same problem. In my case, I was configuring the server from scratch (to run the habitat).

STEPS TO REPRODUCE: I installed the nvidia-driver and cuda first. Then I installed the habitat dependencies listed here by running:

sudo apt-get update || true
# These are fairly ubiquitous packages and your system likely has them already,
# but if not, let's get the essentials for EGL support:
sudo apt-get install -y --no-install-recommends \
     libjpeg-dev libglm-dev libgl1-mesa-glx libegl1-mesa-dev mesa-utils xorg-dev freeglut3-dev

And got the same error message as you attached above.

The root cause is:

Note: Installing Mesa may overwrite the /usr/lib/libGL.so that was previously installed by the NVIDIA driver, so a reinstallation of the NVIDIA driver might be required after installing these libraries.

Source: cuda installation guide.

SOLUTION: reinstallation of the NVIDIA driver solved the issue for me.

rpartsey avatar Apr 13 '21 08:04 rpartsey

Hi there, I came across the same problem, and I found a more convenient solution by reinstalling libglvnd. I solved the problem by running (on CentOS7):

sudo yum reinstall libglvnd

For your reference: https://github.com/openai/mujoco-py/issues/513

fyhMer avatar Apr 23 '22 12:04 fyhMer

Looks like this is resolved.

aclegg3 avatar Aug 31 '22 17:08 aclegg3