Warnings when using ninja build #805

Closed
opened 2026-05-13 00:57:33 -05:00 by mcuee · 0 comments
mcuee commented 2026-05-13 00:57:33 -05:00 (Migrated from github.com)

From github action.

Example run log for the master branch.
https://github.com/libusb/hidapi/actions/runs/24959397930/job/73083301333

I can see same issues for my local build.

Run meson setup build_meson hidapisrc
  meson setup build_meson hidapisrc
  cd build_meson
  ninja
  shell: /bin/bash -e {0}
  env:
    NIX_COMPILE_FLAGS: -Wall -Wextra -pedantic -Werror
    GNU_COMPILE_FLAGS: -Wall -Wextra -pedantic -Werror -Wformat-signedness
    MSVC_COMPILE_FLAGS: /W4 /WX
The Meson build system
Version: 1.11.1
Source dir: /Users/runner/work/hidapi/hidapi/hidapisrc
Build dir: /Users/runner/work/hidapi/hidapi/build_meson
Build type: native build
Project name: hidapi
Project version: 0.16.0
Host machine cpu family: aarch64
Host machine cpu: aarch64

Executing subproject hidapi_build_cmake method cmake 

hidapi_build_cmake| Found CMake: /opt/homebrew/bin/cmake (4.3.1)

| Configuring the build directory with CMake version 4.3.1
| Running CMake with: -G Ninja -DCMAKE_INSTALL_PREFIX=/opt/homebrew -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Debug
| - build directory:          /Users/runner/work/hidapi/hidapi/build_meson/subprojects/hidapi_build_cmake/__CMake_build
| - source directory:         /Users/runner/work/hidapi/hidapi/hidapisrc/subprojects/hidapi_build_cmake
| - toolchain file:           /Users/runner/work/hidapi/hidapi/build_meson/subprojects/hidapi_build_cmake/__CMake_build/CMakeMesonToolchainFile.cmake
| - preload file:             /opt/homebrew/lib/python3.14/site-packages/mesonbuild/cmake/data/preload.cmake
| - trace args:               --trace-expand --trace-format=json-v1 --no-warn-unused-cli --trace-redirect=cmake_trace.txt
| - disabled policy warnings: [CMP0025, CMP0047, CMP0056, CMP0060, CMP0065, CMP0066, CMP0067, CMP0082, CMP0089, CMP0102]

| Put cmake in trace mode, but with variables expanded.
| Put cmake in trace mode and sets the trace output format.
| Not searching for unused variables given on the command line.
| Put cmake in trace mode and redirect trace output to a file instead of stderr.
| Trace will be written to cmake_trace.txt
| -- The C compiler identification is AppleClang 17.0.0.17000013
| -- 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
| -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
| -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
| -- Found Threads: TRUE
| -- Configuring done (0.8s)
| CMake Warning (dev) in /Users/runner/work/hidapi/hidapi/build_meson/subprojects/hidapi_build_cmake/__CMake_build/root/mac/CMakeLists.txt:
| Policy CMP0200 is not set: Location and configuration selection for
| imported targets is more consistent.  Run "cmake --help-policy CMP0200" for
| policy details.  Use the cmake_policy command to set the policy and
| suppress this warning.

| Configuration selection for imported target "Threads::Threads" selected
| configuration "(none)", but would select configuration "DEBUG" under the
| NEW policy.

| This warning is for project developers.  Use -Wno-dev to suppress it.

| CMake Warning (dev) at /Users/runner/work/hidapi/hidapi/build_meson/subprojects/hidapi_build_cmake/__CMake_build/root/mac/CMakeLists.txt:5 (add_library):
| Policy CMP0156 is not set: De-duplicate libraries on link lines based on
| linker capabilities.  Run "cmake --help-policy CMP0156" for policy details.
| Use the cmake_policy command to set the policy and suppress this warning.

| Since the policy is not set, legacy libraries de-duplication strategy will
| be applied.
| This warning is for project developers.  Use -Wno-dev to suppress it.

| CMake Warning (dev) at /Users/runner/work/hidapi/hidapi/build_meson/subprojects/hidapi_build_cmake/__CMake_build/root/mac/CMakeLists.txt:5 (add_library):
| Policy CMP0181 is not set: Link command-line fragment variables are parsed
| and re-quoted.  Run "cmake --help-policy CMP0181" for policy details.  Use
| the cmake_policy command to set the policy and suppress this warning.

