Slight 64-bit build issues with SDK 2.0 Slight 64-bit build issues with SDK 2.0

I have the CUDA SDK running on Ubuntu 8.04, 64-bit server. I had a few slight problems when building the SDK that I solved. I thought I might post what I did in case it helps anyone.

  1. I got complaints about missing GL/glu.h file. I had to:
    apt-get install mesa-common-dev
    apt-get install libglu1-mesa-dev

  2. postProcessedGL fails because it can’t find -lglut. In /usr/lib64 I had a libglut.so.3.8.0, so I made
    a soft link /usr/lib64/libglut.so to point to the installed version. Tested binary, and it works.

  3. threadMigration fails to build because it can’t find gnu/stubs-32.h. After tracing thru include files, I found that you need to define x86_64 during compilation. This winds up including gnu/stubs-64.h instead of stubs-32.h. I made the following change to /common/common.mk:
    was
    COMMONFLAGS += -O3
    now
    COMMONFLAGS += -O3 -D__x86_64__

Tested binary and it works.

  1. This doesn’t like a problem, you just need GLU.

  2. Usually each library ABC is installed as libabc.so.x.y with symlinks libabc.so.x and libabc.so. Refer to your distro why glut (freeglut, I guess) installed incompletely.

  3. This is very strange. AFAIK, x86_64 is predefined macro when compiling for x86-64.

Maybe this will help:
http://lifeofaprogrammergeek.blogspot.com/…-in-ubuntu.html