Dynamically load libudev in linux-hidraw backend #788

Open
falkTX wants to merge 6 commits from falkTX/linux-dynamic-libudev into master
falkTX commented 2026-04-24 05:32:52 -05:00 (Migrated from github.com)

This PR removes the direct build and link dependency on libudev from the Linux hidraw backend. The backend now loads libudev.so.1 at runtime, so applications that link hidapi do not inherit a direct libudev dependency. Systems using the hidraw backend still need the libudev runtime library.

Implementation

  • Load libudev with a scoped RTLD_NOW | RTLD_LOCAL handle.
  • Resolve the exact libudev entry points used by hidapi and report missing-library or missing-symbol failures through hid_error().
  • Clear all resolved function pointers and close the handle on partial initialization failure and during hid_exit().
  • Remove the included LGPL loader source and the libudev development/pkg-config dependency.
  • Propagate the platform dynamic-loader library through CMake, Autotools, the manual Makefile, pkg-config, and installed static CMake exports.
  • Update Linux documentation and CI to install runtime-only packages (libudev1 on Ubuntu and eudev-libs on Alpine).
  • Add shared/static lifecycle tests for reloads, partial symbol-resolution failures, recovery, and balanced dlopen/dlclose cleanup.

Validation

  • Strict-warning shared and static CMake builds and CTests.
  • Shared ASAN CMake build and CTests.
  • Full CMake build with both Linux backends.
  • Fresh Autotools bootstrap/configure/build and distribution generation.
  • Manual Makefile build.
  • Installed static CMake consumer with libudev pkg-config metadata unavailable.

Assisted-by: codex:gpt-5.6-sol

This PR removes the direct build and link dependency on libudev from the Linux hidraw backend. The backend now loads `libudev.so.1` at runtime, so applications that link hidapi do not inherit a direct libudev dependency. Systems using the hidraw backend still need the libudev runtime library. ## Implementation - Load libudev with a scoped `RTLD_NOW | RTLD_LOCAL` handle. - Resolve the exact libudev entry points used by hidapi and report missing-library or missing-symbol failures through `hid_error()`. - Clear all resolved function pointers and close the handle on partial initialization failure and during `hid_exit()`. - Remove the included LGPL loader source and the libudev development/pkg-config dependency. - Propagate the platform dynamic-loader library through CMake, Autotools, the manual Makefile, pkg-config, and installed static CMake exports. - Update Linux documentation and CI to install runtime-only packages (`libudev1` on Ubuntu and `eudev-libs` on Alpine). - Add shared/static lifecycle tests for reloads, partial symbol-resolution failures, recovery, and balanced `dlopen`/`dlclose` cleanup. ## Validation - Strict-warning shared and static CMake builds and CTests. - Shared ASAN CMake build and CTests. - Full CMake build with both Linux backends. - Fresh Autotools bootstrap/configure/build and distribution generation. - Manual Makefile build. - Installed static CMake consumer with libudev pkg-config metadata unavailable. Assisted-by: codex:gpt-5.6-sol
mcuee commented 2026-04-24 05:39:49 -05:00 (Migrated from github.com)

The build failed under Ubuntu and Arch Linux.

The build failed under Ubuntu and Arch Linux.
falkTX commented 2026-04-24 05:53:44 -05:00 (Migrated from github.com)

The build failed under Ubuntu and Arch Linux.

Related to more strict warnings, likely fixed now.

> The build failed under Ubuntu and Arch Linux. Related to more strict warnings, likely fixed now.
mcuee commented 2026-04-24 07:24:43 -05:00 (Migrated from github.com)

The build failed under Ubuntu and Arch Linux.

Related to more strict warnings, likely fixed now.

Not yet...

> > The build failed under Ubuntu and Arch Linux. > > Related to more strict warnings, likely fixed now. Not yet...
falkTX commented 2026-04-24 07:25:41 -05:00 (Migrated from github.com)

The build failed under Ubuntu and Arch Linux.

Related to more strict warnings, likely fixed now.

Not yet...

I built locally with the same pedantic flags and pushed another try.

> > > The build failed under Ubuntu and Arch Linux. > > > > > > Related to more strict warnings, likely fixed now. > > Not yet... I built locally with the same pedantic flags and pushed another try.
Youw (Migrated from github.com) reviewed 2026-04-24 15:10:45 -05:00
Youw (Migrated from github.com) left a comment

