hidapi-0.12.0 Test matrix #407

Closed
opened 2022-05-03 04:35:06 -05:00 by Youw · 12 comments
Youw commented 2022-05-03 04:35:06 -05:00 (Migrated from github.com)

Latest release candidate: hidapi-0.12.0-rc1

Latest release candidate: [hidapi-0.12.0-rc1](https://github.com/libusb/hidapi/releases/tag/hidapi-0.12.0-rc1)
mcuee commented 2022-05-03 05:24:35 -05:00 (Migrated from github.com)

I should be able to test under the following system. I will use CMake on most of the systems. Then I will also test the VS solution using VS2019.

For hiapttester, I will try similar testing as mentioned in #285.

macOS 12 ARM64 (mac Mini M1)

  • build: Apple clang 13.1.6, library built is okay but not hidtest if using CMake
  • run: hidtest (failed to build under CMake but okay under auto-tools) and hidapitester

macOS 12 x86_64 using Rosetta Translation, not native (mac Mini M1)

  • build: Apple clang 13.1.6, library built is okay but not hidtest if using CMake
  • run: hidtest (failed to build under CMake but okay under auto-tools) and hidapitester

Linux x86_64 (Ubuntu 20.04)

  • build: gcc 9.4 (using CMake and auto-tools)
  • run: hidtest and hidaptester

Linux ARM32 (Raspberry Pi 400 running Raspberry Pi OS Bullseye 32 bit)

  • build: gcc 10.2.1
  • run: hidtest (okay) and hidaptester (failed but probably due to the OS)

Linux ARM64 (Raspberry Pi 400 running Raspberry Pi OS Bullseye 64 bit)

  • build: gcc 10.2.1
  • run: hidtest and hidaptester

Windows VS2019 solution 64 bit (Windows 11 x64 laptop)

  • build: okay
  • run: hidtest

Windows VS2019 solution 32 bit (Windows 11 x64 laptop)

  • build: okay
  • run: hidtest

Windows VS2019 CMake 64 bit (Windows 11 x64 laptop)

  • build: okay
  • run: hidtest

Windows VS2022 CMake 64 bit (Windows 11 x64 laptop)

  • build: okay
  • run: hidtest

Windows MinGW 64 bit (Windows 11 x64 laptop)

  • build: MSYS2 MinGW-w64 64bit GCC
  • run: hidtest and hidaptester

Windows MinGW 32 bit (Windows 11 x64 laptop)

  • build: MinGW-w64 32 bit GCC
  • run: hidtest and hidaptester

FreeBSD 13.0 Release x86_64 (VirtualBox VM under Windows 11 x64 laptop)

  • build: FreeBSD clang + CMake
  • run: hidtest and hidaptester (hidapitester needs some twist to build)
I should be able to test under the following system. I will use CMake on most of the systems. Then I will also test the VS solution using VS2019. For hiapttester, I will try similar testing as mentioned in #285. ### macOS 12 ARM64 (mac Mini M1) - [x] build: Apple clang 13.1.6, **library built is okay but not hidtest if using CMake** - [x] run: hidtest (failed to build under CMake but okay under auto-tools) and hidapitester ### macOS 12 x86_64 using Rosetta Translation, not native (mac Mini M1) - [x] build: Apple clang 13.1.6, **library built is okay but not hidtest if using CMake** - [x] run: hidtest (failed to build under CMake but okay under auto-tools) and hidapitester ### Linux x86_64 (Ubuntu 20.04) - [x] build: gcc 9.4 (using CMake and auto-tools) - [x] run: hidtest and hidaptester ### Linux ARM32 (Raspberry Pi 400 running Raspberry Pi OS Bullseye 32 bit) - [x] build: gcc 10.2.1 - [x] run: hidtest (okay) and **hidaptester (failed but probably due to the OS)** ### Linux ARM64 (Raspberry Pi 400 running Raspberry Pi OS Bullseye 64 bit) - [x] build: gcc 10.2.1 - [x] run: hidtest and hidaptester ### Windows VS2019 solution 64 bit (Windows 11 x64 laptop) - [x] build: okay - [x] run: hidtest ### Windows VS2019 solution 32 bit (Windows 11 x64 laptop) - [x] build: okay - [x] run: hidtest ### Windows VS2019 CMake 64 bit (Windows 11 x64 laptop) - [x] build: okay - [x] run: hidtest ### Windows VS2022 CMake 64 bit (Windows 11 x64 laptop) - [x] build: okay - [x] run: hidtest ### Windows MinGW 64 bit (Windows 11 x64 laptop) - [x] build: MSYS2 MinGW-w64 64bit GCC - [x] run: hidtest and hidaptester ### Windows MinGW 32 bit (Windows 11 x64 laptop) - [x] build: MinGW-w64 32 bit GCC - [x] run: hidtest and hidaptester ### FreeBSD 13.0 Release x86_64 (VirtualBox VM under Windows 11 x64 laptop) - [x] build: FreeBSD clang + CMake - [x] run: hidtest and hidaptester (hidapitester needs some twist to build)
mcuee commented 2022-05-03 05:29:04 -05:00 (Migrated from github.com)

I can not test macOS Intel but I am sure there are people who can test it. Same for FreeBSD. Then I am probably not good at testing cython-hidapi and node-hid but again other people can test.

Hopefully someone can test macOS Intel and older macOS versions, old Windows XP/Vista/7 32bit/64bit versions. It will be good too that the users of the language bindings can test as well.

Then it will be helpful if Linux distro maintainers of hidapi can check out this new release as well.

The hope is to have the release in two weeks' time.

My Wish list of some people can help to carry out the test. hidtest, hidapitester or other test application can be used based on the devices the tester has.

But for the release we should be okay even if some of the configurations are not tested.

hidapi 0.12.0-rc1

  • Windows 7 64 bit (by JoergAtGithub using VS2019+Cmake)
  • Windows 7 32bit
  • Windows XP 32bit ??
  • Linux distro -- Debian
  • Linux distro -- Fedora
  • Linux distro -- Arch
  • Linux RISC-V ??
  • FreeBSD x86_64 -- FreeBSD clang 11.0.1+CMake, done by Xiaofan
  • macOS x86_64
  • Mac OS X Snow Leopard i386 ??
  • Mac OS X Leopard Power PC ??

Language binding: cython-hidapi

  • Windows 10/11 64bit
  • Linux x86_64
  • macOS Intel x86_64
  • macOS ARM64
  • FreeBSD x86_64

Language binding: node-hid

  • Windows 10/11 64bit
  • Linux x86_64
  • macOS Intel x86_64
  • macOS ARM64
  • FreeBSD x86_64

macports seem to provide a good one for macOS support.
Ref: https://ports.macports.org/port/hidapi/details/

From here for HIDAPI Version: 0.11.2
https://ports.macports.org/port/hidapi/details/

  • Monterey (arm64)
  • Monterey (x86_64)
  • Big Sur (arm64)
  • Big Sur (x86_64)
  • Catalina
  • Mojave
  • High Sierra
  • Sierra
  • El Capitan
  • Yosemite
  • Mavericks
  • Mountain Lion
  • Lion
  • Snow Leopard (x86_64)
  • Snow Leopard (i386)
  • Leopard (ppc legacy) -->???
I can not test macOS Intel but I am sure there are people who can test it. Same for FreeBSD. Then I am probably not good at testing cython-hidapi and node-hid but again other people can test. Hopefully someone can test macOS Intel and older macOS versions, old Windows XP/Vista/7 32bit/64bit versions. It will be good too that the users of the language bindings can test as well. Then it will be helpful if Linux distro maintainers of hidapi can check out this new release as well. The hope is to have the release in two weeks' time. My Wish list of some people can help to carry out the test. hidtest, hidapitester or other test application can be used based on the devices the tester has. But for the release we should be okay even if some of the configurations are not tested. ### hidapi 0.12.0-rc1 - [x] Windows 7 64 bit (by JoergAtGithub using VS2019+Cmake) - [ ] Windows 7 32bit - [ ] Windows XP 32bit ?? - [ ] Linux distro -- Debian - [ ] Linux distro -- Fedora - [ ] Linux distro -- Arch - [ ] Linux RISC-V ?? - [x] FreeBSD x86_64 -- FreeBSD clang 11.0.1+CMake, done by Xiaofan - [ ] macOS x86_64 - [ ] Mac OS X Snow Leopard i386 ?? - [ ] Mac OS X Leopard Power PC ?? ### Language binding: cython-hidapi - [ ] Windows 10/11 64bit - [ ] Linux x86_64 - [ ] macOS Intel x86_64 - [ ] macOS ARM64 - [ ] FreeBSD x86_64 ### Language binding: node-hid - [ ] Windows 10/11 64bit - [ ] Linux x86_64 - [ ] macOS Intel x86_64 - [ ] macOS ARM64 - [ ] FreeBSD x86_64 ********************************* macports seem to provide a good one for macOS support. Ref: https://ports.macports.org/port/hidapi/details/ From here for HIDAPI Version: 0.11.2 https://ports.macports.org/port/hidapi/details/ - [x] Monterey (arm64) - [x] Monterey (x86_64) - [x] Big Sur (arm64) - [x] Big Sur (x86_64) - [x] Catalina - [x] Mojave - [x] High Sierra - [x] Sierra - [x] El Capitan - [x] Yosemite - [x] Mavericks - [x] Mountain Lion - [x] Lion - [x] Snow Leopard (x86_64) - [x] Snow Leopard (i386) - [ ] Leopard (ppc legacy) -->???
mcuee commented 2022-05-03 05:39:48 -05:00 (Migrated from github.com)

BTW, github actions have already tested the build of hidapi 0.12.0-rc1 under the following platform
https://github.com/libusb/hidapi/actions/runs/2263027445

  1. macOS 11 automake and cmake using Apple clang
  2. Ubuntu 20.04 cmake
  3. Windows Server 2022 cmake: msvc (VS2022), nmake (VS2022) and MinGW gcc 8.1.0

Take note there are warnings under macOS github action build.

Run make install
  make install
  shell: /bin/bash -e {0}
[ 50%] Building C object src/mac/CMakeFiles/hidapi_darwin.dir/hid.c.o
/Users/runner/work/hidapi/hidapi/hidapisrc/mac/hid.c:793:39: warning: incompatible pointer to integer conversion passing 'void *' to parameter of type 'mach_port_t' (aka 'unsigned int') [-Wint-conversion]
                        return IOServiceGetMatchingService(NULL, IORegistryEntryIDMatching(entry_id));
                                                           ^~~~
/Applications/Xcode_13.[2](https://github.com/libusb/hidapi/runs/6270984049?check_suite_focus=true#step:5:2).1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/1[3](https://github.com/libusb/hidapi/runs/6270984049?check_suite_focus=true#step:5:3).0.0/include/stddef.h:89:16: note: expanded from macro 'NULL'
#  define NULL ((void*)0)
               ^~~~~~~~~~
/Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:[4](https://github.com/libusb/hidapi/runs/6270984049?check_suite_focus=true#step:5:4)19:14: note: passing argument to parameter 'mainPort' here
        mach_port_t     mainPort,
                        ^
/Users/runner/work/hidapi/hidapi/hidapisrc/mac/hid.c:798:34: warning: incompatible pointer to integer conversion passing 'void *' to parameter of type 'mach_port_t' (aka 'unsigned int') [-Wint-conversion]
                return IORegistryEntryFromPath(NULL, path);
                                               ^~~~
/Applications/Xcode_13.2.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/stddef.h:89:16: note: expanded from macro 'NULL'
#  define NULL ((void*)0)
               ^~~~~~~~~~
/Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:964:1[5](https://github.com/libusb/hidapi/runs/6270984049?check_suite_focus=true#step:5:5): note: passing argument to parameter 'mainPort' here
        mach_port_t             mainPort,
                                ^
2 warnings generated.
[[10](https://github.com/libusb/hidapi/runs/6270984049?check_suite_focus=true#step:5:10)0%] Linking C shared library hidapi.framework/hidapi

BTW, github actions have already tested the build of hidapi 0.12.0-rc1 under the following platform https://github.com/libusb/hidapi/actions/runs/2263027445 1) macOS 11 automake and cmake using Apple clang 2) Ubuntu 20.04 cmake 3) Windows Server 2022 cmake: msvc (VS2022), nmake (VS2022) and MinGW gcc 8.1.0 Take note there are warnings under macOS github action build. ``` Run make install make install shell: /bin/bash -e {0} [ 50%] Building C object src/mac/CMakeFiles/hidapi_darwin.dir/hid.c.o /Users/runner/work/hidapi/hidapi/hidapisrc/mac/hid.c:793:39: warning: incompatible pointer to integer conversion passing 'void *' to parameter of type 'mach_port_t' (aka 'unsigned int') [-Wint-conversion] return IOServiceGetMatchingService(NULL, IORegistryEntryIDMatching(entry_id)); ^~~~ /Applications/Xcode_13.[2](https://github.com/libusb/hidapi/runs/6270984049?check_suite_focus=true#step:5:2).1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/1[3](https://github.com/libusb/hidapi/runs/6270984049?check_suite_focus=true#step:5:3).0.0/include/stddef.h:89:16: note: expanded from macro 'NULL' # define NULL ((void*)0) ^~~~~~~~~~ /Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:[4](https://github.com/libusb/hidapi/runs/6270984049?check_suite_focus=true#step:5:4)19:14: note: passing argument to parameter 'mainPort' here mach_port_t mainPort, ^ /Users/runner/work/hidapi/hidapi/hidapisrc/mac/hid.c:798:34: warning: incompatible pointer to integer conversion passing 'void *' to parameter of type 'mach_port_t' (aka 'unsigned int') [-Wint-conversion] return IORegistryEntryFromPath(NULL, path); ^~~~ /Applications/Xcode_13.2.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/stddef.h:89:16: note: expanded from macro 'NULL' # define NULL ((void*)0) ^~~~~~~~~~ /Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:964:1[5](https://github.com/libusb/hidapi/runs/6270984049?check_suite_focus=true#step:5:5): note: passing argument to parameter 'mainPort' here mach_port_t mainPort, ^ 2 warnings generated. [[10](https://github.com/libusb/hidapi/runs/6270984049?check_suite_focus=true#step:5:10)0%] Linking C shared library hidapi.framework/hidapi ```
mcuee commented 2022-05-03 06:52:14 -05:00 (Migrated from github.com)

hidapitest log under Ubuntu 20.04 (x86_64).

~/build/hidapitester$ ./hidapitester --vidpid 0925:7001  -l 3 --open --send-output 2,2,3 --read-input
Opening device, vid/pid: 0x0925/0x7001
Writing output report of 3-bytes...wrote 3 bytes:
 02 02 03
Reading 3-byte input report 0, 250 msec timeout...read 3 bytes:
 01 02 03
Closing device

./hidapitester --vidpid 0925:7001  -l 4 --open --send-feature 3,4,5,6 --read-feature 4
Opening device, vid/pid: 0x0925/0x7001
Writing 4-byte feature report...wrote 4 bytes:
 03 04 05 06
Reading 4-byte feature report, report_id 4...read 3 bytes:
 04 04 05 00
Closing device

Under Windows 11 and MSYS2 MinGW 32/64bit


(py39x64venv) PS C:\work\libusb\hidapitester> .\hidapitester_mingw32.exe --vidpid 0925:7001  -l 3 --open --send-output 2,2,3 --read-input
Opening device, vid/pid: 0x0925/0x7001
Writing output report of 3-bytes...wrote 3 bytes:
 02 02 03
Reading 3-byte input report 0, 250 msec timeout...read 3 bytes:
 01 02 03
Closing device
(py39x64venv) PS C:\work\libusb\hidapitester> .\hidapitester_mingw32.exe --vidpid 0925:7001  -l 4 --open --send-feature 3,4,5,6 --read-feature 4
Opening device, vid/pid: 0x0925/0x7001
Writing 4-byte feature report...wrote 4 bytes:
 03 04 05 06
Reading 4-byte feature report, report_id 4...read 3 bytes:
 04 04 05 00
Closing device

Under Mac Mini M1.

mcuee@mcuees-Mac-mini hidapitester % ./hidapitester --vidpid 0925:7001  -l 3 --open --send-output 2,2,3 --read-input
Opening device, vid/pid: 0x0925/0x7001
Writing output report of 3-bytes...wrote 3 bytes:
 02 02 03
Reading 3-byte input report 0, 250 msec timeout...read 3 bytes:
 01 02 03
Closing device
mcuee@mcuees-Mac-mini hidapitester % ./hidapitester --vidpid 0925:7001  -l 4 --open --send-feature 3,4,5,6 --read-feature 4
Opening device, vid/pid: 0x0925/0x7001
Writing 4-byte feature report...wrote 4 bytes:
 03 04 05 06
Reading 4-byte feature report, report_id 4...read 3 bytes:
 04 04 05 00
Closing device

Somehow it failed for the loopback of output report to input report, under Raspberry Pi 400 (Raspberry Pi OS 32bit). But I think hidapi is probably okay and it is rather a problem with the Raspberry Pi OS 32bit. My OS is not up to date so I will try again after updating the OS.

pi@raspberrypi:~/build/libusb/hidapitester $ sudo ./hidapitester --vidpid 0925:7001  -l 3 --open --send-output 2,2,3 --read-input 
Opening device, vid/pid: 0x0925/0x7001
Writing output report of 3-bytes...wrote 3 bytes:
 02 02 03
Reading 3-byte input report 0, 250 msec timeout...read 0 bytes:
Closing device

pi@raspberrypi:~/build/libusb/hidapitester $ sudo ./hidapitester --vidpid 0925:7001  -l 4 --open --send-feature 3,4,5,6 --read-feature 4
Opening device, vid/pid: 0x0925/0x7001
Writing 4-byte feature report...wrote 4 bytes:
 03 04 05 06
Reading 4-byte feature report, report_id 4...read 3 bytes:
 04 04 05 00
Closing device

No problem under Raspberry Pi OS 64 bit.

mcuee@raspberrypi:~/build/hidapi/hidapitester $ sudo ./hidapitester --vidpid 0925:7001  -l 3 --open --send-output 2,2,3 --read-input
Opening device, vid/pid: 0x0925/0x7001
Writing output report of 3-bytes...wrote 3 bytes:
 02 02 03
Reading 3-byte input report 0, 250 msec timeout...read 3 bytes:
 01 02 03
Closing device
mcuee@raspberrypi:~/build/hidapi/hidapitester $ sudo ./hidapitester --vidpid 0925:7001  -l 4 --open --send-feature 3,4,5,6 --read-feature 4
Opening device, vid/pid: 0x0925/0x7001
Writing 4-byte feature report...wrote 4 bytes:
 03 04 05 06
Reading 4-byte feature report, report_id 4...read 3 bytes:
 04 04 05 00
Closing device


hidapitest log under Ubuntu 20.04 (x86_64). ``` ~/build/hidapitester$ ./hidapitester --vidpid 0925:7001 -l 3 --open --send-output 2,2,3 --read-input Opening device, vid/pid: 0x0925/0x7001 Writing output report of 3-bytes...wrote 3 bytes: 02 02 03 Reading 3-byte input report 0, 250 msec timeout...read 3 bytes: 01 02 03 Closing device ./hidapitester --vidpid 0925:7001 -l 4 --open --send-feature 3,4,5,6 --read-feature 4 Opening device, vid/pid: 0x0925/0x7001 Writing 4-byte feature report...wrote 4 bytes: 03 04 05 06 Reading 4-byte feature report, report_id 4...read 3 bytes: 04 04 05 00 Closing device ``` Under Windows 11 and MSYS2 MinGW 32/64bit ``` (py39x64venv) PS C:\work\libusb\hidapitester> .\hidapitester_mingw32.exe --vidpid 0925:7001 -l 3 --open --send-output 2,2,3 --read-input Opening device, vid/pid: 0x0925/0x7001 Writing output report of 3-bytes...wrote 3 bytes: 02 02 03 Reading 3-byte input report 0, 250 msec timeout...read 3 bytes: 01 02 03 Closing device (py39x64venv) PS C:\work\libusb\hidapitester> .\hidapitester_mingw32.exe --vidpid 0925:7001 -l 4 --open --send-feature 3,4,5,6 --read-feature 4 Opening device, vid/pid: 0x0925/0x7001 Writing 4-byte feature report...wrote 4 bytes: 03 04 05 06 Reading 4-byte feature report, report_id 4...read 3 bytes: 04 04 05 00 Closing device ``` Under Mac Mini M1. ``` mcuee@mcuees-Mac-mini hidapitester % ./hidapitester --vidpid 0925:7001 -l 3 --open --send-output 2,2,3 --read-input Opening device, vid/pid: 0x0925/0x7001 Writing output report of 3-bytes...wrote 3 bytes: 02 02 03 Reading 3-byte input report 0, 250 msec timeout...read 3 bytes: 01 02 03 Closing device mcuee@mcuees-Mac-mini hidapitester % ./hidapitester --vidpid 0925:7001 -l 4 --open --send-feature 3,4,5,6 --read-feature 4 Opening device, vid/pid: 0x0925/0x7001 Writing 4-byte feature report...wrote 4 bytes: 03 04 05 06 Reading 4-byte feature report, report_id 4...read 3 bytes: 04 04 05 00 Closing device ``` Somehow it failed for the loopback of output report to input report, under Raspberry Pi 400 (Raspberry Pi OS 32bit). But I think hidapi is probably okay and it is rather a problem with the Raspberry Pi OS 32bit. My OS is not up to date so I will try again after updating the OS. ``` pi@raspberrypi:~/build/libusb/hidapitester $ sudo ./hidapitester --vidpid 0925:7001 -l 3 --open --send-output 2,2,3 --read-input Opening device, vid/pid: 0x0925/0x7001 Writing output report of 3-bytes...wrote 3 bytes: 02 02 03 Reading 3-byte input report 0, 250 msec timeout...read 0 bytes: Closing device pi@raspberrypi:~/build/libusb/hidapitester $ sudo ./hidapitester --vidpid 0925:7001 -l 4 --open --send-feature 3,4,5,6 --read-feature 4 Opening device, vid/pid: 0x0925/0x7001 Writing 4-byte feature report...wrote 4 bytes: 03 04 05 06 Reading 4-byte feature report, report_id 4...read 3 bytes: 04 04 05 00 Closing device ``` No problem under Raspberry Pi OS 64 bit. ``` mcuee@raspberrypi:~/build/hidapi/hidapitester $ sudo ./hidapitester --vidpid 0925:7001 -l 3 --open --send-output 2,2,3 --read-input Opening device, vid/pid: 0x0925/0x7001 Writing output report of 3-bytes...wrote 3 bytes: 02 02 03 Reading 3-byte input report 0, 250 msec timeout...read 3 bytes: 01 02 03 Closing device mcuee@raspberrypi:~/build/hidapi/hidapitester $ sudo ./hidapitester --vidpid 0925:7001 -l 4 --open --send-feature 3,4,5,6 --read-feature 4 Opening device, vid/pid: 0x0925/0x7001 Writing 4-byte feature report...wrote 4 bytes: 03 04 05 06 Reading 4-byte feature report, report_id 4...read 3 bytes: 04 04 05 00 Closing device ```
mcuee commented 2022-05-03 07:11:59 -05:00 (Migrated from github.com)

@todbot If possible, please help to carry out some tests using node-hid and hidapitester as you seem to have many working device FW to test hidapi.

@todbot If possible, please help to carry out some tests using node-hid and hidapitester as you seem to have many working device FW to test hidapi.
mcuee commented 2022-05-03 07:46:32 -05:00 (Migrated from github.com)

@Youw
The Darwin CMake build failed (for hidtest) under my Mac Mini M1 (Apple clang), either for the native build or the x86_64 build under Rosetta.

Same thing happened if I use "brew install hidapi --HEAD".

github action does not detect this since it does not build hidtest.


mcuee@mcuees-Mac-mini build % make
[ 25%] Building C object src/mac/CMakeFiles/hidapi_darwin.dir/hid.c.o
/Users/mcuee/build/hidapi/hidapi-hidapi-0.12.0-rc1/mac/hid.c:793:39: warning: incompatible pointer to integer conversion passing 'void *' to parameter of type 'mach_port_t' (aka 'unsigned int') [-Wint-conversion]
                        return IOServiceGetMatchingService(NULL, IORegistryEntryIDMatching(entry_id));
                                                           ^~~~
/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/stddef.h:89:16: note: expanded from macro 'NULL'
#  define NULL ((void*)0)
               ^~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:419:14: note: passing argument to parameter 'mainPort' here
        mach_port_t     mainPort,
                        ^
/Users/mcuee/build/hidapi/hidapi-hidapi-0.12.0-rc1/mac/hid.c:798:34: warning: incompatible pointer to integer conversion passing 'void *' to parameter of type 'mach_port_t' (aka 'unsigned int') [-Wint-conversion]
                return IORegistryEntryFromPath(NULL, path);
                                               ^~~~
/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/stddef.h:89:16: note: expanded from macro 'NULL'
#  define NULL ((void*)0)
               ^~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:964:15: note: passing argument to parameter 'mainPort' here
        mach_port_t             mainPort,
                                ^
2 warnings generated.
[ 50%] Linking C shared library libhidapi.dylib
[ 50%] Built target hidapi_darwin
[ 75%] Building C object hidtest/CMakeFiles/hidtest.dir/test.c.o
/Users/mcuee/build/hidapi/hidapi-hidapi-0.12.0-rc1/hidtest/test.c:40:10: fatal error: 'hidapi_darwin.h' file not found
#include <hidapi_darwin.h>
         ^~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [hidtest/CMakeFiles/hidtest.dir/test.c.o] Error 1
make[1]: *** [hidtest/CMakeFiles/hidtest.dir/all] Error 2
make: *** [all] Error 2

Auto-tools build is okay.


mcuee@mcuees-Mac-mini build_auto % make
/Library/Developer/CommandLineTools/usr/bin/make  all-recursive
Making all in mac
  CC       hid.lo
../../mac/hid.c:793:39: warning: incompatible pointer to integer conversion passing 'void *' to parameter of type 'mach_port_t' (aka 'unsigned int') [-Wint-conversion]
                        return IOServiceGetMatchingService(NULL, IORegistryEntryIDMatching(entry_id));
                                                           ^~~~
/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/stddef.h:89:16: note: expanded from macro 'NULL'
#  define NULL ((void*)0)
               ^~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:419:14: note: passing argument to parameter 'mainPort' here
        mach_port_t     mainPort,
                        ^
../../mac/hid.c:798:34: warning: incompatible pointer to integer conversion passing 'void *' to parameter of type 'mach_port_t' (aka 'unsigned int') [-Wint-conversion]
                return IORegistryEntryFromPath(NULL, path);
                                               ^~~~
/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/stddef.h:89:16: note: expanded from macro 'NULL'
#  define NULL ((void*)0)
               ^~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:964:15: note: passing argument to parameter 'mainPort' here
        mach_port_t             mainPort,
                                ^
2 warnings generated.
  CCLD     libhidapi.la
Making all in hidtest
  CC       test.o
  CCLD     hidtest
make[2]: Nothing to be done for `all-am'.
@Youw The Darwin CMake build failed (for hidtest) under my Mac Mini M1 (Apple clang), either for the native build or the x86_64 build under Rosetta. Same thing happened if I use "brew install hidapi --HEAD". github action does not detect this since it does not build hidtest. ``` mcuee@mcuees-Mac-mini build % make [ 25%] Building C object src/mac/CMakeFiles/hidapi_darwin.dir/hid.c.o /Users/mcuee/build/hidapi/hidapi-hidapi-0.12.0-rc1/mac/hid.c:793:39: warning: incompatible pointer to integer conversion passing 'void *' to parameter of type 'mach_port_t' (aka 'unsigned int') [-Wint-conversion] return IOServiceGetMatchingService(NULL, IORegistryEntryIDMatching(entry_id)); ^~~~ /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/stddef.h:89:16: note: expanded from macro 'NULL' # define NULL ((void*)0) ^~~~~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:419:14: note: passing argument to parameter 'mainPort' here mach_port_t mainPort, ^ /Users/mcuee/build/hidapi/hidapi-hidapi-0.12.0-rc1/mac/hid.c:798:34: warning: incompatible pointer to integer conversion passing 'void *' to parameter of type 'mach_port_t' (aka 'unsigned int') [-Wint-conversion] return IORegistryEntryFromPath(NULL, path); ^~~~ /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/stddef.h:89:16: note: expanded from macro 'NULL' # define NULL ((void*)0) ^~~~~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:964:15: note: passing argument to parameter 'mainPort' here mach_port_t mainPort, ^ 2 warnings generated. [ 50%] Linking C shared library libhidapi.dylib [ 50%] Built target hidapi_darwin [ 75%] Building C object hidtest/CMakeFiles/hidtest.dir/test.c.o /Users/mcuee/build/hidapi/hidapi-hidapi-0.12.0-rc1/hidtest/test.c:40:10: fatal error: 'hidapi_darwin.h' file not found #include <hidapi_darwin.h> ^~~~~~~~~~~~~~~~~ 1 error generated. make[2]: *** [hidtest/CMakeFiles/hidtest.dir/test.c.o] Error 1 make[1]: *** [hidtest/CMakeFiles/hidtest.dir/all] Error 2 make: *** [all] Error 2 ``` Auto-tools build is okay. ``` mcuee@mcuees-Mac-mini build_auto % make /Library/Developer/CommandLineTools/usr/bin/make all-recursive Making all in mac CC hid.lo ../../mac/hid.c:793:39: warning: incompatible pointer to integer conversion passing 'void *' to parameter of type 'mach_port_t' (aka 'unsigned int') [-Wint-conversion] return IOServiceGetMatchingService(NULL, IORegistryEntryIDMatching(entry_id)); ^~~~ /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/stddef.h:89:16: note: expanded from macro 'NULL' # define NULL ((void*)0) ^~~~~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:419:14: note: passing argument to parameter 'mainPort' here mach_port_t mainPort, ^ ../../mac/hid.c:798:34: warning: incompatible pointer to integer conversion passing 'void *' to parameter of type 'mach_port_t' (aka 'unsigned int') [-Wint-conversion] return IORegistryEntryFromPath(NULL, path); ^~~~ /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/stddef.h:89:16: note: expanded from macro 'NULL' # define NULL ((void*)0) ^~~~~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:964:15: note: passing argument to parameter 'mainPort' here mach_port_t mainPort, ^ 2 warnings generated. CCLD libhidapi.la Making all in hidtest CC test.o CCLD hidtest make[2]: Nothing to be done for `all-am'. ```
Youw commented 2022-05-03 10:20:01 -05:00 (Migrated from github.com)

Interesting, when I checked locally, mach_port_t was defined as a pointer to some forward declarated type.

Interesting, when I checked locally, `mach_port_t` was defined as a pointer to some forward declarated type.
Youw commented 2022-05-03 10:54:29 -05:00 (Migrated from github.com)
/Users/mcuee/build/hidapi/hidapi-hidapi-0.12.0-rc1/hidtest/test.c:40:10: fatal error: 'hidapi_darwin.h' file not found
#include <hidapi_darwin.h>
         ^~~~~~~~~~~~~~~~~

I remember I've been fixing it. Maybe the fix got lost in a merge conflict or smth.
Thanks for finding it. I'll update the CI script to test this as well.

``` /Users/mcuee/build/hidapi/hidapi-hidapi-0.12.0-rc1/hidtest/test.c:40:10: fatal error: 'hidapi_darwin.h' file not found #include <hidapi_darwin.h> ^~~~~~~~~~~~~~~~~ ``` I remember I've been fixing it. Maybe the fix got lost in a merge conflict or smth. Thanks for finding it. I'll update the CI script to test this as well.
JoergAtGithub commented 2022-05-03 17:36:28 -05:00 (Migrated from github.com)

I compiled it on Windows 7 VisualStudio 2019 CMake. All I tried, works as before!

I compiled it on Windows 7 VisualStudio 2019 CMake. All I tried, works as before!
Youw commented 2022-05-04 13:45:08 -05:00 (Migrated from github.com)

#409 with the fix

#409 with the fix
mcuee commented 2022-05-06 05:30:34 -05:00 (Migrated from github.com)

#409 is good and it has fixed the warnings and hidtest build issues under macOS. It has been merged.
As far as I am concerned it is good to go. But let's probably wait a few days more to see if anything popping up.

#409 is good and it has fixed the warnings and hidtest build issues under macOS. It has been merged. As far as I am concerned it is good to go. But let's probably wait a few days more to see if anything popping up.
mcuee commented 2022-07-31 19:27:12 -05:00 (Migrated from github.com)

hidapi 0.12.0 has been released on 25 May 2022. So this can be closed.

hidapi 0.12.0 has been released on 25 May 2022. So this can be closed.
Sign in to join this conversation.
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#407
No description provided.