微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

bazel 项目:如何添加系统包含路径?

如何解决bazel 项目:如何添加系统包含路径?

我尝试从 google-coral 构建 pycoral。这是一个 bazel 项目。它需要很多,还有cc_toolchain。 在 cc_toolchain 中配置了一些包含路径,但不适用于我的系统 (openSUSE tumbleweed)。 所以 bazel 构建声称:

undeclared inclusion(s) in rule '@flatbuffers//src:flatbuffers':
this rule is missing dependency declarations for the following files included by 'flatbuffers/src/util.cpp':
  '/usr/lib64/gcc/x86_64-suse-linux/10/include-fixed/limits.h'
  '/usr/lib64/gcc/x86_64-suse-linux/10/include-fixed/syslimits.h'
  '/usr/lib64/gcc/x86_64-suse-linux/10/include/stdint.h'
  '/usr/lib64/gcc/x86_64-suse-linux/10/include/stddef.h'
  '/usr/lib64/gcc/x86_64-suse-linux/10/include/stdarg.h'
Target //src:_pywrap_coral Failed to build

我通过 bazel 缓存文件搜索了一段时间,并在“external/crosstool/cc_toolchain_config.bzl”中找到了配置的包含路径。

CXX_BUILTIN_INCLUDE_DIRECTORIES = {
"k8": [
    "/usr/include/c++/%d" % GCC_VERSION,"/usr/include/x86_64-linux-gnu/c++/%d" % GCC_VERSION,"/usr/include/c++/%d/backward" % GCC_VERSION,"/usr/lib/gcc/x86_64-linux-gnu/%d/include" % GCC_VERSION,"/usr/local/include","/usr/lib/gcc/x86_64-linux-gnu/%d/include-fixed" % GCC_VERSION,"/usr/include/x86_64-linux-gnu","/usr/include",],

如何添加自己的包含路径?

问候

丹尼尔

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。