| Since the policy is not set, the contents of variable
| 'CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS' will be used as is.
| This warning is for project developers.  Use -Wno-dev to suppress it.

| -- Generating done (0.0s)
| CMake Warning (dev) at /Users/runner/work/hidapi/hidapi/build_meson/subprojects/hidapi_build_cmake/__CMake_build/root/mac/CMakeLists.txt:5 (add_library):
| Policy CMP0181 is not set: Link command-line fragment variables are parsed
| and re-quoted.  Run "cmake --help-policy CMP0181" for policy details.  Use
| the cmake_policy command to set the policy and suppress this warning.

| Since the policy is not set, the contents of variable
| 'CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS' will be used as is.
| This warning is for project developers.  Use -Wno-dev to suppress it.

| -- Build files have been written to: /Users/runner/work/hidapi/hidapi/build_meson/subprojects/hidapi_build_cmake/__CMake_build

hidapi_build_cmake| CMake configuration: SUCCEEDED
hidapi_build_cmake| CMake project hidapi 0.16.0 has 2 build targets.
hidapi_build_cmake| Generated Meson AST: /Users/runner/work/hidapi/hidapi/build_meson/subprojects/hidapi_build_cmake/meson.build
hidapi_build_cmake| Project name: hidapi
hidapi_build_cmake| Project version: 0.16.0
hidapi_build_cmake| C compiler for the host machine: cc (clang 17.0.0 "Apple clang version 17.0.0 (clang-1700.0.13.5)")
hidapi_build_cmake| C linker for the host machine: cc ld64 1167.5
hidapi_build_cmake| Build targets in project: 1
hidapi_build_cmake| Subproject hidapi_build_cmake finished.

Build targets in project: 1

hidapi 0.16.0

  Subprojects
    hidapi_build_cmake: YES

