Due to the recent GCC 12.1 update, if you try to update a Mozc package that was built with an older GCC version you will need to yet again delete your Bazel cache (~/.cache/bazel/...
by default) in order to prevent the following error (or some such):
ERROR: /build/mozc/src/mozc-git/src/storage/louds/BUILD.bazel:167:16: Compiling storage/louds/bit_stream.cc [for host] failed: undeclared inclusion(s) in rule '//storage/louds:bit_stream':
this rule is missing dependency declarations for the following files included by 'storage/louds/bit_stream.cc':
'/usr/lib/gcc/x86_64-pc-linux-gnu/12.1.0/include/stddef.h'
'/usr/lib/gcc/x86_64-pc-linux-gnu/12.1.0/include/stdarg.h'
'/usr/lib/gcc/x86_64-pc-linux-gnu/12.1.0/include/stdint.h'
'/usr/lib/gcc/x86_64-pc-linux-gnu/12.1.0/include-fixed/limits.h'
'/usr/lib/gcc/x86_64-pc-linux-gnu/12.1.0/include-fixed/syslimits.h'
INFO: Elapsed time: 5.362s, Critical Path: 1.28s
INFO: 36 processes: 13 internal, 23 linux-sandbox.
FAILED: Build did NOT complete successfully
It's more than likely that this error can also be prevented by removing one or more specific files within Bazel's cache instead of the whole lot of it, so in the future such toolchain updates may become much less painful; but for the time being, and unless otherwise noted, be aware that an updated toolchain will always mean that you need to delete Bazel's cache and suffer a full recompilation.
Pinned Comments
Nocifer commented on 2022-05-29 21:56 (UTC)
Due to the recent GCC 12.1 update, if you try to update a Mozc package that was built with an older GCC version you will need to yet again delete your Bazel cache (
~/.cache/bazel/...
by default) in order to prevent the following error (or some such):It's more than likely that this error can also be prevented by removing one or more specific files within Bazel's cache instead of the whole lot of it, so in the future such toolchain updates may become much less painful; but for the time being, and unless otherwise noted, be aware that an updated toolchain will always mean that you need to delete Bazel's cache and suffer a full recompilation.