Comments (30)
On Ubuntu 16, I had the same issue. Here is how it got fixed. Hope it helps
Step 1:
Install libjpeg-turbo8-dev
Step 2:
The libturbojpeg.so
file was missing so I had to create a sym-link.
I ran sudo ln -s /usr/lib/x86_64-linux-gnu/libturbojpeg.so.0 /usr/lib/x86_64-linux-gnu/libturbojpeg.so
Step 3:
Deleted the build directory and ran cmake again.
from libfreenect2.
I checked again. On Ubuntu 14.04, /usr/lib/x86_64-linux-gnu/libturbojpeg.a
is provided by libjpeg-turbo8-dev
, but /usr/lib/x86_64-linux-gnu/libturbojpeg.so.0
is provided by libturbojpeg
. If the users follow the documentation, they will only install libjpeg-turbo8-dev
, and can not find libturbojpeg.so.0
. The docs need fixing.
I was also confused by this in several previous comments.
from libfreenect2.
I've installed all dependencies and added the symbolic link with
sudo ln -s /usr/lib/x86_64-linux-gnu/libturbojpeg.so.0.0.0 /usr/lib/x86_64-linux-gnu/libturbojpeg.so
but the make step still fails on Ubuntu 14.04
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] Error 1
make[1]: *** [CMakeFiles/freenect2.dir/all] Error 2
make: *** [all] Error 2
from libfreenect2.
The workaround worked using the latest master (commit 42da6d8 ) and I have Protonect up and running.
I upgraded Kernel to 3.16 per the instructions using:
sudo apt-get install linux-image-generic-lts-utopic
Thanks for the great work guys.
from libfreenect2.
Note that this isn't a bug in libfreenect2, but I'm posting the issue/fix here for reference.
from libfreenect2.
Mmm, I made the symbolic link and still have the error. Any pointers? Thanks.
from libfreenect2.
Could you post the exact build error?
from libfreenect2.
This confirmed bug could be the culprit, apparently there is a symlink missing.
from libfreenect2.
We have created a workaround that does not requires creating symlink under /usr. Please test latest master.
from libfreenect2.
I installed the latest commit, but it still returns the same error.
from libfreenect2.
@SebastianVarma can you post the output of ls -la /usr/lib/*/libturbojpeg*
?
from libfreenect2.
@floe I will do so tomorrow morning when I will be in front of my computer. Thank you for helping.
from libfreenect2.
@floe The output is as follows:
-rw-r--r-- 1 root root 499438 Dec 19 2013 /usr/lib/x86_64-linux-gnu/libturbojpeg.a
lrwxrwxrwx 1 root root 47 Jun 9 13:42 /usr/lib/x86_64-linux-gnu/libturbojpeg.so -> /usr/lib/x86_64-linux-gnu/libturbojpeg.so.0.0.0
lrwxrwxrwx 1 root root 21 Dec 19 2013 /usr/lib/x86_64-linux-gnu/libturbojpeg.so.0 -> libturbojpeg.so.0.0.0
-rw-r--r-- 1 root root 301472 Dec 19 2013 /usr/lib/x86_64-linux-gnu/libturbojpeg.so.0.0.0
from libfreenect2.
This does look correct... can you please open a new issue and post the exact build error?
from libfreenect2.
Just wanted to chime in that I have this exact same issue, with the same output from ls -la /usr/lib/*/libturbojpeg*
from libfreenect2.
@neorobo
Can not reproduce.
I also have this same output from ls -la /usr/lib/*/libturbojpeg*
and my build works fine.
Can you post the log of your cmake ..?
(Should have Found TurboJPEG: /usr/lib/x86_64-linux-gnu/libturbojpeg.so.0)
from libfreenect2.
@neorobo Duplicate issue #286 was fixed by a fresh clone of master and re-run of cmake, maybe try that first?
from libfreenect2.
@xlz Based on your suggestion I checked CMakeCache.txt. It was pointing to the static library. I edited it to point to .so.0 as you suggested should be the case and protonect was succesfully installed.
from libfreenect2.
I've compiled libfreenect2 quite a few times in the past couple weeks and I don't know if I've ever gotten it to work on the first time through following the order in the documentation.
After failing, I remove it entirely from my system, reclone it, run ./depends/install_ubuntu.sh
, cmake CMakeLists.txt
, make && sudo make install
it builds almost every time. Have repeated this on Ubuntu 14.04 32-bit & 64-bit and 15.04.
from libfreenect2.
I'm hoping that this is finally fixed for Debian and Ubuntu with latest master (both CMakeLists.txt
and install_ubuntu.sh
). I'll close it for now, but please comment if this is still a problem.
from libfreenect2.
I had the same Problem and had to delete /libfreenect2 and clone it again from Git. Now it works.
from libfreenect2.
Fixed it with ./depends/install_ubuntu.sh and then installing libturbojpeg with apt-get.
from libfreenect2.
I met the same problem, and I refer to this page : http://www.jetsonhacks.com/2015/02/26/install-kinect-v2-using-libfreenect2-on-nvidia-jetson-tk1/
Fixed with :sudo apt-get install -y build-essential libturbojpeg libtool autoconf libudev-dev cmake mesa-common-dev freeglut3-dev libxrandr-dev doxygen libxi-dev libjpeg-turbo8-dev
from libfreenect2.
The above suggestion is wrong.
The issue was fixed. Follow the instructions in README, and no workaround is necessary.
from libfreenect2.
@xlz can you point me to the README to which you refer?
from libfreenect2.
(Ubuntu 14.04 and newer) sudo apt-get install libturbojpeg libjpeg-turbo8-dev
According to https://packages.ubuntu.com/trusty/amd64/libturbojpeg/filelist, libturbojpeg provides /usr/lib/x86_64-linux-gnu/libturbojpeg.so.0. Our CMake was specifically made to detect libturbojpeg.so.0 in the absence of libturbojpeg.so.
from libfreenect2.
@rayjs your solution also works for me in Ubuntu 16.04. Thanks a lot.
from libfreenect2.
I know the issue is closed, but in case someone still has it after trying the other suggestions:
We had a very similar issue on HaxeFoundation/hashlink#147 and our solution was to follow the error message on -fPIC and rebuild libjpeg-turbo ourselves with Position-Independent Code. It should be the default when building with cmake/make, but apparently was not done so for the Ubuntu package.
from libfreenect2.
@hsandt It's generally better to link shared libraries not static objects. In this case it's better to link libturbojpeg.so not libturbojpeg.a. This is also the reason libturbojpeg.a is not built with -fPIC, because it's not meant for building shared libraries. Either you go all shared or all static.
from libfreenect2.
Ah! I missed that point. I'll go all dynamic next time.
from libfreenect2.
Related Issues (20)
- the devices needs to be unref, or less libusb --HEAD complains and/or crashes
- No data is visible on the Macos libfreenect2 (but in the first it worked) help needed.......
- Support for disabling VAAPI at run-time ?
- CUDA build fails with GCC 12 HOT 2
- can't install TurboJPEG
- Simple tutorial for webcam input? HOT 1
- Protonect: "bulk transfer failed: LIBUSB_ERROR_TIMEOUT Operation timed out" with VMware HOT 4
- CMake Error at cmake_install.cmake:41 (file): HOT 1
- Issue initializing a Pipeline with Gstreamer using Kinect webcam ASUS
- Viewer not responding
- README WRONG instruction about " Libusb " installation HOT 1
- Does this project support m1?
- cc1plus
- Linux compile error: expected unqualified-id before numeric constant HOT 5
- Multiple kinects using libfreenect2
- [Error] [protocol::UsbControl] failed to claim interface with IrInterfaceId(=1)! LIBUSB_ERROR_NOT_SUPPORTED Operation not supported or unimplemented on this platform.
- ./bin/Protonect cl is Giving black screen
- cuda_depth_packet_processor.cu(172): error: too few arguments in function call
- Protonect freezes - libva error: /usr/lib/dri/i965_drv_video.so init failed
- Weird dmsg and libfreenect2 can't open device HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libfreenect2.