libusb1 upgrade
Posted: 2020/02/28 20:11:55
Hi to all,
I'm trying to install an updated version of the libusb1 in my centos system. The system is already equipped with the libusb1.0.9 version which seems to be too old for compiling my dll. The error in compilation is:
This was actually expected and seems that can be solved using an updated libusb1 version (if i'm not wrong starting from libusb1.0.12). Now starts (for me) the difficult part. I've managed to download the installation files for the libusb1.0.12 and also to install it by running:
but now i need to link the libusb and this is where i got stucked.
Here you can find the output of my "make install" command:
Which is the correct way to link the new library? It seems (by running cmake script of my dll) that only the old libusb1.0.9 is found.
Thanks in advance for your help.
Antonio
I'm trying to install an updated version of the libusb1 in my centos system. The system is already equipped with the libusb1.0.9 version which seems to be too old for compiling my dll. The error in compilation is:
Code: Select all
error: ‘libusb_hotplug_callback_handle’ does not name a type
libusb_hotplug_callback_handle libusbHandle;
Code: Select all
./bootstrap.sh
./configure
make
sudo make install
Here you can find the output of my "make install" command:
Code: Select all
[tony@localhost libusb-1.0.12]$ sudo make install
Making install in libusb
make[1]: Entering directory `/home/tony/Desktop/libusb-1.0.12/libusb'
make[2]: Entering directory `/home/tony/Desktop/libusb-1.0.12/libusb'
test -z "/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"
/bin/sh ../libtool --mode=install /usr/bin/install -c libusb-1.0.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libusb-1.0.so.0.1.0 /usr/local/lib/libusb-1.0.so.0.1.0
libtool: install: (cd /usr/local/lib && { ln -s -f libusb-1.0.so.0.1.0 libusb-1.0.so.0 || { rm -f libusb-1.0.so.0 && ln -s libusb-1.0.so.0.1.0 libusb-1.0.so.0; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libusb-1.0.so.0.1.0 libusb-1.0.so || { rm -f libusb-1.0.so && ln -s libusb-1.0.so.0.1.0 libusb-1.0.so; }; })
libtool: install: /usr/bin/install -c .libs/libusb-1.0.lai /usr/local/lib/libusb-1.0.la
libtool: install: /usr/bin/install -c .libs/libusb-1.0.a /usr/local/lib/libusb-1.0.a
libtool: install: chmod 644 /usr/local/lib/libusb-1.0.a
libtool: install: ranlib /usr/local/lib/libusb-1.0.a
libtool: finish: PATH="/sbin:/bin:/usr/sbin:/usr/bin:/sbin" ldconfig -n /usr/local/lib
ldconfig: /usr/local/lib/libstdc++.so.6.0.22-gdb.py is not an ELF file - it has the wrong magic bytes at the start.
----------------------------------------------------------------------
Libraries have been installed in:
/usr/local/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
test -z "/usr/local/include/libusb-1.0" || /bin/mkdir -p "/usr/local/include/libusb-1.0"
/usr/bin/install -c -m 644 libusb.h '/usr/local/include/libusb-1.0'
make[2]: Leaving directory `/home/tony/Desktop/libusb-1.0.12/libusb'
make[1]: Leaving directory `/home/tony/Desktop/libusb-1.0.12/libusb'
Making install in doc
make[1]: Entering directory `/home/tony/Desktop/libusb-1.0.12/doc'
make[2]: Entering directory `/home/tony/Desktop/libusb-1.0.12/doc'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/home/tony/Desktop/libusb-1.0.12/doc'
make[1]: Leaving directory `/home/tony/Desktop/libusb-1.0.12/doc'
make[1]: Entering directory `/home/tony/Desktop/libusb-1.0.12'
make[2]: Entering directory `/home/tony/Desktop/libusb-1.0.12'
make[2]: Nothing to be done for `install-exec-am'.
test -z "/usr/local/lib/pkgconfig" || /bin/mkdir -p "/usr/local/lib/pkgconfig"
/usr/bin/install -c -m 644 libusb-1.0.pc '/usr/local/lib/pkgconfig'
make[2]: Leaving directory `/home/tony/Desktop/libusb-1.0.12'
make[1]: Leaving directory `/home/tony/Desktop/libusb-1.0.12'
[tony@localhost libusb-1.0.12]$
Thanks in advance for your help.
Antonio