Sunday, May 20, 2012

Linking error while compiling CUDA SDK in Ubuntu 12.04

Following the installation guide provided by CUDA website, all the dependency libraries are installed through apt-get:

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


When compiling the SDK, still get the error:

../../lib/librendercheckgl_x86_64.a(rendercheck_gl.cpp.o): In function `CheckBackBuffer::checkStatus(char const*, int, bool)':
rendercheck_gl.cpp:(.text+0xfbb): undefined reference to `gluErrorString'
collect2: ld returned 1 exit status


Tried several times uninstall and install again, and finally find the post: http://forums.developer.nvidia.com/devforum/discussion/3486/linkingmake-error-while-compiling-sdk-on-ubuntu-11-10/p1 solving this problem:

The problem is in the ~/NVIDIA_GPU_Computing_SDK/C/common/common.mk

Lines like:
LIB += ... ${OPENGLLIB} .... $(RENDERCHECKGLLIB) ...
should have the two in reverse.



2 comments:

  1. Hi,

    Thank you for this post. It was very helpful for my installation of CUDA 4.2 on Lubuntu 12.04.
    Much appreciated!

    Yiannis (eldudorinio@gmail.com)

    ReplyDelete
  2. Thank You very much!

    ReplyDelete

Google+