Found ninja-1.13.2 at /opt/homebrew/bin/ninja
[1/2] Compiling C object subprojects/hidapi_build_cmake/libhidapi_darwin.0.dylib.p/aaaeb6a1f26d7f4ea0f41f8d0147ef101ed85373_hidapi_build_cmake___CMake_build_root_mac_hid.c.o
[2/2] Linking target subprojects/hidapi_build_cmake/libhidapi_darwin.0.dylib
From github action. Example run log for the master branch. https://github.com/libusb/hidapi/actions/runs/24959397930/job/73083301333 I can see same issues for my local build. ``` Run meson setup build_meson hidapisrc meson setup build_meson hidapisrc cd build_meson ninja shell: /bin/bash -e {0} env: NIX_COMPILE_FLAGS: -Wall -Wextra -pedantic -Werror GNU_COMPILE_FLAGS: -Wall -Wextra -pedantic -Werror -Wformat-signedness MSVC_COMPILE_FLAGS: /W4 /WX The Meson build system Version: 1.11.1 Source dir: /Users/runner/work/hidapi/hidapi/hidapisrc Build dir: /Users/runner/work/hidapi/hidapi/build_meson Build type: native build Project name: hidapi Project version: 0.16.0 Host machine cpu family: aarch64 Host machine cpu: aarch64 Executing subproject hidapi_build_cmake method cmake hidapi_build_cmake| Found CMake: /opt/homebrew/bin/cmake (4.3.1) | Configuring the build directory with CMake version 4.3.1 | Running CMake with: -G Ninja -DCMAKE_INSTALL_PREFIX=/opt/homebrew -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Debug | - build directory: /Users/runner/work/hidapi/hidapi/build_meson/subprojects/hidapi_build_cmake/__CMake_build | - source directory: /Users/runner/work/hidapi/hidapi/hidapisrc/subprojects/hidapi_build_cmake | - toolchain file: /Users/runner/work/hidapi/hidapi/build_meson/subprojects/hidapi_build_cmake/__CMake_build/CMakeMesonToolchainFile.cmake | - preload file: /opt/homebrew/lib/python3.14/site-packages/mesonbuild/cmake/data/preload.cmake | - trace args: --trace-expand --trace-format=json-v1 --no-warn-unused-cli --trace-redirect=cmake_trace.txt | - disabled policy warnings: [CMP0025, CMP0047, CMP0056, CMP0060, CMP0065, CMP0066, CMP0067, CMP0082, CMP0089, CMP0102] | Put cmake in trace mode, but with variables expanded. | Put cmake in trace mode and sets the trace output format. | Not searching for unused variables given on the command line. | Put cmake in trace mode and redirect trace output to a file instead of stderr. | Trace will be written to cmake_trace.txt | -- The C compiler identification is AppleClang 17.0.0.17000013 | -- 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 | -- Performing Test CMAKE_HAVE_LIBC_PTHREAD | -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success | -- Found Threads: TRUE | -- Configuring done (0.8s) | CMake Warning (dev) in /Users/runner/work/hidapi/hidapi/build_meson/subprojects/hidapi_build_cmake/__CMake_build/root/mac/CMakeLists.txt: | Policy CMP0200 is not set: Location and configuration selection for | imported targets is more consistent. Run "cmake --help-policy CMP0200" for | policy details. Use the cmake_policy command to set the policy and | suppress this warning. | Configuration selection for imported target "Threads::Threads" selected | configuration "(none)", but would select configuration "DEBUG" under the | NEW policy. | This warning is for project developers. Use -Wno-dev to suppress it. | CMake Warning (dev) at /Users/runner/work/hidapi/hidapi/build_meson/subprojects/hidapi_build_cmake/__CMake_build/root/mac/CMakeLists.txt:5 (add_library): | Policy CMP0156 is not set: De-duplicate libraries on link lines based on | linker capabilities. Run "cmake --help-policy CMP0156" for policy details. | Use the cmake_policy command to set the policy and suppress this warning. | Since the policy is not set, legacy libraries de-duplication strategy will | be applied. | This warning is for project developers. Use -Wno-dev to suppress it. | CMake Warning (dev) at /Users/runner/work/hidapi/hidapi/build_meson/subprojects/hidapi_build_cmake/__CMake_build/root/mac/CMakeLists.txt:5 (add_library): | Policy CMP0181 is not set: Link command-line fragment variables are parsed | and re-quoted. Run "cmake --help-policy CMP0181" for policy details. Use | the cmake_policy command to set the policy and suppress this warning. | Since the policy is not set, the contents of variable | 'CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS' will be used as is. | This warning is for project developers. Use -Wno-dev to suppress it. | -- Generating done (0.0s) | CMake Warning (dev) at /Users/runner/work/hidapi/hidapi/build_meson/subprojects/hidapi_build_cmake/__CMake_build/root/mac/CMakeLists.txt:5 (add_library): | Policy CMP0181 is not set: Link command-line fragment variables are parsed | and re-quoted. Run "cmake --help-policy CMP0181" for policy details. Use | the cmake_policy command to set the policy and suppress this warning. | Since the policy is not set, the contents of variable | 'CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS' will be used as is. | This warning is for project developers. Use -Wno-dev to suppress it. | -- Build files have been written to: /Users/runner/work/hidapi/hidapi/build_meson/subprojects/hidapi_build_cmake/__CMake_build hidapi_build_cmake| CMake configuration: SUCCEEDED hidapi_build_cmake| CMake project hidapi 0.16.0 has 2 build targets. hidapi_build_cmake| Generated Meson AST: /Users/runner/work/hidapi/hidapi/build_meson/subprojects/hidapi_build_cmake/meson.build hidapi_build_cmake| Project name: hidapi hidapi_build_cmake| Project version: 0.16.0 hidapi_build_cmake| C compiler for the host machine: cc (clang 17.0.0 "Apple clang version 17.0.0 (clang-1700.0.13.5)") hidapi_build_cmake| C linker for the host machine: cc ld64 1167.5 hidapi_build_cmake| Build targets in project: 1 hidapi_build_cmake| Subproject hidapi_build_cmake finished. Build targets in project: 1 hidapi 0.16.0 Subprojects hidapi_build_cmake: YES Found ninja-1.13.2 at /opt/homebrew/bin/ninja [1/2] Compiling C object subprojects/hidapi_build_cmake/libhidapi_darwin.0.dylib.p/aaaeb6a1f26d7f4ea0f41f8d0147ef101ed85373_hidapi_build_cmake___CMake_build_root_mac_hid.c.o [2/2] Linking target subprojects/hidapi_build_cmake/libhidapi_darwin.0.dylib ```
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#805
No description provided.