Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building on Windows with Studio enabled results in false positive protoc not found error #2629

Open
joelspadin opened this issue Nov 10, 2024 · 0 comments
Labels
bug Something isn't working studio ZMK Studio (runtime keymaps)

Comments

@joelspadin
Copy link
Collaborator

When building on windows with CONFIG_ZMK_STUDIO enabled, zephyr/modules/nanopb/nanopb.cmake will cause a fatal error on line 11 saying "'protoc' not found" unless protoc is installed and in the PATH, even though we are going to use the one provided by nanopb anyways. This is because it separately tries to find_program() protoc, and it does not search in nanopb.

The latest version of this file in Zephyr corrects this issue. It uses this instead, which loads the nanopb package and then checks if it found protoc:

find_package(Nanopb REQUIRED)

if(NOT PROTOBUF_PROTOC_EXECUTABLE)
  message(FATAL_ERROR "'protoc' not found, please ensure protoc is installed\
and in path. See https://docs.zephyrproject.org/latest/samples/modules/nanopb/README.html")
else()
  message(STATUS "Found protoc: ${PROTOBUF_PROTOC_EXECUTABLE}")
endif()
@joelspadin joelspadin added bug Something isn't working studio ZMK Studio (runtime keymaps) labels Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working studio ZMK Studio (runtime keymaps)
Projects
None yet
Development

No branches or pull requests

1 participant