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

Compiler error on Ubuntu Linux with Nvidia Drivers: No rule to make target `/usr/lib/x86_64-linux-gnu/libGL.so' #2087

Closed
liangfok opened this issue Apr 13, 2016 · 10 comments
Labels
component: distribution Nightly binaries, monthly releases, docker, installation configuration: linux type: bug

Comments

@liangfok
Copy link
Contributor

I did a fresh install of Ubuntu Linux 14.04.4 64-bit desktop. Since my computer has an Nvidia GPU, I installed Nvidia's proprietary Linux drivers (version 361.42). I then followed Drake's Ubuntu Linux installation instructions but ran into the following error while compiling:

make[10]: *** No rule to make target `/usr/lib/x86_64-linux-gnu/libGL.so', needed by `lib/libbot2-lcmgl-renderer.so.1'.  Stop.

The problem is /usr/lib/x86_64-linux-gnu/libGL.so points to /usr/lib/x86_64-linux-gnu/mesa/libGL.so, which points to /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0, which does not exist.

Searching on my computer, I found a /usr/lib/libGL.so.1, which points to /usr/lib/x86_64-linux-gnu/libGL.so.1, which points to /usr/lib/x86_64-linux-gnu/libGL.so.361.42.

To fix the problem, I updated the symbolic link as follows:

$ sudo rm /usr/lib/x86_64-linux-gnu/libGL.so
$ sudo ln -s /usr/lib/libGL.so.1 /usr/lib/x86_64-linux-gnu/libGL.so

With the above fix, I was able to compile Drake. However, I'm not sure if the above fix is correct or the best practice. If it is, we may need to add this procedure to Drake's installation instructions.

@liangfok liangfok added type: bug component: distribution Nightly binaries, monthly releases, docker, installation configuration: linux labels Apr 13, 2016
@david-german-tri
Copy link
Contributor

Losing libGL.so on Ubuntu seems to be a common phenomenon. Google turns up issue threads similar to this one in a wide variety of open-source projects, with a variety of video drivers. I don't think we can usefully capture any Drake-specific guidance.

@soonho-tri
Copy link
Member

FWIW, I had the same issue today. Thanks @liangfok for the solution!

@raj-pandey
Copy link

raj-pandey commented Mar 3, 2017

I had the same problem. linker was taking /usr/lib/x86_64-linux-gnu/libGL.so which didn't had the definition for the "_glapi_tls_Dispatch". When I followed @liangfok suggestion and pointed to the correct file, compilation went ahead. Thumbs up for the solution.

@stevenjj
Copy link

stevenjj commented Jul 5, 2017

This worked!
I was facing similar issues with NVIDIA's proprietary driver and your two line command fixed the problem for a catkin build.

As a useful note, I was using the proprietary driver NVIDIA-Linux-x86_64-381.09 on Ubuntu 14.04

I had a lot of pre-installed packages and software(srcsim, openpose_ros, cuda, cudann, ros-indigo-desktop (without ros-indigo-octomap), and pcl_ros) and was unsure whether one or more previously installed software caused linking problems.

@Athanaze
Copy link

Thanks @liangfok ! This solution worked for me, on Linux Mint.

@rearming
Copy link

Thanks a lot!

@mywnajsldkf

This comment has been minimized.

@mywnajsldkf

This comment has been minimized.

@omerfy

This comment has been minimized.

@duythaomta

This comment has been minimized.

@RobotLocomotion RobotLocomotion locked as resolved and limited conversation to collaborators May 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: distribution Nightly binaries, monthly releases, docker, installation configuration: linux type: bug
Projects
None yet
Development

No branches or pull requests

10 participants