I don't mind the idea of having libudev loaded dynamically in runtime, but I can't agree that the current aproach is best for that. A few points I'd ask to change if I where to accept it this way:

  • licence shouldn't derive from libudev license - we don't copy-paste their code, and HIDAPI uses a bit different licencing sceme, and the new source that becomes a part of HIDAPI would potentially restrict its users;
  • including the .c file for this purpose looks a bit ugly, and the name libudev.c suggests that it actually is (i.e. implements) libudev, but in fact it is only a wrapper; what is best instead - have a hidapi_libudev_wrap.h, and all functions inside should be either static or inline;
  • the C() macro... I checked - it is a valid C, but the fact that I had to go and double-check suggests that it looks like something that might break; HIDAPI_UDEV_RESOLVE wouldn't raise any naming suspicious
  • RTLD_GLOBAL - that is a code smell to use it here, where passing the _lib (or rather udev_lib_handle to dlsym) explicitly is what I'd expect
  • no dlclose which is technically a resource leak if HIDAPI itself is ever to be dynamically loaded

At the end of the day - I'd be much happier to see a more common way of dynamically loading a library during the initialisation, saving and using function pointers explicitly and unloading a library during the hid_exit, e.g. like we did it for windows backend.

Yes that would cause a lot more changes in linux/hid.c - but that's absolutely fine.

