This repository was archived by the owner on Feb 24, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
This repository was archived by the owner on Feb 24, 2026. It is now read-only.
build errors libusb #32
Copy link
Copy link
Open
Description
On Ubuntu 20.04.2 LTS, the following additional steps were required build and test the library.
Build Issues
Per README.md the instructions indicate to install libusb-1.0.0. I installed libusb-1.0.0-dev, however I received the following errors when attempting to compile:
nu/libGL.so -lpthread
/usr/bin/ld: ../libcmmk/out/libcmmk.so: undefined reference to `libusb_get_device_descriptor'
/usr/bin/ld: ../libcmmk/out/libcmmk.so: undefined reference to `libusb_open_device_with_vid_pid'
/usr/bin/ld: ../libcmmk/out/libcmmk.so: undefined reference to `libusb_close'
/usr/bin/ld: ../libcmmk/out/libcmmk.so: undefined reference to `libusb_init'
/usr/bin/ld: ../libcmmk/out/libcmmk.so: undefined reference to `libusb_detach_kernel_driver'
/usr/bin/ld: ../libcmmk/out/libcmmk.so: undefined reference to `libusb_kernel_driver_active'
/usr/bin/ld: ../libcmmk/out/libcmmk.so: undefined reference to `libusb_attach_kernel_driver'
/usr/bin/ld: ../libcmmk/out/libcmmk.so: undefined reference to `libusb_free_device_list'
/usr/bin/ld: ../libcmmk/out/libcmmk.so: undefined reference to `libusb_claim_interface'
/usr/bin/ld: ../libcmmk/out/libcmmk.so: undefined reference to `libusb_interrupt_transfer'
/usr/bin/ld: ../libcmmk/out/libcmmk.so: undefined reference to `libusb_get_device_list'
/usr/bin/ld: ../libcmmk/out/libcmmk.so: undefined reference to `libusb_exit'
/usr/bin/ld: ../libcmmk/out/libcmmk.so: undefined reference to `libusb_release_interface'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:172: cmmk_ctrl] Error 1
make[1]: Leaving directory '/home/tdo/Projects/cmmk_ctrl/build'
make: *** [Makefile:11: cmmk_ctrl] Error 2
I resolved the error by install the libusb-dev package which included resulted in the following packages being installed:
ii libusb-0.1-4:amd64 2:0.1.12-32 amd64 userspace USB programming library
ii libusb-1.0-0:amd64 2:1.0.23-2build1 amd64 userspace USB programming library
ii libusb-1.0-0-dev:amd64 2:1.0.23-2build1 amd64 userspace USB programming library development files
ii libusb-1.0-doc 2:1.0.23-2build1 all documentation for userspace USB programming
ii libusb-dev 2:0.1.12-32 amd64 userspace USB programming library development files
I suspect, that the references are due to depreciated functions in libusb-1.0 that were a part of libusb-0.1. For an update - I suggest the documentation be updated to reference libusb-dev or to update the code to only rely on libusb-0.1-4.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels