The above installs the library files and installable client driver
registration in /opt/intel/opencl-1.2-5.0.0.43. Two more steps were
needed to run an OpenCL program.
Add library to search path:
1
sudo gedit /etc/ld.so.conf.d/intelOpenCL.conf
Add the line:
1
/opt/intel/opencl-1.2-5.0.0.43/lib64
Link to the intel icd file in the expected location:
git clone https://github.com/OpenKinect/libfreenect2.git cd depends sh ./download_debs_trusty.sh sh ./install_ubuntu.sh sudo dpkg -i libglfw3*_3.0.4-1_*.deb sudo apt-get install build-essential cmake pkg-config libturbojpeg libjpeg-turbo8-dev mesa-common-dev freeglut3-dev libxrandr-dev libxi-dev sudo dpkg -i debs/libusb*deb sudo dpkg -i debs/{libva,i965}*deb; sudo apt-get install -f sudo apt-add-repository ppa:deb-rob/ros-trusty && sudo apt-get update cd cd .. mkdir build && cd build cmake .. -DENABLE_CXX11=ON make sudo make install sudo cp ../platform/linux/udev/90-kinect2.rules /etc/udev/rules.d/
如在编译时出现错误:
1 2 3 4 5 6 7
Linking CXX shared library lib/libfreenect2.so /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libturbojpeg.a(libturbojpeg_la-turbojpeg.o): relocation R_X86_64_32 against `.data' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libturbojpeg.a: error adding symbols: Bad value collect2: error: ld returned 1 exit status make[2]: *** [lib/libfreenect2.so.0.2.0] Error 1 make[1]: *** [CMakeFiles/freenect2.dir/all] Error 2 make: *** [all] Error 2
echo "deb http://ppa.launchpad.net/keithw/glfw3/>ubuntu trusty main" | sudo tee -a /etc/apt/sources.list.d/fillwave_ext.list echo "deb-src http://ppa.launchpad.net/keithw/glfw3/ubuntu trusty main" | sudo tee -a /etc/>apt/sources.list.d/fillwave_ext.list