jetsonhacks / installLibrealsense

Install librealsense for Intel Realsense cameras on Jetson development kits
MIT License
12 stars 11 forks source link

error: 'libusb_get_port_number' was not declared. Please! #7

Open Kanelankai opened 6 years ago

Kanelankai commented 6 years ago

Hello! Sorry for disturbing you. Now I want to install the driver of r200 on a Jetson tk1 with ubuntu 14.04. I noticed that in this article it uses libusb 1.0-0 but I have installed libusb 1.0-9 in my tk1 and it must be remained because other device needs this library. First I installed libusb 1.0-0, when I executed "make" it came up with the error "src/uvc-v4l2.cpp:402:72: error: 'libusb_get_port_number' was not declared in this scope std::to_string(libusb_get_port_number(device.usb_device)); ". I know that this was because two version of libusb was in my pc. So then I removed libusb 1.0-0 leaving only libusb 1.0-9 and executed "make", the same error occured. Could you tell me how to resolve the usb library to version 1.0-9? Thank you in advance.

jetsonhacks commented 6 years ago

I don't know the specifics of your situation, but you may need to change the include file paths to point to the new libusb library. I would search for libusb_get_port_number to make sure that it is still implemented in the version of libusb that you are using.

Kanelankai commented 6 years ago

Thank you for replying. I tried to change the include file paths by the makefile under the directory of librealsense. I changed the LIBUSB_FLAGS to "LIBUSB_FLAGS := -L/home/ubuntu/libusb-1.0.9/libusb/.libs -lusb-1.0 -I/home/ubuntu/libusb-1.0.9/libusb" because I installed libusb-1.0.9 here.

I confirmed the directory of libusb.h by executing $ :locate libusb.h Then the terminal showed: /home/ubuntu/libusb-1.0.9/libusb/libusb.h /usr/local/include/libusb-1.0/libusb.h

Also confirmed where the libusb-1.0.so is /home/ubuntu/libusb-1.0.9/libusb/.libs/libusb-1.0.so /opt/ros/indigo/lib/libusb_cam.so /usr/local/lib/libusb-1.0.so

However the same error occurred. I'm not very familiar with makefile, so could you tell me where I wrote the correct information to the makefile?

Thank you very much!

jetsonhacks commented 6 years ago

I do not know the answer to your question.

Kanelankai commented 6 years ago

Thank you.