Closed wengxt closed 8 months ago
When MOZC_USE_MOZC_TESTING is not defined, friend_test.h will try to pull in "testing/production_stub/public/gunit_prod.h", which does not exists in the repo.
bazel build -c opt --copt=-fPIC --config oss_linux --repository_cache=/tmp/cache server:mozc_server gui/tool:mozc_tool
Build works
Compiling dictionary/text_dictionary_loader.cc [for tool] failed: (Exit 1): gcc failed: error executing CppCompile command (from target //dictionary:text_dictionary_loader) /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 32 arguments skipped) Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging In file included from ./dictionary/text_dictionary_loader.h:40, from dictionary/text_dictionary_loader.cc:34: ./testing/friend_test.h:43:10: fatal error: testing/production_stub/public/gunit_prod.h: No such file or directory 43 | #include "testing/production_stub/public/gunit_prod.h" // IWYU pragma: export | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4bc273d0851c20dc45fc807ce239534bd23b99d1
It seems that MOZC_USE_MOZC_TESTING should be defined for oss_linux. (maybe some others config e.g. mac, but I don't have env to test).
Hi wengxt,
4efc54554b94e2f927a1c5f70e771351de6983ea has fixed this build break. Thank you for your report.
Description
When MOZC_USE_MOZC_TESTING is not defined, friend_test.h will try to pull in "testing/production_stub/public/gunit_prod.h", which does not exists in the repo.
Steps to reproduce
bazel build -c opt --copt=-fPIC --config oss_linux --repository_cache=/tmp/cache server:mozc_server gui/tool:mozc_tool
Expected behavior
Build works
Actual behavior
Version or commit-id
4bc273d0851c20dc45fc807ce239534bd23b99d1
Environment
It seems that MOZC_USE_MOZC_TESTING should be defined for oss_linux. (maybe some others config e.g. mac, but I don't have env to test).