libusb-dev package instalation problem
Posted: 09 Feb 2012, 16:46
Hi
I'm running PCLinuxOS release 2008 (PCLinuxOS Gnome) for i586
Kernel 2.6.22.15.tex3 on an i686 /\l on an old laptop Compaq Evo N1050v
I was trying to make install usb-modeswitch-1.2.3 and received a lot of errors:
[root@localhost usb-modeswitch-1.2.3]# make install
gcc -o usb_modeswitch usb_modeswitch.c -Wall -l usb
usb_modeswitch.c:58:17: error: usb.h: No such file or directory
In file included from usb_modeswitch.c:59:
usb_modeswitch.h:53: warning: ?struct usb_dev_handle? declared inside parameter list
usb_modeswitch.h:53: warning: its scope is only this definition or declaration, which is probably not what you want
usb_modeswitch.c: In function ?main?:
usb_modeswitch.c:416: warning: implicit declaration of function ?usb_init?
usb_modeswitch.c:419: warning: implicit declaration of function ?usb_set_debug?
usb_modeswitch.c:421: warning: implicit declaration of function ?usb_find_busses?
usb_modeswitch.c:422: warning: implicit declaration of function ?usb_find_devices?
usb_modeswitch.c:448: error: dereferencing pointer to incomplete type
usb_modeswitch.c:449: error: dereferencing pointer to incomplete type
usb_modeswitch.c:452: warning: implicit declaration of function ?usb_open?
usb_modeswitch.c:452: warning: assignment makes pointer from integer without a cast
usb_modeswitch.c:465: warning: passing argument 1 of ?get_current_configuration? from incompatible pointer type
usb_modeswitch.c:472: error: dereferencing pointer to incomplete type
usb_modeswitch.c:489: error: dereferencing pointer to incomplete type
usb_modeswitch.c:612: warning: passing argument 1 of ?get_current_configuration? from incompatible pointer type
usb_modeswitch.c:630: warning: implicit declaration of function ?usb_close?
... and the list goes on. I found the solution somewhere else on this forum that simply stated that this error indicates one requires the libusb-dev (developement package). I searched for it and downloaded libusb-1.0.8 (I don't know whether this is the correct package because I simply cannot find "libusb-dev" anywhere and don't know whether there is a difference between "libusb" and "libusb-dev" but as I said, cannot find the dev package anywhere.
Nevertheless, I proceeded to install the libusb-1.0.8 package and all appeared to have gone down fine:
libusb-1.0.8
[root@localhost libusb-1.0.8]# make install
Making install in libusb
make[1]: Entering directory `/home/isja/tmp/libusb-1.0.8/libusb'
make[2]: Entering directory `/home/isja/tmp/libusb-1.0.8/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.0.0 /usr/local/lib/libusb-1.0.so.0.0.0
libtool: install: (cd /usr/local/lib && { ln -s -f libusb-1.0.so.0.0.0 libusb-1.0.so.0 || { rm -f libusb-1.0.so.0 && ln -s libusb-1.0.so.0.0.0 libusb-1.0.so.0; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libusb-1.0.so.0.0.0 libusb-1.0.so || { rm -f libusb-1.0.so && ln -s libusb-1.0.so.0.0.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="/usr/sbin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/usr/games:/home/isja/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
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/isja/tmp/libusb-1.0.8/libusb'
make[1]: Leaving directory `/home/isja/tmp/libusb-1.0.8/libusb'
Making install in doc
make[1]: Entering directory `/home/isja/tmp/libusb-1.0.8/doc'
make[2]: Entering directory `/home/isja/tmp/libusb-1.0.8/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/isja/tmp/libusb-1.0.8/doc'
make[1]: Leaving directory `/home/isja/tmp/libusb-1.0.8/doc'
make[1]: Entering directory `/home/isja/tmp/libusb-1.0.8'
make[2]: Entering directory `/home/isja/tmp/libusb-1.0.8'
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/isja/tmp/libusb-1.0.8'
make[1]: Leaving directory `/home/isja/tmp/libusb-1.0.8'
[root@localhost libusb-1.0.8]#
After this, I tried installing the usb-modeswitch-1.2.3 again with the same error as above.
I unfortunately don't understand the concept of libraries at all and the more I read about it, the less I understand it. It seems as though libusb was successfully deployed however I don't know what to do from here? linking the library to executables (there are no executables in usb-modeswitch that I can see) and the concept of static and shared libraries is just as confusing.
All I really need is for my Huawei dongle not to act as a flash drive. I managed to install usb-modeswitch on a Apacer laptop before which was pretty straight forward and none of these library and dev package issues and works fine there.
Please help!
I'm running PCLinuxOS release 2008 (PCLinuxOS Gnome) for i586
Kernel 2.6.22.15.tex3 on an i686 /\l on an old laptop Compaq Evo N1050v
I was trying to make install usb-modeswitch-1.2.3 and received a lot of errors:
[root@localhost usb-modeswitch-1.2.3]# make install
gcc -o usb_modeswitch usb_modeswitch.c -Wall -l usb
usb_modeswitch.c:58:17: error: usb.h: No such file or directory
In file included from usb_modeswitch.c:59:
usb_modeswitch.h:53: warning: ?struct usb_dev_handle? declared inside parameter list
usb_modeswitch.h:53: warning: its scope is only this definition or declaration, which is probably not what you want
usb_modeswitch.c: In function ?main?:
usb_modeswitch.c:416: warning: implicit declaration of function ?usb_init?
usb_modeswitch.c:419: warning: implicit declaration of function ?usb_set_debug?
usb_modeswitch.c:421: warning: implicit declaration of function ?usb_find_busses?
usb_modeswitch.c:422: warning: implicit declaration of function ?usb_find_devices?
usb_modeswitch.c:448: error: dereferencing pointer to incomplete type
usb_modeswitch.c:449: error: dereferencing pointer to incomplete type
usb_modeswitch.c:452: warning: implicit declaration of function ?usb_open?
usb_modeswitch.c:452: warning: assignment makes pointer from integer without a cast
usb_modeswitch.c:465: warning: passing argument 1 of ?get_current_configuration? from incompatible pointer type
usb_modeswitch.c:472: error: dereferencing pointer to incomplete type
usb_modeswitch.c:489: error: dereferencing pointer to incomplete type
usb_modeswitch.c:612: warning: passing argument 1 of ?get_current_configuration? from incompatible pointer type
usb_modeswitch.c:630: warning: implicit declaration of function ?usb_close?
... and the list goes on. I found the solution somewhere else on this forum that simply stated that this error indicates one requires the libusb-dev (developement package). I searched for it and downloaded libusb-1.0.8 (I don't know whether this is the correct package because I simply cannot find "libusb-dev" anywhere and don't know whether there is a difference between "libusb" and "libusb-dev" but as I said, cannot find the dev package anywhere.
Nevertheless, I proceeded to install the libusb-1.0.8 package and all appeared to have gone down fine:
libusb-1.0.8
[root@localhost libusb-1.0.8]# make install
Making install in libusb
make[1]: Entering directory `/home/isja/tmp/libusb-1.0.8/libusb'
make[2]: Entering directory `/home/isja/tmp/libusb-1.0.8/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.0.0 /usr/local/lib/libusb-1.0.so.0.0.0
libtool: install: (cd /usr/local/lib && { ln -s -f libusb-1.0.so.0.0.0 libusb-1.0.so.0 || { rm -f libusb-1.0.so.0 && ln -s libusb-1.0.so.0.0.0 libusb-1.0.so.0; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libusb-1.0.so.0.0.0 libusb-1.0.so || { rm -f libusb-1.0.so && ln -s libusb-1.0.so.0.0.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="/usr/sbin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/usr/games:/home/isja/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
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/isja/tmp/libusb-1.0.8/libusb'
make[1]: Leaving directory `/home/isja/tmp/libusb-1.0.8/libusb'
Making install in doc
make[1]: Entering directory `/home/isja/tmp/libusb-1.0.8/doc'
make[2]: Entering directory `/home/isja/tmp/libusb-1.0.8/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/isja/tmp/libusb-1.0.8/doc'
make[1]: Leaving directory `/home/isja/tmp/libusb-1.0.8/doc'
make[1]: Entering directory `/home/isja/tmp/libusb-1.0.8'
make[2]: Entering directory `/home/isja/tmp/libusb-1.0.8'
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/isja/tmp/libusb-1.0.8'
make[1]: Leaving directory `/home/isja/tmp/libusb-1.0.8'
[root@localhost libusb-1.0.8]#
After this, I tried installing the usb-modeswitch-1.2.3 again with the same error as above.
I unfortunately don't understand the concept of libraries at all and the more I read about it, the less I understand it. It seems as though libusb was successfully deployed however I don't know what to do from here? linking the library to executables (there are no executables in usb-modeswitch that I can see) and the concept of static and shared libraries is just as confusing.
All I really need is for my Huawei dongle not to act as a flash drive. I managed to install usb-modeswitch on a Apacer laptop before which was pretty straight forward and none of these library and dev package issues and works fine there.
Please help!