Hi.
I followed the guide “GettingStartedLinux.pdf” to set up the CUDA environment, but unable to compile the sample codes using “make”. Here is the error:
nitj@nitj-desktop:~$ cd NVIDIA_GPU_Computing_SDK/C/
nitj@nitj-desktop:~/NVIDIA_GPU_Computing_SDK/C$ sudo make
make[1]: Entering directory `/home/nitj/NVIDIA_GPU_Computing_SDK/C/common'
make[1]: Leaving directory `/home/nitj/NVIDIA_GPU_Computing_SDK/C/common'
make[1]: Entering directory `/home/nitj/NVIDIA_GPU_Computing_SDK/C/common'
make[1]: Leaving directory `/home/nitj/NVIDIA_GPU_Computing_SDK/C/common'
make[1]: Entering directory `/home/nitj/NVIDIA_GPU_Computing_SDK/C/common'
make[1]: Leaving directory `/home/nitj/NVIDIA_GPU_Computing_SDK/C/common'
make[1]: Entering directory `/home/nitj/NVIDIA_GPU_Computing_SDK/shared'
make[1]: Leaving directory `/home/nitj/NVIDIA_GPU_Computing_SDK/shared'
make -C src/boxFilter/
make[1]: Entering directory `/home/nitj/NVIDIA_GPU_Computing_SDK/C/src/boxFilter'
/usr/bin/ld: cannot find -lXi
collect2: ld returned 1 exit status
make[1]: *** [../../bin/linux/release/boxFilter] Error 1
make[1]: Leaving directory `/home/nitj/NVIDIA_GPU_Computing_SDK/C/src/boxFilter'
make: *** [src/boxFilter/Makefile.ph_build] Error 2
nitj@nitj-desktop:~/NVIDIA_GPU_Computing_SDK/C$
what is this “cannot find -lXi” ??
My environment variables are as follows:
declare -x PATH="/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
declare -x LD_LIBRARY_PATH="/usr/local/cuda/lib:"
Any inputs ?
-lXi requires for linker to find file called libXi.so.
To be more general - -lXXX tries to find library file called libXXX.so
In my system (Debian 64-bit, mixture of unstable and experimental) file /usr/lib/libXi.so is (according to dpkg):
libxi-dev: /usr/lib/libXi.so
libxi6: /usr/lib/libXi.so.6.1.0
libxi6: /usr/lib/libXi.so.6
So you need to install package libxi-dev.
To avoid problems with other libraries, install packages xorg-dev and mesa-common-dev, which depend on most of the packages for compiling X programs.
For future reference:
dpkg -S NAME
looks for file NAME in all installed packages
apt-cache search NAME
looks for NAME in descriptions of all packages (including non-installed ones)
-lXi requires for linker to find file called libXi.so.
To be more general - -lXXX tries to find library file called libXXX.so
In my system (Debian 64-bit, mixture of unstable and experimental) file /usr/lib/libXi.so is (according to dpkg):
libxi-dev: /usr/lib/libXi.so
libxi6: /usr/lib/libXi.so.6.1.0
libxi6: /usr/lib/libXi.so.6
So you need to install package libxi-dev.
To avoid problems with other libraries, install packages xorg-dev and mesa-common-dev, which depend on most of the packages for compiling X programs.
For future reference:
dpkg -S NAME
looks for file NAME in all installed packages
apt-cache search NAME
looks for NAME in descriptions of all packages (including non-installed ones)
Hey Dude Thanks!!
It solved the problem
Hey Dude Thanks!!
It solved the problem