BlazingForests / realsense_camera

use realsense camera in ROS
Other
35 stars 26 forks source link

Compilation problem with Dec 5 2015 clone #17

Closed int3ll3ct closed 8 years ago

int3ll3ct commented 8 years ago

Hi there, I know I should probably submit proposed improvements through git, but I wanted to say that personally, I struggled getting the latest version of this to compile on my machine. Link errors with libusb. I changed a section of CMakefiles.txt as follows and I can now compile and run successfully:

V4L2, udev and libusb

find_package(PkgConfig REQUIRED) pkg_check_modules(V4L REQUIRED libv4l2) pkg_check_modules(UDEV REQUIRED libudev)

pkg_check_modules(LIBUSB REQUIRED libusb-1.0)

find_path(LIBUSB_INCLUDEDIR NAMES libusb.h HINTS /usr/include/libusb-1.0) find_library(LIBUSB_LIBRARIES NAMES usb-1.0 HINTS /usr/lib/ /usr/x86_64-linux-gnu/ PATH_SUFFIXES lib)

message(STATUS ${LIBUSB_INCLUDEDIR}) message(STATUS ${LIBUSB_LIBRARIES})

gmhuili commented 8 years ago

I failed too about one month ago. Even some header files couldn't be found, is this really open?

BlazingForests commented 8 years ago

Hi

@int3ll3ct I think this is a environment issue, make sure your libusb-1.0.pc file in the right configuration or any other configuration.

@gmhuili can you tell me what are the not found header files?

Thx DD

gmhuili commented 8 years ago

Hi DD,

Sorry to get back to you late! I couldn't remember exactly. Let me find some time to try again today.

Thanks, M.

gmhuili commented 8 years ago

Hi DD,

I just tried again on a new VM, I could build it this time. I'm so sorry for the irresponsible comment!

I'll try it with a R200 later.

Thanks, M.

BlazingForests commented 8 years ago

Hi @gmhuili , It doesn't matter.

But the R200 support is not ready. Because i don't have the R200 device. And the R200 is more different with F200.

I am so sorry!

Thx DD

int3ll3ct commented 8 years ago

Thanks BlazingForests, my libusb-1.0.pc contents are as follows:

prefix=/usr exec_prefix=${prefix} libdir=${prefix}/lib/x86_64-linux-gnu includedir=${prefix}/include

Name: libusbx-1.0 Description: C API for USB device access from Linux, Mac OS X, Windows and OpenBSD/NetBSD userspace Version: 1.0.17 Libs: -L${libdir} -lusb-1.0 Libs.private: -ludev -pthread Cflags: -I${includedir}/libusb-1.0

and as far as the lib files in the libdir, I see these: libusb-0.1.so.4 (link) libusb-0.1.so.4.4.4 libusb-1.0.so.0 (link) libusb-1.0.so.0.1.0

So for now, I'm just going to leave my changes in, because the time it will take me to determine in what way the build system and my system config are hosed, is just not going to be time well spent. We can close this, thank you.