jetsonhacks / installLibrealsense

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

error in ./installLibrealsense.sh #5

Open elijah4rain opened 7 years ago

elijah4rain commented 7 years ago

I am installing R200 in Ubuntu 14.04 Jetson TK1 (armhf) with Kernel 3.10.40.

I followed all the tutorial and an error occurs in running ./installLibrealsense.sh The bottom shows the outputs when running each line from ~/installLibrealsense/installLibrealsense.sh

ubuntu@tegra-ubuntu:~/librealsense$ git checkout v0.9.2
M   librealsense.qtcreator/realsense.pro
M   src/uvc-v4l2.cpp
HEAD is now at c5d6b82... Merge pull request #236 from mdhorn/add-udev-debian

when I run the line patch -p 1 -i ~/installLibrealsense/arm.patch I pressed enter key at every question

ubuntu@tegra-ubuntu:~/librealsense$ patch -p 1 -i ~/installLibrealsense/arm.patch
patching file librealsense.qtcreator/realsense.pro
Reversed (or previously applied) patch detected!  Assume -R? [n] 
Apply anyway? [n] 
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file librealsense.qtcreator/realsense.pro.rej
patching file src/uvc-v4l2.cpp
Reversed (or previously applied) patch detected!  Assume -R? [n] 
Apply anyway? [n] 
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file src/uvc-v4l2.cpp.rej
sudo cp config/99-realsense-libusb.rules /etc/udev/rules.d/
sudo cp config/uvc.conf /etc/modprobe.d/
sudo udevadm control --reload-rules && udevadm trigger

These three lines had no outputs

and finally, an error when executing 'make'

ubuntu@tegra-ubuntu:~/librealsense$ make
g++ src/uvc-v4l2.cpp -std=c++11 -fPIC -pedantic -Ofast -Wno-missing-field-initializers -Wno-switch -Wno-multichar -DRS_USE_V4L2_BACKEND `pkg-config --cflags --libs libusb-1.0` -mfpu=neon -mfloat-abi=hard -ftree-vectorize -c -o obj/uvc-v4l2.o
In file included from src/uvc-v4l2.cpp:31:0:
/usr/local/include/libusb-1.0/libusb.h:750:55: warning: ISO C++ forbids zero-size array 'iso_packet_desc' [-Wpedantic]
  struct libusb_iso_packet_descriptor iso_packet_desc[0];
                                                       ^
src/uvc-v4l2.cpp: In constructor 'rsimpl::uvc::context::context()':
src/uvc-v4l2.cpp:69:128: error: 'libusb_error_name' was not declared in this scope
                 if(status < 0) throw std::runtime_error(to_string() << "libusb_init(...) returned " << libusb_error_name(status));
                                                                                                                                ^
In file included from src/uvc.h:8:0,
                 from src/uvc-v4l2.cpp:6:
src/uvc-v4l2.cpp: In destructor 'rsimpl::uvc::device::~device()':
src/uvc-v4l2.cpp:354:115: error: 'libusb_error_name' was not declared in this scope
                     if(status < 0) LOG_ERROR("libusb_release_interface(...) returned " << libusb_error_name(status));
                                                                                                                   ^
src/types.h:61:131: note: in definition of macro 'LOG'
     #define LOG(SEVERITY, ...) do { if(static_cast<int>(SEVERITY) >= rsimpl::minimum_log_severity) { std::ostringstream ss; ss << __VA_ARGS__; rsimpl::log(SEVERITY, ss.str()); } } while(false)
                                                                                                                                   ^
src/uvc-v4l2.cpp:354:36: note: in expansion of macro 'LOG_ERROR'
                     if(status < 0) LOG_ERROR("libusb_release_interface(...) returned " << libusb_error_name(status));
                                    ^
src/uvc-v4l2.cpp: In function 'std::string rsimpl::uvc::get_usb_port_id(const rsimpl::uvc::device&)':
src/uvc-v4l2.cpp:410:72: error: 'libusb_get_port_number' was not declared in this scope
                 std::to_string(libusb_get_port_number(device.usb_device));
                                                                        ^
src/uvc-v4l2.cpp: In function 'void rsimpl::uvc::claim_interface(rsimpl::uvc::device&, const rsimpl::uvc::guid&, int)':
src/uvc-v4l2.cpp:428:128: error: 'libusb_error_name' was not declared in this scope
                 if(status < 0) throw std::runtime_error(to_string() << "libusb_open(...) returned " << libusb_error_name(status));
                                                                                                                                ^
src/uvc-v4l2.cpp:432:135: error: 'libusb_error_name' was not declared in this scope
             if(status < 0) throw std::runtime_error(to_string() << "libusb_claim_interface(...) returned " << libusb_error_name(status));
                                                                                                                                       ^
src/uvc-v4l2.cpp: In function 'void rsimpl::uvc::bulk_transfer(rsimpl::uvc::device&, unsigned char, void*, int, int*, unsigned int)':
src/uvc-v4l2.cpp:440:133: error: 'libusb_error_name' was not declared in this scope
             if(status < 0) throw std::runtime_error(to_string() << "libusb_bulk_transfer(...) returned " << libusb_error_name(status));
                                                                                                                                     ^
src/uvc-v4l2.cpp: In function 'std::vector<std::shared_ptr<rsimpl::uvc::device> > rsimpl::uvc::query_devices(std::shared_ptr<rsimpl::uvc::context>)':
src/uvc-v4l2.cpp:586:135: error: 'libusb_error_name' was not declared in this scope
             if(status < 0) throw std::runtime_error(to_string() << "libusb_get_device_list(...) returned " << libusb_error_name(status));
                                                                                                                                       ^
make: *** [obj/uvc-v4l2.o] Error 1

Thanks in advance!

jetsonhacks commented 7 years ago

Which version of L4T are you using?

elijah4rain commented 7 years ago

I thought that following the tutorial will lead to L4T 21.4 but do you recommend me to install specific jetpack before I install librealsense? I found your another tutorial about installing jetpack 2.0 on jetson tk1 and was wondering if that would suffice

jetsonhacks commented 7 years ago

JetPack installs L4T, as I recall JetPack 2.0 installs L4T 21.4. Your error messages above suggest that you do not have libusb installed. That is installed in the installLibrealsense script. I could not tell if you manually installed everything, or whether you ran the script once and then tried to reinstall things again. The error messages suggest the latter.

elijah4rain commented 7 years ago

Yes, I ran the script once and tried again line by line to see where the error occured. I don't recall if I installed jetpack so I will try to install jetpack 2.0 and try again. Thank you for your timely reply and I will update on this

jetsonhacks commented 7 years ago

One of the issues appears to be that libusb was not installed. In the script, this is the line:

sudo apt-get install libusb-1.0-0-dev