[Development] Fixing the 6.5 build when cross-compiling (missing Qt6::qtprotobufgen)

Alexandru Croitor alexandru.croitor at qt.io
Fri Jan 13 12:18:43 CET 2023


Hi,

Is this still a problem? If yes, please file a bug report so this is not lost.

If I understand correctly, your host build had no protobufgen installed, and the wasm build fails to configure then.
For other repos, in a situation like this, the module is skipped (e.g. qtdeclarative + qmlcachegen).

Something like https://codereview.qt-project.org/c/qt/qtbase/+/452475 might also be helpful.


> On 22. Dec 2022, at 11:58, Morten Sørvig via Development <development at qt-project.org> wrote:
> 
> Hi, I’m running into a configure error for a top-level Qt 6.5 wasm build. I use “init-repository --module-subset=all” to check out the Qt modules.
> 
> The host system does not have protobuf installed, which configure warns me about during the host tools build (this is fine):
> 
> -- Configuring submodule 'qtgrpc'
> -- [QtGrpc] CMAKE_BUILD_TYPE was set to: 'Release'
> -- [QtGrpc] CMAKE_STRIP (original): /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip
> -- [QtGrpc] Could NOT find Protobuf (missing: Protobuf_LIBRARIES Protobuf_INCLUDE_DIR) 
> -- [QtGrpc] Could NOT find Protobuf (missing: Protobuf_LIBRARIES Protobuf_INCLUDE_DIR) 
> -- [QtGrpc] Could NOT find Protobuf (missing: Protobuf_LIBRARIES Protobuf_INCLUDE_DIR) 
> -- [QtGrpc] Could NOT find Protobuf (missing: Protobuf_LIBRARIES Protobuf_INCLUDE_DIR) 
> 
> But then, during the target (wasm) build the warning gets upgraded to an error:
> 
> -- Configuring submodule 'qtgrpc'
> -- [QtGrpc] CMAKE_BUILD_TYPE was set to: 'Debug'
> -- [QtGrpc] Could NOT find Protobuf (missing: Protobuf_LIBRARIES Protobuf_INCLUDE_DIR) 
> -- [QtGrpc] Could NOT find Protobuf (missing: Protobuf_LIBRARIES Protobuf_INCLUDE_DIR) 
> -- [QtGrpc] Could NOT find Protobuf (missing: Protobuf_LIBRARIES Protobuf_INCLUDE_DIR) 
> -- [QtGrpc] Running syncqt.cpp for module: QtProtobuf
> -- [QtGrpc] Searching for tool 'Qt6::qtprotobufgen' in package Qt6ProtobufTools.
> -- Could NOT find Qt6ProtobufTools (missing: Qt6ProtobufTools_DIR)
> CMake Error at qtbase/cmake/QtToolHelpers.cmake:605 (message):
>   Failed to find the host tool "Qt6::qtprotobufgen".  It is part of the
>   Qt6ProtobufTools package, but the package could not be found.  Make sure
>   you have built and installed the host Protobuf module, which will ensure
>   the creation of the Qt6ProtobufTools package.
> Call Stack (most recent call first):
>   qtbase/cmake/QtToolHelpers.cmake:55 (qt_internal_find_tool)
>   qtgrpc/src/tools/qtprotobufgen/CMakeLists.txt:9 (qt_internal_add_tool)
> 
> 
> Could we find a different way to handle this where it does not become a configure error for the top-level Qt build? Especially if we continue to add special-purpose modules it can become difficult to satisfy all host requirements for all modules.
> 
> 
> Morten
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> https://lists.qt-project.org/listinfo/development



More information about the Development mailing list