-
Notifications
You must be signed in to change notification settings - Fork 70
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
Ask for Help in Solving Bazel Build Problem #471
Comments
@NicolausLiu Could you provide the commit ID of YACL, bazel build command, and the container image information. |
The container image information: Centos:latest, sha256:5d0da3dc976460b72c77d94c8a1ad043720b0416bfc16c52c45d4847e53fadb6. I just git clone the yacl code without noticing the commit ID of YACL. The bazel build command is "bazel build //yacl/...".
commit 2f5f453
commit 109d334
commit a493712
commit d06a8de
commit b07fcac
commit f724366 (tag: 0.4.5b10-nightly-20250110)
commit dad0433
commit 25db0bf (tag: 0.4.5b10-nightly-20241224)
commit 3fd1cb6
commit b91d7e6
commit 871832a
commit 3df391a
commit 9c314d2
commit fc0fe17
commit b91787c
commit b2e3d2f
commit 3f5b224
commit c1de028
commit b9dc6c3
commit ecbe46b
commit 13f9763 |
If you'd like to build inside a container, we recommend using our pre-built image: |
Thank you very much. Unfortunately, I just operated according to Getting Started in yacl within a container, but the build error still appeared. Is there a document for this image? |
Can you list your operating steps? The image steps# 1. clone yacl & cd yacl
$ git clone https://github.com/secretflow/yacl.git && cd yacl
# 2. start container
$ docker run -d -it --name yacl-dev-$(whoami) \
--mount type=bind,source="$(pwd)",target=/home/admin/dev/ \
-w /home/admin/dev \
--cap-add=SYS_PTRACE --security-opt seccomp=unconfined \
--cap-add=NET_ADMIN \
--privileged=true \
secretflow/ubuntu-base-ci:latest \
bash
$ docker exec -it yacl-dev-$(whoami) bash
# now, you are in container
# 3. start build
$ bazel build //yacl/... |
@NicolausLiu could you please tell us your bazel version? |
(base)root@da7f4017cdbd:/experiments/yacl_t# git clone https://github.com/secretflow/yacl.git (base)root@da7f4017cdbd:/experiments/yacl_t# apt install gcc wget cmake ninja-build nasm automake libtool libomp-dev (base) root@da7f4017cdbd:/experiments/yacl_t# bazel build //yacl/... (base) root@da7f4017cdbd:/experiments/yacl_t# touch WORKSPACE (base)root@da7f4017cdbd:/experiments/yacl_t# bazel build //yacl/... |
What is the output of |
按照你的步骤进行了,但是出现如下报错: 两个网址尝试打开后,现实是invalid request。 |
The output is bazel 8.1.0. |
简单来看的话,你可以在你自己镜像里面,把 yacl/exmaples 删除之后再重新编译。 你的 bazel log 确实有点奇怪,我这里在 mac m1 上使用 bazel 8.1.0 编译现在的 master 是没有出现你的问题的,如果你使用的现在不是 bazelisk 是一个裸 bazel 的话,可以尝试用一下 bazelisk 试试。记得在重试之前 |
Looks like network issue |
But there seems to be no abseil-cpp folder in the bazel-registry. |
abseil-cpp should provided by official bcr here |
@NicolausLiu Yes, there is no abseil-cpp in secretflow/bazel-registry, bazel supports multiple bazel registries, it will search these registries in the order they are defined. For this case, it would resolve abseill-cpp in offical bcr. Please make sure that you have unrestricted access to Github and raw.githubusercontent.com. |
Thank you. I have fixed the build error by manually adding bazel-dep from offical bcr and libtommath release from github in a new MODULE.bazel. The bazel test yacl has also passed. Thank you guys, very much. |
I'm not sure if anyone else has encountered the same issue as me. I'm trying to build the YACL library in a Docker container on CentOS, following the "Getting Started" documentation and installing all the required libraries. I'm using Bazelisk for this process. However, I keep running into the following issue with bazel build. I've managed to resolve the dependencies for @bazel_skylib, @rules_jni, and @YacL, but the problem persists. I don't think the YACL library should be this difficult to configure, but I'm stuck with these initial issues and can't seem to find a solution. I'm reaching out for help here.
ERROR: Skipping '//yacl/...': error loading package under directory 'yacl': error loading package 'yacl/yacl/base': Every .bzl file must have a corresponding package, but '//bazel:yacl.bzl' does not have one. Please create a BUILD file in the same or any parent directory. Note that this BUILD file does not need to do anything except exist.
ERROR: error loading package under directory 'yacl': error loading package 'yacl/yacl/base': Every .bzl file must have a corresponding package, but '//bazel:yacl.bzl' does not have one. Please create a BUILD file in the same or any parent directory. Note that this BUILD file does not need to do anything except exist.
The text was updated successfully, but these errors were encountered: