Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bazel 3.4.1 + openjdk-11 + gcc 9.4(编译安装) + clang-8 环境编译scann不通过报错: #707

Open
frederic89 opened this issue Feb 6, 2023 · 2 comments

Comments

@frederic89
Copy link

在进入到Bazel编译时报错如下,已经科学上网
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
Loading:
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Analyzing: target //:build_pip_pkg (1 packages loaded, 0 targets configured)
Analyzing: target //:build_pip_pkg (6 packages loaded, 5 targets configured)
Analyzing: target //:build_pip_pkg (6 packages loaded, 5 targets configured)
Analyzing: target //:build_pip_pkg (6 packages loaded, 5 targets configured)
INFO: Repository local_config_cc instantiated at:
no stack (--record_rule_instantiation_callstack not enabled)
Repository rule cc_autoconf defined at:
/root/.cache/bazel/_bazel_root/1fd1b682e65630d5ac25a25ae95f5b5c/external/bazel_tools/tools/cpp/cc_configure.bzl:143:30: in
ERROR: An error occurred during the fetch of repository 'local_config_cc':
Traceback (most recent call last):
File "/root/.cache/bazel/_bazel_root/1fd1b682e65630d5ac25a25ae95f5b5c/external/bazel_tools/tools/cpp/cc_configure.bzl", line 125
configure_unix_toolchain(<3 more arguments>)
File "/root/.cache/bazel/_bazel_root/1fd1b682e65630d5ac25a25ae95f5b5c/external/bazel_tools/tools/cpp/unix_cc_configure.bzl", line 352, in configure_unix_toolchain
_find_generic(repository_ctx, <3 more arguments>)
File "/root/.cache/bazel/_bazel_root/1fd1b682e65630d5ac25a25ae95f5b5c/external/bazel_tools/tools/cpp/unix_cc_configure.bzl", line 322, in _find_generic
auto_configure_fail(msg)
File "/root/.cache/bazel/_bazel_root/1fd1b682e65630d5ac25a25ae95f5b5c/external/bazel_tools/tools/cpp/lib_cc_configure.bzl", line 112, in auto_configure_fail
fail(<1 more arguments>)

Auto-Configuration Error: Cannot find gcc or CC (clang); either correct your path or set the CC environment variable
ERROR: /root/.cache/bazel/_bazel_root/1fd1b682e65630d5ac25a25ae95f5b5c/external/bazel_tools/src/tools/launcher/BUILD:9:14: @bazel_tools//src/tools/launcher:launcher depends on @local_config_cc//:cc-compiler-k8 in repository @local_config_cc which failed to fetch. no such package '@local_config_cc//': Traceback (most recent call last):
File "/root/.cache/bazel/_bazel_root/1fd1b682e65630d5ac25a25ae95f5b5c/external/bazel_tools/tools/cpp/cc_configure.bzl", line 125
configure_unix_toolchain(<3 more arguments>)
File "/root/.cache/bazel/_bazel_root/1fd1b682e65630d5ac25a25ae95f5b5c/external/bazel_tools/tools/cpp/unix_cc_configure.bzl", line 352, in configure_unix_toolchain
_find_generic(repository_ctx, <3 more arguments>)
File "/root/.cache/bazel/_bazel_root/1fd1b682e65630d5ac25a25ae95f5b5c/external/bazel_tools/tools/cpp/unix_cc_configure.bzl", line 322, in _find_generic
auto_configure_fail(msg)
File "/root/.cache/bazel/_bazel_root/1fd1b682e65630d5ac25a25ae95f5b5c/external/bazel_tools/tools/cpp/lib_cc_configure.bzl", line 112, in auto_configure_fail
fail(<1 more arguments>)

Auto-Configuration Error: Cannot find gcc or CC (clang); either correct your path or set the CC environment variable
ERROR: Analysis of target '//:build_pip_pkg' failed; build aborted: Analysis failed
INFO: Elapsed time: 138.537s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (20 packages loaded, 59 targets configured)
FAILED: Build did NOT complete successfully (20 packages loaded, 59 targets configured)
scann bazel build error
-- SCANN BUILD ERROR, EXEC_RET_VAL=2
CMake Error at CMakeLists.txt:233 (EXIT):
Unknown CMake command "EXIT".

bazel 3.4.1 + openjdk-11 + gcc 9.4(编译安装) + clang-8

bazel 3.4.1 安装自 https://mirrors.huaweicloud.com/bazel/3.4.1/bazel-3.4.1-installer-linux-x86_64.sh
openjdk 安装自yum install
(gcc+clang 在env的中配置
echo "export CC=clang" >> /etc/bashrc
echo "export CXX=clang++" >> /etc/bashrc
echo "export PATH=$PATH:/usr/local/clang/bin" >> /etc/bashrc)

@zcdb
Copy link
Member

zcdb commented Feb 16, 2023

CC和CXX配置成gcc和g++的路径

@gyd-a
Copy link
Collaborator

gyd-a commented Mar 30, 2023

可以使用guoyande/gamma:scann镜像构建,镜像内bazel、gcc9、clang8均安装,需要手动安装一个python3.7/3.8, 然后pip install tensorflow~=2.5.0,最后编译scann 选项打开,正常编译gamma就可以。值的注意的是,scann需要下载github代码注意网络正常

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants