Cross Compilation Causes protoc Missing Error
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 28/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- cpp
- 領域
- build-system
調査の方向性
Start with the generated checks in ola.m4 and the configure command for the x86_64-to-aarch64 build, then inspect the Makefile target reported at line 19184. Trace how the protoc plugin is selected and built in the --with-ola-protoc-plugin case. Done means cross-compilation completes the header and libprotoc checks and make all can execute the plugin to generate the protocol files.
索引モデルが issue の本文から書いたものです。
説明
Hello!
I am able to compile fine for x86_64 on this system. When I try to cross-compile for aarch64, Autoconf is refusing to use the header files for protoc that are definitely present:
./configure --build x86_64-linux-gnu --host aarch64-linux-gnu CPPFLAGS=-Wno-deprecated-declarations
checking for libprotobuf... yes
checking for protoc... /usr/bin/protoc
checking protoc version... 3.12.4
checking google/protobuf/compiler/command_line_interface.h usability... no
checking google/protobuf/compiler/command_line_interface.h presence... yes
configure: WARNING: google/protobuf/compiler/command_line_interface.h: present but cannot be compiled
configure: WARNING: google/protobuf/compiler/command_line_interface.h: check for missing prerequisite headers?
configure: WARNING: google/protobuf/compiler/command_line_interface.h: see the Autoconf documentation
configure: WARNING: google/protobuf/compiler/command_line_interface.h: section "Present But Cannot Be Compiled"
configure: WARNING: google/protobuf/compiler/command_line_interface.h: proceeding with the compiler's result
configure: WARNING: ## --------------------------------------------- ##
configure: WARNING: ## Report this to [email protected] ##
configure: WARNING: ## --------------------------------------------- ##
checking for google/protobuf/compiler/command_line_interface.h... no
configure: error: Cannot find the protoc header files
This appears to be coming from this auto-generated bit in ola.m4:
if test "$with_ola_protoc_plugin" != "no"; then
OLA_PROTOC="$PROTOC --plugin=protoc-gen-cppservice=${with_ola_protoc_plugin}";
echo "set ola_protoc to $OLA_PROTOC"
else
OLA_PROTOC="$PROTOC --plugin=protoc-gen-cppservice=\$(top_builddir)/protoc/ola_protoc_plugin${EXEEXT}";
AC_CHECK_HEADER(
[google/protobuf/compiler/command_line_interface.h],
[],
AC_MSG_ERROR([Cannot find the protoc header files]))
SAVED_LIBS=$LIBS
LIBS="$LIBS -lprotoc"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([#include <google/protobuf/compiler/command_line_interface.h>],
[google::protobuf::compiler::CommandLineInterface cli])],
[TEST_LIBS="$TEST_LIBS -lprotoc"] [],
[AC_MSG_ERROR([cannot find libprotoc])])
LIBS=$SAVED_LIBS
fi
AC_SUBST([OLA_PROTOC])
AM_CONDITIONAL(BUILD_OLA_PROTOC_PLUGIN, test "${with_ola_protoc_plugin}" = "no")
])
I also tried this, but make all then fails because the protoc/ola_protoc_plugin executable doesn't actually get compiled:
./configure --build x86_64-linux-gnu --host aarch64-linux-gnu --with-protoc=/usr/bin/protoc --with-ola-protoc-plugin=protoc/ola_protoc_plugin CPPFLAGS=-Wno-deprecated-declarations
$ make all -j2
/usr/bin/protoc --plugin=protoc-gen-cppservice=protoc/ola_protoc_plugin --cppservice_out ./common/protocol --proto_path ./common/protocol ./common/protocol/Ola.proto
/usr/bin/protoc --plugin=protoc-gen-cppservice=protoc/ola_protoc_plugin --cppservice_out ./common/protocol --proto_path ./common/protocol ./common/protocol/Ola.proto
[libprotobuf WARNING google/protobuf/compiler/parser.cc:648] No syntax specified for the proto file: Ola.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.)
[libprotobuf WARNING google/protobuf/compiler/parser.cc:648] No syntax specified for the proto file: Ola.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.)
protoc/ola_protoc_plugin: program not found or is not executable
Please specify a program using absolute path or make sure the program is available in your PATH system variable
--cppservice_out: protoc-gen-cppservice: Plugin failed with status code 1.
make: *** [Makefile:19184: common/protocol/OlaService.pb.h] Error 1
make: *** Waiting for unfinished jobs....
protoc/ola_protoc_plugin: program not found or is not executable
Please specify a program using absolute path or make sure the program is available in your PATH system variable
--cppservice_out: protoc-gen-cppservice: Plugin failed with status code 1.
make: *** [Makefile:19184: common/protocol/OlaService.pb.cpp] Error 1
- 主要言語
- C++
- スター
- 773
- フォーク
- 233
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
OpenLightingProject/ola のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
OpenLightingProject/ola#2075 ·
-
Digital Enlightenment / FX5 not recognized対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンquestion Type-DeviceSupport
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
OpenLightingProject/ola#2056 · コメント 2 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
OpenLightingProject/ola#2055 ·
-
Difficulty-Medium Language-C++ Maintainability OpSys-All
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
OpenLightingProject/ola#2053 · コメント 1 件 ·
-
v0.11.0再び着手できるかも @peternewman が 227 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
OpenLightingProject/ola#2038 · コメント 18 件 · 担当者 2 名 ·
OpenLightingProject/ola の issue をすべて見る
似ている issue
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
Awesome-Embedded-Learning-Studio/Tutorial_AwesomeModernCPP#335 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
deepseek-ai/DeepEP#830 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
google-ai-edge/LiteRT-LM#4701 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
HarperFast/rocksdb-js#1131 ·
メンテナーはふだん 1 日以内に返信
-
Swapped cache lookups in ScanModelAndDecideAllDiffExpansion対応中かも @Lian292213 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信