Help, it troubles me... The sample gives error...

I installed cuda-driver,SDK,Toolkit in fedora, set the environment as instruction, when compiling, it gives error:

[root@elk NVIDIA_CUDA_SDK]# make

make[1]: Entering directory `/root/NVIDIA_CUDA_SDK/common’

a - obj/release/bank_checker.cpp_o

a - obj/release/cmd_arg_reader.cpp_o

a - obj/release/cutil.cpp_o

a - obj/release/error_checker.cpp_o

a - obj/release/stopwatch.cpp_o

a - obj/release/stopwatch_linux.cpp_o

a - obj/release/cutil_interop.cpp_o

make[1]: Leaving directory `/root/NVIDIA_CUDA_SDK/common’

make -C projects/boxFilter/

make[1]: Entering directory `/root/NVIDIA_CUDA_SDK/projects/boxFilter’

/usr/bin/ld: cannot find -lglut

collect2: ld returned 1 exit status

make[1]: *** […/…/bin/linux/release/boxFilter] Error 1

make[1]: Leaving directory `/root/NVIDIA_CUDA_SDK/projects/boxFilter’

make: *** [projects/boxFilter/Makefile.ph_build] Error 2

I guess lglut is some flag? <img src=‘http://hqnveipbwb20/public/style_emoticons/<#EMO_DIR#>/crying.gif’ class=‘bbc_emoticon’ alt=‘:’(’ /> How can I fix it ? Or there is something wrong about the dirver? I post the install.log and bug.log.

I am new to this and thanks really External Image
nvidia_bug_report.txt (115 KB)
nvidia_installer.txt (2.36 KB)

From the release notes…

  1. “ld: cannot find -lglut”. On some linux installations (notably default RHEL
    4 update 3 installations), building the simpleGL example (and other examples
    that use OpenGL) can result in a linking error like the following.

     /usr/bin/ld: cannot find -lglut

    Typically this is because the SDK makefiles look for and not for
    variants of it (like To confirm this is the problem, simply
    run the following command.

     ls /usr/lib | grep glut

    You should see the following (or similar) output.

    lrwxrwxrwx 1 root root 16 Jan 9 14:06 →
    -rwxr-xr-x 1 root root 164584 Aug 14 2004

    If you have in /usr/lib, simply run the following command
    as root.

     ln -s /usr/lib/ /usr/lib/

    If you do NOT have then you can check whether the glut package
    is installed on your RHEL system with the following command.

     rpm -qa | grep glut

    You should see “freeglut-2.2.0-14” or similar in the output. If not, you
    or your system administrator should install the package “freeglut-2.2.0-14”.
    Refer to the Red Hat and/or rpm documentation for instructions.

    If you have but you do not have write access to /usr/lib, you
    can also fix the problem by creating the soft link in a directory to which
    you have write permissions and then add that directory to the libarary
    search path (-L) in the Makefile.

I do not have in usr/lib, but I have it in usr/lib64… any difference? :unsure:

Oh, it works, mfatica

Thank you very very much! It is so nice of you External Image

I know this is old but I am having the same problem and my system is setup the way the release notes say it should be.

I type this

ls -l /usr/lib | grep glut

I get this

lrwxrwxrwx 1 root root 21 Nov 7 15:45 → /usr/lib/

lrwxrwxrwx 1 root root 16 Mar 13 2007 → 1 root root 164584 Aug 14 2004

Then I performed the link as suggest and now I have

lrwxrwxrwx 1 root root 21 Nov 7 15:45 → /usr/lib/

lrwxrwxrwx 1 root root 16 Mar 13 2007 → 1 root root 164584 Aug 14 2004

But I still get the following error

/usr/bin/ld: skipping incompatible /usr/lib/ when searching for -lglut/

usr/bin/ld: cannot find -lglut

I have a feeling this is more about that skipping thing then anything else.

It seems like you are on a 64bit platform and you are trying to link the 32bit version of glut.
Do the same link in /usr/lib64

This fixed my problem. Thanks!