Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CUDA missing libGL.so libGLU.so and libX11.so

This is the standard problem that people have been running across, but I can't get it to work. I'm on Linux Mint 17.3 and did the install via repo. When I try to compile the 5_Simulations directory (really, fluidsGL), I get the following errors:

>>> WARNING - libGL.so not found, refer to CUDA Getting Started Guide for how to find and install them. <<<
>>> WARNING - libGLU.so not found, refer to CUDA Getting Started Guide for how to find and install them. <<<
>>> WARNING - libX11.so not found, refer to CUDA Getting Started Guide for how to find and install them. <<<

However, these do exist on the system, for example:

[name@host: fluidsGL]$ locate libGL.so
/usr/lib/i386-linux-gnu/mesa/libGL.so.1
/usr/lib/i386-linux-gnu/mesa/libGL.so.1.2.0
/usr/lib/nvidia-352/libGL.so
/usr/lib/nvidia-352/libGL.so.1
/usr/lib/nvidia-352/libGL.so.352.68
/usr/lib/x86_64-linux-gnu/libGL.so
/usr/lib/x86_64-linux-gnu/mesa/libGL.so
/usr/lib/x86_64-linux-gnu/mesa/libGL.so.1
/usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0
/usr/lib32/nvidia-352/libGL.so
/usr/lib32/nvidia-352/libGL.so.1
/usr/lib32/nvidia-352/libGL.so.352.6

Even symlinking to /usr/lib/libGL.so with the nvidia-352 version doesn't work. Has anybody had this particular issue? I'm trying not to screw up the computer, as I've had issues with drivers suddenly not working when I start messing with this kind of stuff.

like image 335
NuclearAlchemist Avatar asked Jan 05 '16 17:01

NuclearAlchemist


1 Answers

Linux Mint is not an officially supported distro for CUDA. So it's possible that the CUDA install method (the driver install portion, in this case) you are using is placing the necessary GL libraries in a place that the makefile is not equipped to find.

If you study the findgllib.mk makefile "helper" file in the build directory, I suspect a debian based distribution would follow the UBUNTU path in that .mk file. For the non-ppc and non-arm branches, you will find definitions like this:

ifeq ("$(UBUNTU)","0")
  ifeq ...
  ...
  else
    GLPATH    ?= /usr/lib/$(UBUNTU_PKG_NAME)
    GLLINK    ?= -L/usr/lib/$(UBUNTU_PKG_NAME)
    DFLT_PATH ?= /usr/lib

Given that:

  1. You have stated that the GL libraries seemed to be installed.
  2. You've symlinked those libraries into the /usr/lib directory
  3. The GLPATH definition in the .mk file is a "non-override" definition (i.e. ?=)

we can "override" or replace the GLPATH definition concocted by the makefile with the "known good" one of /usr/lib with:

GLPATH=/usr/lib

prepended to your make command.

like image 109
Robert Crovella Avatar answered Nov 03 '22 00:11

Robert Crovella