gpt4 book ai didi

centos - Centos 7 上的 Bazel 0.29.1 LLVM-7.0

转载 作者:行者123 更新时间:2023-12-04 19:30:13 25 4
gpt4 key购买 nike

所以我有一个安装了 bazel 的 CentOS 7 docker。
我已经安装了 devtoolset-8、llvm-toolset-7.0 和 centos-release-scl。
我还安装了 bazel 0.29.1 并制作了。

export CC=clang
export CXX=clang++

我有一个运行巴塞尔的 shell 脚本。在我拥有的脚本顶部执行 bazel build 命令之前
source /opt/rh/llvm-toolset-7.0/enable

启用 LLVM-7.0/Clang-7.0。但构建失败:

/opt/rh/llvm-toolset-7.0/root/usr/bin/clang: error while loading shared libraries: libLLVM-7.so: cannot open shared object file: No such file or directory



但是这个库是存在的!它在/opt/rh/llvm-toolset-7.0/root/usr/lib64/

有人可以帮忙吗?

最佳答案

在 .bash_profile 或 .bashrc 中添加以下内容:

source /opt/rh/llvm-toolset-7.0/enable
export CC=/opt/rh/llvm-toolset-7.0/root/usr/bin/clang
export CXX=/opt/rh/llvm-toolset-7.0/root/usr/bin/clang++
在下面以 Root 身份运行
echo /opt/rh/llvm-toolset-7.0/root/usr/lib64/ > /etc/ld.so.conf.d/llvm-toolset.conf
ldconfig

关于centos - Centos 7 上的 Bazel 0.29.1 LLVM-7.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58451453/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com