SDK compilation - missing header(s) 64 bit ubuntu 7.10 server ed.

Hi

Just built a box to play with Cuda - got as far as compiling the SDK examples and get the following error:

az@AzCUDA:~/NVIDIA_CUDA_SDK$ make
make[1]: Entering directory /home/az/NVIDIA_CUDA_SDK/common' a - obj/release/bank_checker.cpp_o a - obj/release/cmd_[b][/b]arg_reader.cpp_o a - obj/release/cutil.cpp_o a - obj/release/stopwatch.cpp_o a - obj/release/stopwatch_linux.cpp_o a - obj/release/multithreading.cpp_o make[1]: Leaving directory /home/az/NVIDIA_CUDA_SDK/common’
make[1]: Entering directory /home/az/NVIDIA_CUDA_SDK/common' In file included from ./../common/inc/paramgl.h:13, from src/paramgl.cpp:8: [b]./../common/inc/GL/glut.h:60:20: error: GL/glu.h: No such file or directory[/b] make[1]: *** [obj/release/paramgl.cpp_o] Error 1 make[1]: Leaving directory /home/az/NVIDIA_CUDA_SDK/common’
make: *** [lib/libparamgl.so] Error 2

Googling suggest it’s down to missing GL and/or X headers (no X with server edition of ubuntu) and that installing
“libgl1-mesa-dev or mesa-common-dev. After you’ve installed those it should work.”

I’m a bit confused as to whether this file is inside the SDK, and if it is how installing something else can make it appear in the SDK…are the files created in the extraction of the SDK conditional on other installed things? Presumably i’d have to re-extract the SDK after installing

apt doesnt know about these packages, using the file completion in apt:
az@AzCUDA:~/NVIDIA_CUDA_SDK$ sudo apt-get install libgl
libgl1 libglade2-dev libglib2.0-doc
libgl1-mesa libgl-dev libglibmm-2.4-1c2a
libgl1-mesa-dev libglib1.2 libglu1
libgl1-mesa-dri libglib2.0-0 libglu1-mesa
libgl1-mesa-glx libglib2.0-cil libglu1-mesa-dev
libglade0 libglib2.0-data libglu1-xorg-dev
libglade2-0 libglib2.0-dev libglu-dev

none of the likely candidates seem to exist, e.g.:

az@AzCUDA:~/NVIDIA_CUDA_SDK$ sudo apt-get install libglu1-mesa-dev
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package libglu1-mesa-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package libglu1-mesa-dev has no installation candidate

any ideas what I should install? do I need more sources for apt?

Many thanks
virgesmith

freeglut-dev should do it for you.

az@AzCUDA:~$ sudo apt-get install freeglut3-dev

Reading package lists… Done

Building dependency tree

Reading state information… Done

Package freeglut3-dev is not available, but is referred to by another package.

This may mean that the package is missing, has been obsoleted, or

is only available from another source

E: Package freeglut3-dev has no installation candidate

I can download the freeglut3-dev .deb but it has loads of dependencies all of which I’d have to install manually. Surely there’s an easier way??

Perhaps theres a source I could add to sources.list?

Thanks

Update: looking at /etc/apt/sources.list I have a lot of entries like

Line commented out by installer because it failed to verify:

#deb http://gb.archive.ubuntu.com/ubuntu/ gutsy main restricted

Line commented out by installer because it failed to verify:

#deb-src http://gb.archive.ubuntu.com/ubuntu/ gutsy main restricted

so I’ve uncommented and will see what happens…

Update 2: freeglut-dev installed fine after uncommenting those lines. Now have another missing header

/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory

I reckon another missing package, shouldnt be too difficult to resolve

Update 3: no so much a missing header as some 64 bit issues. I modified /usr/include/bits/wordsize.h to always #define __WORDSIZE 64

All the examples now build. As for running, that requires another post :(