ld can't find libglut on RHEL 5.6
I'm currently compiling the example programs in the SDK for version 4.1. I currently get the following error:

/usr/bin/ld: cannot find -lglut
collect2: ld returned 1 exit status

However, I do have both 64-bit and 32-bit versions of freeglut rpm package installed:

[chemadm@rnuusprgpu01 C]$ rpm -qf /usr/lib64/libglut.so.3
freeglut-2.4.0-7.1.el5
[chemadm@rnuusprgpu01 C]$ rpm -qf /usr/lib/libglut.so.3
freeglut-2.4.0-7.1.el5

Do I need a newer version of freeglut? I don't remember seeing this error with version 4.0 in the past. I setup my environment like so for the compile:

cd /dbs/apps/cuda-4.1/NVIDIA_GPU_Computing_SDK/C
setenv PATH /dbs/apps/cuda-4.1/cuda/bin:/usr/bin:/bin:/usr/sbin:/sbin
setenv LD_LIBRARY_PATH /dbs/apps/cuda-4.1/cuda/lib64:/usr/lib64:/lib64
unsetenv PYTHONPATH
unsetenv PYTHONHOME
make | tee make.out

So I do have /usr/lib64 in my LD_LIBRARY_PATH above. Anyone else seen this linker error with libglut before?

Thanks,
Philippe
I'm currently compiling the example programs in the SDK for version 4.1. I currently get the following error:



/usr/bin/ld: cannot find -lglut

collect2: ld returned 1 exit status



However, I do have both 64-bit and 32-bit versions of freeglut rpm package installed:



[chemadm@rnuusprgpu01 C]$ rpm -qf /usr/lib64/libglut.so.3

freeglut-2.4.0-7.1.el5

[chemadm@rnuusprgpu01 C]$ rpm -qf /usr/lib/libglut.so.3

freeglut-2.4.0-7.1.el5



Do I need a newer version of freeglut? I don't remember seeing this error with version 4.0 in the past. I setup my environment like so for the compile:



cd /dbs/apps/cuda-4.1/NVIDIA_GPU_Computing_SDK/C

setenv PATH /dbs/apps/cuda-4.1/cuda/bin:/usr/bin:/bin:/usr/sbin:/sbin

setenv LD_LIBRARY_PATH /dbs/apps/cuda-4.1/cuda/lib64:/usr/lib64:/lib64

unsetenv PYTHONPATH

unsetenv PYTHONHOME

make | tee make.out



So I do have /usr/lib64 in my LD_LIBRARY_PATH above. Anyone else seen this linker error with libglut before?



Thanks,

Philippe

#1
Posted 02/20/2012 09:41 PM   
Noone has run into this error? Tried searching but could not find it in the forum so far.
Noone has run into this error? Tried searching but could not find it in the forum so far.

#2
Posted 02/21/2012 03:33 PM   
Maybe the doc http://developer.download.nvidia.com/compute/DevZone/docs/html/C/doc/CUDA_Getting_Started_Linux.pdf will help:
sudo apt-get install freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev
and further notes.
Maybe the doc http://developer.download.nvidia.com/compute/DevZone/docs/html/C/doc/CUDA_Getting_Started_Linux.pdf will help:

sudo apt-get install freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev

and further notes.

#3
Posted 02/21/2012 07:16 PM   
[quote name='ptempel' date='20 February 2012 - 10:41 PM' timestamp='1329774104' post='1371968']

[chemadm@rnuusprgpu01 C]$ rpm -qf /usr/lib64/libglut.so.3
freeglut-2.4.0-7.1.el5
[chemadm@rnuusprgpu01 C]$ rpm -qf /usr/lib/libglut.so.3
freeglut-2.4.0-7.1.el5

Do I need a newer version of freeglut? I don't remember seeing this error with version 4.0 in the past. I setup my environment like so for the compile:
[/quote]

linking requires the dynlib symlink, which is packaged in the freeglut-devel rpm:
$ rpm -qil freeglut-devel|grep libglut
/usr/lib64/libglut.so

davide
[quote name='ptempel' date='20 February 2012 - 10:41 PM' timestamp='1329774104' post='1371968']



[chemadm@rnuusprgpu01 C]$ rpm -qf /usr/lib64/libglut.so.3

freeglut-2.4.0-7.1.el5

[chemadm@rnuusprgpu01 C]$ rpm -qf /usr/lib/libglut.so.3

freeglut-2.4.0-7.1.el5



Do I need a newer version of freeglut? I don't remember seeing this error with version 4.0 in the past. I setup my environment like so for the compile:





linking requires the dynlib symlink, which is packaged in the freeglut-devel rpm:

$ rpm -qil freeglut-devel|grep libglut

/usr/lib64/libglut.so



davide

#4
Posted 03/20/2012 10:25 AM   
Scroll To Top