Items with no label
3335 Discussions

zr300 ubuntu 16.04 server edition undefined symbol: libusb_get_parent

MDiou
Beginner
1,740 Views

Dear Support,

 

System (Server edition - [cat lsb_release]):

DISTRIB_ID=Ubuntu

DISTRIB_RELEASE=16.04

DISTRIB_CODENAME=xenial

DISTRIB_DESCRIPTION="Ubuntu 16.04 LTS"

 

PC: https://ark.intel.com/products/83257 Intel® NUC Kit NUC5i3RYH Product Specifications

While following this guide https://software.intel.com/sites/products/realsense/intro/getting_started.html Introduction to Intel® RealSense™ SDK for Linux: Getting Started I have encountered the following error when running:

/usr/bin/rs_or_tutorial_1_gui or cpp-capture

errors:

/usr/bin/rs_or_tutorial_1_gui: symbol lookup error: /usr/lib/x86_64-linux-gnu/librealsense.so.1: undefined symbol: libusb_get_parent

cpp-capture: symbol lookup error: /usr/lib/x86_64-linux-gnu/librealsense.so.1: undefined symbol: libusb_get_parent

These are the libusb packages on my system (dpkg --get-selections | grep libusb):

libusb++-0.1-4v5:amd64 install

libusb++-dev install

libusb-0.1-4:amd64 install

libusb-1.0-0:amd64 install

libusb-1.0-0-dbg:amd64 install

libusb-1.0-0-dev:amd64 install

libusb-1.0-doc install

libusb-dev install

I have tried following this forum post to solve the problem (https://stackoverflow.com/questions/28835794/undefined-reference-to-libusb-get-parent-compiling-freenect makefile - Undefined reference to libusb_get_parent() - compiling freenect - Stack Overflow )

 

[

 

The only difference is that instead of using the following command

 

sudo ln -s /usr/lib/libusb-1.0.so /usr/lib/arm-linux-gnueabihf/libusb-1.0.so

 

I used the following command

 

sudo ln -s /usr/lib/libusb-1.0.so /usr/lib/x86_64-linux-gnu/libusb-1.0.so

as /usr/lib/x86_64-linux-gnu/librealsense.so.1 is in the directory /usr/lib/x86_64-linux-gnu/ not /usr/lib/arm-linux-gnueabihf/

]

But upgrading to version 1.0.21 of libusb-1.0-0-dev does not solve the problem.

I have version 1.0.20-1 of libusb-1.0-0-dev and libsusb-1.0.0 installed on my system (dpkg -s libusb-1.0-0 && dpkg -s libusb-1.0-0-dev):

 

Package: libusb-1.0-0-dev

Status: install ok installed

Priority: optional

Section: libdevel

Installed-Size: 264

Maintainer: Ubuntu Developers <</span>mailto:ubuntu-devel-discuss@lists.ubuntu.com ubuntu-devel-discuss@lists.ubuntu.com>

Architecture: amd64

Multi-Arch: same

Source: libusb-1.0

Version: 2:1.0.20-1

Depends: libusb-1.0-0 (= 2:1.0.20-1)

Recommends: libusb-1.0-doc

Package: libusb-1.0-0

Status: install ok installed

Priority: optional

Section: libs

Installed-Size: 122

Maintainer: Ubuntu Developers <</span>mailto:ubuntu-devel-discuss@lists.ubuntu.com ubuntu-devel-discuss@lists.ubuntu.com>

Architecture: amd64

Multi-Arch: same

Source: libusb-1.0

Version: 2:1.0.20-1

Depends: libc6 (>= 2.17), libudev1 (>= 183)

Would you kindly be able to provide me with assistance ?

0 Kudos
6 Replies
MartyG
Honored Contributor III
690 Views

As you are using a Server version of Ubuntu, my first question would be if you have set Librealsense up on a Virtual Machine. Librealsense's documentation says, "Due to the USB 3.0 translation layer between native hardware and virtual machine, the librealsense team does not recommend or support installation in a VM."

0 Kudos
MDiou
Beginner
690 Views

Hello MartyG, thank you for the prompt reply,

 

No librealsense is not installed on a Virtual machine.
0 Kudos
MartyG
Honored Contributor III
690 Views

Some other people who had the undefined symbol: libusb_get_parent error found that they fixed it by building libusb from the latest version of it instead of an old version like libusb 1.0. The latest version is 1.0.21

http://libusb.info/ libusb

0 Kudos
MartyG
Honored Contributor III
690 Views

I apologize - I have not dealt with this error before, so I am learning about it as I research.

I wonder if there is an issue with the format of your command (swapping Arm for x86). Someone else phrased the command like this:

sudo ln -sf /lib/x86_64-linux-gnu/libusb-1.0.so.0 /usr/local/lib/libusb-1.0.so.0

0 Kudos
MDiou
Beginner
690 Views

Not at all thank you for taking the time to answer and help out.

The problem is now fixed.

 

Your previous reply sent me in the right direction, the libraries that were being used where that of /usr/local/lib/libusb-1.0.so.

And not of

 

 

/usr/lib/x86_64-linux-gnu/libusb-1.0.so

by replacing the

/usr/local/lib/libusb-1.0.so

 

/usr/local/lib/libusb-1.0.so.0

 

/usr/local/lib/libusb-1.0.so.0.1.0

 

with the libusb-1.0.21

/usr/lib/libusb-1.0.so

/usr/lib/libusb-1.0.so.0

/usr/lib/libusb-1.0.so.0.1.0

The error disappeared

0 Kudos
MartyG
Honored Contributor III
690 Views

Awesome news! Good luck with the rest of your project, and please come back to the forum any time that you have new questions.

0 Kudos
Reply