I tried to compile cuda sdk sample programs after installing cuda 3.2RC.
The compiler is unable to compile some of the programs, e.g. simpleTextureDrv,
vectorAddDrv, threadMigration, matrixMulDrv, deviceQueryDrv
Typical linker error:
simpleTextureDrv.cpp:(.text+0x152): undefined reference to `cuCtxCreate_v2’
my workaround: modification of some Makefiles to comment out the offending cpp file and
adding a trivial cpp (with emty main) file to please the make and compiler.
My platform:
Ubuntu 10.4
Cuda compilation tools, release 3.2, V0.2.1221
NVidia 260.19.12 driver installed from UBUNTU packages
I tried to compile cuda sdk sample programs after installing cuda 3.2RC.
The compiler is unable to compile some of the programs, e.g. simpleTextureDrv,
vectorAddDrv, threadMigration, matrixMulDrv, deviceQueryDrv
Typical linker error:
simpleTextureDrv.cpp:(.text+0x152): undefined reference to `cuCtxCreate_v2’
my workaround: modification of some Makefiles to comment out the offending cpp file and
adding a trivial cpp (with emty main) file to please the make and compiler.
My platform:
Ubuntu 10.4
Cuda compilation tools, release 3.2, V0.2.1221
NVidia 260.19.12 driver installed from UBUNTU packages
There is your problem. The linking error you are seeing is because the linker cannot find libcuda.so in the standard paths it is looking to find it.
I am willing to get that the repackaged drivers in the Ubuntu repository either don’t include the CUDA libraries or have moved them to a non-standard place. The simple solution is only use the NVIDIA official driver distribution - then things like CUDA and OpenCL will work as advertised.
There is your problem. The linking error you are seeing is because the linker cannot find libcuda.so in the standard paths it is looking to find it.
I am willing to get that the repackaged drivers in the Ubuntu repository either don’t include the CUDA libraries or have moved them to a non-standard place. The simple solution is only use the NVIDIA official driver distribution - then things like CUDA and OpenCL will work as advertised.