I don't mind the idea of having libudev loaded dynamically in runtime, but I can't agree that the current aproach is best for that. A few points I'd ask to change if I where to accept it this way: - licence shouldn't derive from libudev license - we don't copy-paste their code, and HIDAPI uses a bit different licencing sceme, and the new source that becomes a part of HIDAPI would potentially restrict its users; - including the `.c` file for this purpose looks a bit ugly, and the name `libudev.c` suggests that it _actually is_ (i.e. implements) libudev, but in fact it is only a wrapper; what is best instead - have a `hidapi_libudev_wrap.h`, and all functions inside should be either static or inline; - the `C()` macro... I checked - it is a valid C, but the fact that I had to go and double-check suggests that it looks like something that might break; `HIDAPI_UDEV_RESOLVE` wouldn't raise any naming suspicious - `RTLD_GLOBAL` - that is a code smell to use it here, where passing the `_lib` (or rather `udev_lib_handle` to `dlsym`) explicitly is what I'd expect - no `dlclose` which is technically a resource leak if HIDAPI itself is ever to be dynamically loaded --- At the end of the day - I'd be much happier to see a more common way of dynamically loading a library during the initialisation, saving and using function pointers explicitly and unloading a library during the hid_exit, e.g. like we did it for [windows](https://github.com/libusb/hidapi/blob/657b9fa147722ad59d045965e625d3972fa1264c/windows/hid.c#L141) backend. Yes that would cause a lot more changes in linux/hid.c - but that's absolutely fine.
@ -13,3 +12,1 @@
pkg_check_modules(libudev REQUIRED IMPORTED_TARGET libudev)
target_link_libraries(hidapi_hidraw PRIVATE PkgConfig::libudev Threads::Threads)
target_link_libraries(hidapi_hidraw PRIVATE Threads::Threads ${CMAKE_DL_LIBS})
Youw (Migrated from github.com) commented 2026-04-24 15:10:41 -05:00

the documentation and CI scripts also needs to be updated - now the libudev-dev no longer required and only the libudev1 is needed

the documentation and CI scripts also needs to be updated - now the `libudev-dev` no longer required and only the `libudev1` is needed
falkTX commented 2026-04-24 15:51:07 -05:00 (Migrated from github.com)

That is all very fair, I mostly did this change as a way to get my cross-compilation builds working and decided to push it upstream because why not.

You have good points for something that would be integrated officially in hidapi, but sorry to say my needs are covered already as-is, the steps you mention make sense but sound like it would be quite a bit more work than I am willing to spend just for a small feature.

If you think the feature is worthwhile, take all the code here to adapt freely under any license, I give written consent.
This is as far as I go though, perhaps someone else can take over now.
Or otherwise feel free to close the PR too, I can understand that too.

That is all very fair, I mostly did this change as a way to get my cross-compilation builds working and decided to push it upstream because why not. You have good points for something that would be integrated officially in hidapi, but sorry to say my needs are covered already as-is, the steps you mention make sense but sound like it would be quite a bit more work than I am willing to spend just for a small feature. If you think the feature is worthwhile, take all the code here to adapt freely under any license, I give written consent. This is as far as I go though, perhaps someone else can take over now. Or otherwise feel free to close the PR too, I can understand that too.
Youw commented 2026-04-25 06:26:34 -05:00 (Migrated from github.com)

Thanks for the contribution.

I'll leave it be for now, in case anyone wants to catch up.

Thanks for the contribution. I'll leave it be for now, in case anyone wants to catch up.
Youw (Migrated from github.com) approved these changes 2026-07-30 17:29:57 -05:00
Youw commented 2026-07-30 17:31:18 -05:00 (Migrated from github.com)

Anyone care to try this out?

Anyone care to try this out?
mcuee commented 2026-07-30 18:16:54 -05:00 (Migrated from github.com)

Anyone care to try this out?

Just wondering how to properly test this PR. Thanks.

> Anyone care to try this out? Just wondering how to properly test this PR. Thanks.
Youw commented 2026-07-31 03:58:29 -05:00 (Migrated from github.com)
  • Ensure no libudev-dev package is installed (so libudev.h is not available)
  • Build locally from sources
  • Run and verify that enumeration/etc. works as usual
- Ensure no `libudev-dev` package is installed (so `libudev.h` is not available) - Build locally from sources - Run and verify that enumeration/etc. works as usual
mcuee commented 2026-08-06 21:18:51 -05:00 (Migrated from github.com)
  • Ensure no libudev-dev package is installed (so libudev.h is not available)
  • Build locally from sources
  • Run and verify that enumeration/etc. works as usual

I see. Let me carry out some simple tests over the weekend or next week.

> * Ensure no `libudev-dev` package is installed (so `libudev.h` is not available) > * Build locally from sources > * Run and verify that enumeration/etc. works as usual I see. Let me carry out some simple tests over the weekend or next week.
mcuee commented 2026-08-13 04:45:23 -05:00 (Migrated from github.com)

Looks okay to me. I rename libudev.h to libudev_org.h.

Tested with both auto-tools and CMake.

CMake runlog.

mcuee  …/hidapi_pr788/build_cmake   linux-dynamic-libudev ?  17:41  ls -la /usr/include/libudev*
-rw-r--r-- 1 root root 9.7K Mar 13 23:35 /usr/include/libudev_org.h

mcuee  …/hidapi_pr788/build_cmake   linux-dynamic-libudev ?  17:39  cmake -DHIDAPI_BUILD_HIDTEST=ON -DHIDAPI_WITH_TESTS=ON ..
-- The C compiler identification is GNU 15.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- hidapi: v0.16.0
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found PkgConfig: /usr/bin/pkg-config (found version "2.5.1")
-- Checking for module 'libusb-1.0>=1.0.9'
--   Found libusb-1.0, version 1.0.30
-- Check for Iconv
-- Performing Test Iconv_IS_BUILT_IN
-- Performing Test Iconv_IS_BUILT_IN - Success
-- Found Iconv: built in to C library
-- Performing Test HIDAPI_ICONV_CONST
-- Performing Test HIDAPI_ICONV_CONST - Failed
-- Building hidtest
-- Configuring done (0.4s)
-- Generating done (0.0s)
-- Build files have been written to: /home/mcuee/build/libusb/hidapi_pr788/build_cmake

mcuee  …/hidapi_pr788/build_cmake   linux-dynamic-libudev ?  17:41  make
[  5%] Building C object src/linux/CMakeFiles/hidapi_hidraw.dir/hid.c.o
[ 10%] Linking C shared library libhidapi-hidraw.so
[ 10%] Built target hidapi_hidraw
[ 15%] Building C object src/linux/test/CMakeFiles/hidapi_test_dlopen_interposer.dir/dlopen_interposer.c.o
[ 20%] Linking C shared library libhidapi_test_dlopen_interposer.so
[ 20%] Built target hidapi_test_dlopen_interposer
[ 25%] Building C object src/linux/test/CMakeFiles/hidapi_test_incomplete_udev.dir/incomplete_udev.c.o
[ 30%] Linking C shared library libhidapi_test_incomplete_udev.so
[ 30%] Built target hidapi_test_incomplete_udev
[ 35%] Building C object src/linux/test/CMakeFiles/hidapi_hidraw_loader_test.dir/hidapi_hidraw_loader_test.c.o
[ 40%] Linking C executable hidapi_hidraw_loader_test
[ 40%] Built target hidapi_hidraw_loader_test
[ 45%] Building C object src/libusb/CMakeFiles/hidapi_libusb.dir/hid.c.o
[ 50%] Linking C shared library libhidapi-libusb.so
[ 50%] Built target hidapi_libusb
[ 55%] Building C object hidtest/CMakeFiles/hidtest_hidraw.dir/test.c.o
[ 60%] Linking C executable hidtest_hidraw
[ 60%] Built target hidtest_hidraw
[ 65%] Building C object hidtest/CMakeFiles/hidtest_libusb.dir/test.c.o
[ 70%] Linking C executable hidtest_libusb
[ 70%] Built target hidtest_libusb
[ 75%] Building C object src/tests/CMakeFiles/DeviceIO_hidraw.dir/test_device_io.c.o
[ 80%] Building C object src/tests/CMakeFiles/DeviceIO_hidraw.dir/test_virtual_device_uhid.c.o
[ 85%] Linking C executable DeviceIO_hidraw
[ 85%] Built target DeviceIO_hidraw
[ 90%] Building C object src/tests/CMakeFiles/DeviceIO_libusb.dir/test_device_io.c.o
[ 95%] Building C object src/tests/CMakeFiles/DeviceIO_libusb.dir/test_virtual_device_rawgadget.c.o
[100%] Linking C executable DeviceIO_libusb
[100%] Built target DeviceIO_libusb

mcuee  …/hidapi_pr788/build_cmake   linux-dynamic-libudev ?  17:41  ldd ./hidtest/hidtest_hidraw 
	linux-vdso.so.1 (0x000070c2e7858000)
	libhidapi-hidraw.so.0 => /home/mcuee/build/libusb/hidapi_pr788/build_cmake/src/linux/libhidapi-hidraw.so.0 (0x000070c2e7842000)
	libc.so.6 => /usr/lib/x86_64-linux-gnu/libc.so.6 (0x000070c2e7600000)
	/lib64/ld-linux-x86-64.so.2 (0x000070c2e785a000)

mcuee  …/hidapi_pr788/build_cmake   linux-dynamic-libudev ?  17:44  ldd ./hidtest/hidtest_libusb 
	linux-vdso.so.1 (0x0000700a1ba60000)
	libhidapi-libusb.so.0 => /home/mcuee/build/libusb/hidapi_pr788/build_cmake/src/libusb/libhidapi-libusb.so.0 (0x0000700a1ba44000)
	libc.so.6 => /usr/lib/x86_64-linux-gnu/libc.so.6 (0x0000700a1b800000)
	libusb-1.0.so.0 => /usr/local/lib/libusb-1.0.so.0 (0x0000700a1b7dd000)
	/lib64/ld-linux-x86-64.so.2 (0x0000700a1ba62000)
	libudev.so.1 => /usr/lib/x86_64-linux-gnu/libudev.so.1 (0x0000700a1b796000)

mcuee  …/hidapi_pr788/build_cmake   linux-dynamic-libudev ?  17:44  ./hidtest/hidtest_hidraw 
hidapi test/example tool. Compiled with hidapi version 0.16.0, runtime version 0.16.0.
Compile-time version matches runtime version of hidapi.

Device Found
  type: 16c0 05dc
  path: /dev/hidraw4
  serial_number: 0001
  Manufacturer: www.fischl.de
  Product:      USBasp
  Release:      110
  Interface:    1
  Usage (page): 0x1 (0xff00)
  Bus type: 1 (USB)

  Report Descriptor: Unable to open device by path
Device Found
  type: 9975 7000
  path: /dev/hidraw0
  serial_number: 74114455046E4028
  Manufacturer: Funge Electronics Co., Ltd
  Product:      Inphic IN9 SLE
  Release:      4
  Interface:    0
  Usage (page): 0x2 (0x1)
  Bus type: 1 (USB)

  Report Descriptor: Unable to open device by path
Device Found
  type: 9975 7000
  path: /dev/hidraw1
  serial_number: 74114455046E4028
  Manufacturer: Funge Electronics Co., Ltd
  Product:      Inphic IN9 SLE
  Release:      4
  Interface:    1
  Usage (page): 0x6 (0x1)
  Bus type: 1 (USB)

  Report Descriptor: Unable to open device by path
Device Found
  type: 9975 7000
  path: /dev/hidraw2
  serial_number: 74114455046E4028
  Manufacturer: Funge Electronics Co., Ltd
  Product:      Inphic IN9 SLE
  Release:      4
  Interface:    2
  Usage (page): 0x6 (0x1)
  Bus type: 1 (USB)

  Report Descriptor: Unable to open device by path
Device Found
  type: 9975 7000
  path: /dev/hidraw2
  serial_number: 74114455046E4028
  Manufacturer: Funge Electronics Co., Ltd
  Product:      Inphic IN9 SLE
  Release:      4
  Interface:    2
  Usage (page): 0x80 (0x1)
  Bus type: 1 (USB)

  Report Descriptor: Unable to open device by path
Device Found
  type: 9975 7000
  path: /dev/hidraw2
  serial_number: 74114455046E4028
  Manufacturer: Funge Electronics Co., Ltd
  Product:      Inphic IN9 SLE
  Release:      4
  Interface:    2
  Usage (page): 0x1 (0xc)
  Bus type: 1 (USB)

  Report Descriptor: Unable to open device by path
Device Found
  type: 9975 7000
  path: /dev/hidraw2
  serial_number: 74114455046E4028
  Manufacturer: Funge Electronics Co., Ltd
  Product:      Inphic IN9 SLE
  Release:      4
  Interface:    2
  Usage (page): 0x10 (0xff10)
  Bus type: 1 (USB)

  Report Descriptor: Unable to open device by path
Device Found
  type: 093a 3835
  path: /dev/hidraw3
  serial_number: 
  Manufacturer: 
  Product:      PIXA3835:00 093A:3835
  Release:      0
  Interface:    -1
  Usage (page): 0x2 (0x1)
  Bus type: 3 (I2C)

  Report Descriptor: Unable to open device by path
Device Found
  type: 093a 3835
  path: /dev/hidraw3
  serial_number: 
  Manufacturer: 
  Product:      PIXA3835:00 093A:3835
  Release:      0
  Interface:    -1
  Usage (page): 0x5 (0xd)
  Bus type: 3 (I2C)

  Report Descriptor: Unable to open device by path
Device Found
  type: 093a 3835
  path: /dev/hidraw3
  serial_number: 
  Manufacturer: 
  Product:      PIXA3835:00 093A:3835
  Release:      0
  Interface:    -1
  Usage (page): 0xe (0xd)
  Bus type: 3 (I2C)

  Report Descriptor: Unable to open device by path
Device Found
  type: 093a 3835
  path: /dev/hidraw3
  serial_number: 
  Manufacturer: 
  Product:      PIXA3835:00 093A:3835
  Release:      0
  Interface:    -1
  Usage (page): 0x6 (0x1)
  Bus type: 3 (I2C)

  Report Descriptor: Unable to open device by path
Device Found
  type: 093a 3835
  path: /dev/hidraw3
  serial_number: 
  Manufacturer: 
  Product:      PIXA3835:00 093A:3835
  Release:      0
  Interface:    -1
  Usage (page): 0x1 (0xff00)
  Bus type: 3 (I2C)

  Report Descriptor: Unable to open device by path
Device Found
  type: 093a 3835
  path: /dev/hidraw3
  serial_number: 
  Manufacturer: 
  Product:      PIXA3835:00 093A:3835
  Release:      0
  Interface:    -1
  Usage (page): 0x1 (0xc)
  Bus type: 3 (I2C)

  Report Descriptor: Unable to open device by path
unable to open device

mcuee  …/hidapi_pr788/build_cmake   linux-dynamic-libudev ?  17:41  ./hidtest/hidtest_libusb 
hidapi test/example tool. Compiled with hidapi version 0.16.0, runtime version 0.16.0.
Compile-time version matches runtime version of hidapi.

Device Found
  type: 9975 7000
  path: 3-6:1.0
  serial_number: (null)
  Manufacturer: (null)
  Product:      (null)
  Release:      4
  Interface:    0
  Usage (page): 0x0 (0x0)
  Bus type: 1 (USB)

  Report Descriptor: Unable to open device by path
Device Found
  type: 9975 7000
  path: 3-6:1.1
  serial_number: (null)
  Manufacturer: (null)
  Product:      (null)
  Release:      4
  Interface:    1
  Usage (page): 0x0 (0x0)
  Bus type: 1 (USB)

  Report Descriptor: Unable to open device by path
Device Found
  type: 9975 7000
  path: 3-6:1.2
  serial_number: (null)
  Manufacturer: (null)
  Product:      (null)
  Release:      4
  Interface:    2
  Usage (page): 0x0 (0x0)
  Bus type: 1 (USB)

  Report Descriptor: Unable to open device by path
Device Found
  type: 16c0 05dc
  path: 3-2.1:1.1
  serial_number: (null)
  Manufacturer: (null)
  Product:      (null)
  Release:      110
  Interface:    1
  Usage (page): 0x0 (0x0)
  Bus type: 1 (USB)

  Report Descriptor: Unable to open device by path
unable to open device

Looks okay to me. I rename libudev.h to libudev_org.h. Tested with both auto-tools and CMake. CMake runlog. ``` mcuee  …/hidapi_pr788/build_cmake   linux-dynamic-libudev ?  17:41  ls -la /usr/include/libudev* -rw-r--r-- 1 root root 9.7K Mar 13 23:35 /usr/include/libudev_org.h mcuee  …/hidapi_pr788/build_cmake   linux-dynamic-libudev ?  17:39  cmake -DHIDAPI_BUILD_HIDTEST=ON -DHIDAPI_WITH_TESTS=ON .. -- The C compiler identification is GNU 15.2.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- hidapi: v0.16.0 -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE -- Found PkgConfig: /usr/bin/pkg-config (found version "2.5.1") -- Checking for module 'libusb-1.0>=1.0.9' -- Found libusb-1.0, version 1.0.30 -- Check for Iconv -- Performing Test Iconv_IS_BUILT_IN -- Performing Test Iconv_IS_BUILT_IN - Success -- Found Iconv: built in to C library -- Performing Test HIDAPI_ICONV_CONST -- Performing Test HIDAPI_ICONV_CONST - Failed -- Building hidtest -- Configuring done (0.4s) -- Generating done (0.0s) -- Build files have been written to: /home/mcuee/build/libusb/hidapi_pr788/build_cmake mcuee  …/hidapi_pr788/build_cmake   linux-dynamic-libudev ?  17:41  make [ 5%] Building C object src/linux/CMakeFiles/hidapi_hidraw.dir/hid.c.o [ 10%] Linking C shared library libhidapi-hidraw.so [ 10%] Built target hidapi_hidraw [ 15%] Building C object src/linux/test/CMakeFiles/hidapi_test_dlopen_interposer.dir/dlopen_interposer.c.o [ 20%] Linking C shared library libhidapi_test_dlopen_interposer.so [ 20%] Built target hidapi_test_dlopen_interposer [ 25%] Building C object src/linux/test/CMakeFiles/hidapi_test_incomplete_udev.dir/incomplete_udev.c.o [ 30%] Linking C shared library libhidapi_test_incomplete_udev.so [ 30%] Built target hidapi_test_incomplete_udev [ 35%] Building C object src/linux/test/CMakeFiles/hidapi_hidraw_loader_test.dir/hidapi_hidraw_loader_test.c.o [ 40%] Linking C executable hidapi_hidraw_loader_test [ 40%] Built target hidapi_hidraw_loader_test [ 45%] Building C object src/libusb/CMakeFiles/hidapi_libusb.dir/hid.c.o [ 50%] Linking C shared library libhidapi-libusb.so [ 50%] Built target hidapi_libusb [ 55%] Building C object hidtest/CMakeFiles/hidtest_hidraw.dir/test.c.o [ 60%] Linking C executable hidtest_hidraw [ 60%] Built target hidtest_hidraw [ 65%] Building C object hidtest/CMakeFiles/hidtest_libusb.dir/test.c.o [ 70%] Linking C executable hidtest_libusb [ 70%] Built target hidtest_libusb [ 75%] Building C object src/tests/CMakeFiles/DeviceIO_hidraw.dir/test_device_io.c.o [ 80%] Building C object src/tests/CMakeFiles/DeviceIO_hidraw.dir/test_virtual_device_uhid.c.o [ 85%] Linking C executable DeviceIO_hidraw [ 85%] Built target DeviceIO_hidraw [ 90%] Building C object src/tests/CMakeFiles/DeviceIO_libusb.dir/test_device_io.c.o [ 95%] Building C object src/tests/CMakeFiles/DeviceIO_libusb.dir/test_virtual_device_rawgadget.c.o [100%] Linking C executable DeviceIO_libusb [100%] Built target DeviceIO_libusb mcuee  …/hidapi_pr788/build_cmake   linux-dynamic-libudev ?  17:41  ldd ./hidtest/hidtest_hidraw linux-vdso.so.1 (0x000070c2e7858000) libhidapi-hidraw.so.0 => /home/mcuee/build/libusb/hidapi_pr788/build_cmake/src/linux/libhidapi-hidraw.so.0 (0x000070c2e7842000) libc.so.6 => /usr/lib/x86_64-linux-gnu/libc.so.6 (0x000070c2e7600000) /lib64/ld-linux-x86-64.so.2 (0x000070c2e785a000) mcuee  …/hidapi_pr788/build_cmake   linux-dynamic-libudev ?  17:44  ldd ./hidtest/hidtest_libusb linux-vdso.so.1 (0x0000700a1ba60000) libhidapi-libusb.so.0 => /home/mcuee/build/libusb/hidapi_pr788/build_cmake/src/libusb/libhidapi-libusb.so.0 (0x0000700a1ba44000) libc.so.6 => /usr/lib/x86_64-linux-gnu/libc.so.6 (0x0000700a1b800000) libusb-1.0.so.0 => /usr/local/lib/libusb-1.0.so.0 (0x0000700a1b7dd000) /lib64/ld-linux-x86-64.so.2 (0x0000700a1ba62000) libudev.so.1 => /usr/lib/x86_64-linux-gnu/libudev.so.1 (0x0000700a1b796000) mcuee  …/hidapi_pr788/build_cmake   linux-dynamic-libudev ?  17:44  ./hidtest/hidtest_hidraw hidapi test/example tool. Compiled with hidapi version 0.16.0, runtime version 0.16.0. Compile-time version matches runtime version of hidapi. Device Found type: 16c0 05dc path: /dev/hidraw4 serial_number: 0001 Manufacturer: www.fischl.de Product: USBasp Release: 110 Interface: 1 Usage (page): 0x1 (0xff00) Bus type: 1 (USB) Report Descriptor: Unable to open device by path Device Found type: 9975 7000 path: /dev/hidraw0 serial_number: 74114455046E4028 Manufacturer: Funge Electronics Co., Ltd Product: Inphic IN9 SLE Release: 4 Interface: 0 Usage (page): 0x2 (0x1) Bus type: 1 (USB) Report Descriptor: Unable to open device by path Device Found type: 9975 7000 path: /dev/hidraw1 serial_number: 74114455046E4028 Manufacturer: Funge Electronics Co., Ltd Product: Inphic IN9 SLE Release: 4 Interface: 1 Usage (page): 0x6 (0x1) Bus type: 1 (USB) Report Descriptor: Unable to open device by path Device Found type: 9975 7000 path: /dev/hidraw2 serial_number: 74114455046E4028 Manufacturer: Funge Electronics Co., Ltd Product: Inphic IN9 SLE Release: 4 Interface: 2 Usage (page): 0x6 (0x1) Bus type: 1 (USB) Report Descriptor: Unable to open device by path Device Found type: 9975 7000 path: /dev/hidraw2 serial_number: 74114455046E4028 Manufacturer: Funge Electronics Co., Ltd Product: Inphic IN9 SLE Release: 4 Interface: 2 Usage (page): 0x80 (0x1) Bus type: 1 (USB) Report Descriptor: Unable to open device by path Device Found type: 9975 7000 path: /dev/hidraw2 serial_number: 74114455046E4028 Manufacturer: Funge Electronics Co., Ltd Product: Inphic IN9 SLE Release: 4 Interface: 2 Usage (page): 0x1 (0xc) Bus type: 1 (USB) Report Descriptor: Unable to open device by path Device Found type: 9975 7000 path: /dev/hidraw2 serial_number: 74114455046E4028 Manufacturer: Funge Electronics Co., Ltd Product: Inphic IN9 SLE Release: 4 Interface: 2 Usage (page): 0x10 (0xff10) Bus type: 1 (USB) Report Descriptor: Unable to open device by path Device Found type: 093a 3835 path: /dev/hidraw3 serial_number: Manufacturer: Product: PIXA3835:00 093A:3835 Release: 0 Interface: -1 Usage (page): 0x2 (0x1) Bus type: 3 (I2C) Report Descriptor: Unable to open device by path Device Found type: 093a 3835 path: /dev/hidraw3 serial_number: Manufacturer: Product: PIXA3835:00 093A:3835 Release: 0 Interface: -1 Usage (page): 0x5 (0xd) Bus type: 3 (I2C) Report Descriptor: Unable to open device by path Device Found type: 093a 3835 path: /dev/hidraw3 serial_number: Manufacturer: Product: PIXA3835:00 093A:3835 Release: 0 Interface: -1 Usage (page): 0xe (0xd) Bus type: 3 (I2C) Report Descriptor: Unable to open device by path Device Found type: 093a 3835 path: /dev/hidraw3 serial_number: Manufacturer: Product: PIXA3835:00 093A:3835 Release: 0 Interface: -1 Usage (page): 0x6 (0x1) Bus type: 3 (I2C) Report Descriptor: Unable to open device by path Device Found type: 093a 3835 path: /dev/hidraw3 serial_number: Manufacturer: Product: PIXA3835:00 093A:3835 Release: 0 Interface: -1 Usage (page): 0x1 (0xff00) Bus type: 3 (I2C) Report Descriptor: Unable to open device by path Device Found type: 093a 3835 path: /dev/hidraw3 serial_number: Manufacturer: Product: PIXA3835:00 093A:3835 Release: 0 Interface: -1 Usage (page): 0x1 (0xc) Bus type: 3 (I2C) Report Descriptor: Unable to open device by path unable to open device mcuee  …/hidapi_pr788/build_cmake   linux-dynamic-libudev ?  17:41  ./hidtest/hidtest_libusb hidapi test/example tool. Compiled with hidapi version 0.16.0, runtime version 0.16.0. Compile-time version matches runtime version of hidapi. Device Found type: 9975 7000 path: 3-6:1.0 serial_number: (null) Manufacturer: (null) Product: (null) Release: 4 Interface: 0 Usage (page): 0x0 (0x0) Bus type: 1 (USB) Report Descriptor: Unable to open device by path Device Found type: 9975 7000 path: 3-6:1.1 serial_number: (null) Manufacturer: (null) Product: (null) Release: 4 Interface: 1 Usage (page): 0x0 (0x0) Bus type: 1 (USB) Report Descriptor: Unable to open device by path Device Found type: 9975 7000 path: 3-6:1.2 serial_number: (null) Manufacturer: (null) Product: (null) Release: 4 Interface: 2 Usage (page): 0x0 (0x0) Bus type: 1 (USB) Report Descriptor: Unable to open device by path Device Found type: 16c0 05dc path: 3-2.1:1.1 serial_number: (null) Manufacturer: (null) Product: (null) Release: 110 Interface: 1 Usage (page): 0x0 (0x0) Bus type: 1 (USB) Report Descriptor: Unable to open device by path unable to open device ```
mcuee (Migrated from github.com) approved these changes 2026-08-13 04:46:09 -05:00
mcuee (Migrated from github.com) left a comment

Tested under Ubuntu 26.04 with both CMake and auto-tools build.

Tested under Ubuntu 26.04 with both CMake and auto-tools build.
Youw (Migrated from github.com) approved these changes 2026-08-14 06:59:48 -05:00
This pull request is broken due to missing fork information.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'falkTX/linux-dynamic-libudev:falkTX/linux-dynamic-libudev'
git switch 'falkTX/linux-dynamic-libudev'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'master'
git merge --no-ff 'falkTX/linux-dynamic-libudev'
git switch 'falkTX/linux-dynamic-libudev'
git rebase 'master'
git switch 'master'
git merge --ff-only 'falkTX/linux-dynamic-libudev'
git switch 'falkTX/linux-dynamic-libudev'
git rebase 'master'
git switch 'master'
git merge --no-ff 'falkTX/linux-dynamic-libudev'
git switch 'master'
git merge --squash 'falkTX/linux-dynamic-libudev'
git switch 'master'
git merge --ff-only 'falkTX/linux-dynamic-libudev'
git switch 'master'
git merge 'falkTX/linux-dynamic-libudev'
git push origin 'master'
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-libusb/hidapi!788
No description provided.