Build instructions for LinuxNone of us are running Linux (all development has been on OSX and Windows XP) but these build tips were provided by Alastair Harrison who got the library compiling on 64-bit Kubuntu Karmic with gcc 4.4.1. 1) GET CUDADownload and install CUDA 3.0 http://developer.nvidia.com/object/cuda_3_0_downloads.html You will need
Compiling CUDA using gcc 4.4.1 is a bit of a hassle. There are two ways to do this: 1) Comment some 'extern' definitions in the cuda headers, as per comment #14 here: http://moelhave.dk/2009/12/nvidia-cuda-on-ubuntu-karmic-koala/#comment-356165 OR 2) you can turn off inlining and the compiler optimizations as per these: http://parasatria.wordpress.com/2010/01/27/cuda-and-gcc-4-4/ The former is probably preferable, because you don't have to disable the optimizations but only the latter has been tested. 2) COMPILE CUDPPThe segmented scan from the CUDPP project is used to build the integral images. http://code.google.com/p/cudpp/ We have included the sources for this project in the There are two parts to this. 1) If you turned off inlining and optimization to make the cuda sdk work, then you need to make the same changes in the CUDPP linux_build/common.mk file. 2) If you're on a 64-bit platform then you need to persuade it to compile the libraries with -fPIC and make them properly shared. Again, in the CUDPP linux_build/common.mk file, change: CXXFLAGS := $(CXXWARN_FLAGS) CFLAGS := $(CWARN_FLAGS) To this: CXXFLAGS := $(CXXWARN_FLAGS) -fPIC CFLAGS := $(CWARN_FLAGS) -fPIC And add --compiler-options -fPIC -shared to the NVCCFLAGS. 3) GET CMAKEThis should be available using apt sudo apt-get install cmake
4) GET OPENCVGood instructions are available here. There may be a package available in aptitude. 5) GET BOOSTThere are instructions available here but the Boost C++ libraries should be available in an aptitude repository. The Boost Program Options library is necessary for the 6) BUILD GPU SURFopen a console in the build directory. type: cmake .. This gets cmake to construct the makefile. The CMake script that finds CUDA may not work correcly and you may be requried to specify paths to the CUDA libraries manually. CMake comes with a utility that allows you to do this from the console. Type ccmake . to open the utility. Now typing Now you can build the library. Type: make This will produce a few things:
Generated on Fri Apr 30 20:06:20 2010 for gpusurf by 1.6.2 |