-
Notifications
You must be signed in to change notification settings - Fork 278
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
zetasql/2024.11.1 package update #34096
base: main
Are you sure you want to change the base?
Conversation
octo-sts
bot
commented
Nov 13, 2024
Signed-off-by: wolfi-bot <121097084+wolfi-bot@users.noreply.github.com>
Gen AI suggestions to solve the build error: Based on the error output, there are a few issues to address:
Suggestions to fix:
# When in interactive mode
ls -R | grep BUILD # List all BUILD files
resources:
cpu: 33
memory: 100Gi These are quite high but might be necessary for Bazel builds.
This can be ignored for now as it's not blocking the build process. Next steps:
To recreate the patch if needed: git diff > new-multi-arch-for-linux.patch Focus on fixing the patch file paths first, as this is the immediate cause of the build failure. |
Important previous context here: #26865 |
Signed-off-by: hectorj2f <hector@chainguard.dev>
Gen AI suggestions to solve the build error: • Detected Error:
• Error Category: Build Configuration • Failure Point: LLVM toolchain setup in Bazel build system • Root Cause Analysis: The LLVM toolchain rules don't recognize Wolfi OS as a supported Linux distribution for building. This is common when using newer or non-mainstream distributions with build tools that have hard-coded OS checks. • Suggested Fix: environment:
contents:
packages:
- llvm15
- clang15
environment:
BAZEL_ARGS: "--config=g++ --sandbox_add_mount_pair=/usr/lib/llvm15" • Explanation:
• Additional Notes:
• References:
|
Gen AI suggestions to solve the build error: • Detected Error: "Unsupported linux distribution and version: wolfi, 20230201" • Error Category: Build Configuration • Failure Point: LLVM toolchain repository setup during Bazel build • Root Cause Analysis: The LLVM toolchain build rules don't recognize Wolfi OS as a supported distribution. The toolchain is attempting to detect the host OS and failing because Wolfi isn't in its list of known distributions. • Suggested Fix: environment:
contents:
packages:
# ... existing packages ...
- llvm15
- llvm15-dev
environment:
# ... existing env vars ...
BAZEL_ARGS: "--config=g++ --sandbox_add_mount_pair=/usr/lib/llvm15 --action_env=LLVM_COMMIT=llvm-15 --action_env=DISTRIBUTION=debian --action_env=DISTRIBUTION_VERSION=11" • Explanation:
• Additional Notes:
• References: |
Gen AI suggestions to solve the build error: • Detected Error: "Unsupported linux distribution and version: wolfi, 20230201" • Error Category: Configuration/Build System • Failure Point: LLVM toolchain repository initialization during Bazel build • Root Cause Analysis: The LLVM toolchain build rules don't recognize Wolfi OS as a supported distribution. The toolchain is trying to detect the host OS for building LLVM components but fails because Wolfi isn't in its list of known distributions. • Suggested Fix: pipeline:
- uses: git-checkout
with:
repository: https://github.com/google/zetasql
tag: ${{package.version}}
expected-commit: a516c6b26d183efc4f56293256bba92e243b7a61
- uses: patch
with:
patches: multi-arch-for-linux.patch
- runs: |
cd zetasql
bazel build --verbose_failures ${BAZEL_ARGS} $EXTRA_BAZEL_ARGS \
--action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 \
--host_platform=@local_config_platform//:host \
--platforms=@local_config_platform//:host \
-c opt ... • Explanation: • Additional Notes:
• References:
|
Gen AI suggestions to solve the build error: • Detected Error:
• Error Category: Dependency/Version • Failure Point: Bazel server startup during build process • Root Cause Analysis: • Suggested Fix: environment:
contents:
packages:
- openjdk-21
- openjdk-21-default-jvm
# ... other packages ...
environment:
JAVA_HOME: /usr/lib/jvm/java-21-openjdk • Explanation: • Additional Notes:
• References:
|
Gen AI suggestions to solve the build error: • Detected Error: "Unsupported linux distribution and version: wolfi, 20230201" • Error Category: Configuration/Dependency • Failure Point: Bazel's LLVM toolchain configuration during the build process • Root Cause Analysis: • Suggested Fix: environment:
contents:
packages:
- llvm15
- llvm15-dev
- clang15
# Add existing packages...
pipeline:
- runs: |
cd zetasql
bazel build --verbose_failures ${BAZEL_ARGS} $EXTRA_BAZEL_ARGS \
--action_env=CC=/usr/bin/clang \
--action_env=CXX=/usr/bin/clang++ \
--action_env=LLVM_CONFIG=/usr/bin/llvm-config \
-c opt ... • Explanation: • Additional Notes:
• References: |
Gen AI suggestions to solve the build error: • Detected Error: "Unsupported linux distribution and version: wolfi, 20230201" • Error Category: Build Configuration • Failure Point: LLVM toolchain repository fetch during Bazel build • Root Cause Analysis: The LLVM toolchain build rule doesn't recognize Wolfi as a supported Linux distribution. This is common with build systems that have hard-coded distribution checks. • Suggested Fix:
environment:
BAZEL_ARGS: "--config=g++"
EXTRA_BAZEL_ARGS: "--tool_java_runtime_version=local_jdk"
JAVA_HOME: /usr/lib/jvm/java-17-openjdk
# Add these lines:
CC: clang
CXX: clang++
BAZEL_LLVM: "/usr"
- runs: |
cd zetasql
# Configure to use system LLVM
echo "build --action_env=BAZEL_LLVM=/usr" >> .bazelrc
echo "build --action_env=CC=clang" >> .bazelrc
echo "build --action_env=CXX=clang++" >> .bazelrc
bazel build --verbose_failures ${BAZEL_ARGS} $EXTRA_BAZEL_ARGS -c opt ... • Explanation:
• Additional Notes:
• References:
|
f7720ff
to
1917b4a
Compare
Gen AI suggestions to solve the build error: • Detected Error:
• Error Category: Build Configuration/Dependency • Failure Point: • Root Cause Analysis: • Suggested Fix: environment:
contents:
packages:
- bash
- bazel-6
- binutils
- build-base
- busybox
- ca-certificates-bundle
- gcc-12
- git
- openjdk-17
- openjdk-17-default-jvm
- openssf-compiler-options
- patch
- python3
- tzdata
- wolfi-baselayout
- llvm15
- llvm15-dev
- clang15 • Explanation: • Additional Notes:
• References:
|
👋 @hbh7 - As we are implementing the new interrupts/escalation process, would you mind adding and filling out the escalation template on this one? |
Reason for Escalation / Level of UrgencyPackage build is failing for an unknown reason. Medium priority, not known to be blocking anything but this has now been open for an extended period of time. If prospect/customer issue, please provide needed by dateN/A Short Description (Context / Steps already done)Build is failing possibly due to the following error. Error Messages / Logs
Steps to Reproduce
Customers / Images / SLA affectedUnknown Possible SolutionUnknown |
I'm new to bazel builds. I had to do some hacking of the build tree to get it to try and build with the system toolchain. That's especially annoying because we're asking it to build w/ gcc, not llvm/clang. Advice on better ways to do this welcome.
I then set up a bunch of symlinks:
With that, I was able to get a build going and I observed a familiar error message:
See: #34075 The workaround we've been implementing for this is to set |
I can avoid the symlinking and just comment out the diff --git a/WORKSPACE b/WORKSPACE
index 994ce01..6d33ddb 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -37,13 +37,13 @@ workspace(name = "com_google_zetasql")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
-http_archive(
- name = "toolchains_llvm",
- canonical_id = "1.0.0",
- sha256 = "e91c4361f99011a54814e1afbe5c436e0d329871146a3cd58c23a2b4afb50737",
- strip_prefix = "toolchains_llvm-1.0.0",
- url = "https://github.com/bazel-contrib/toolchains_llvm/releases/download/1.0.0/toolchains_llvm-1.0.0.tar.gz",
-)
+# http_archive(
+# name = "toolchains_llvm",
+# canonical_id = "1.0.0",
+# sha256 = "e91c4361f99011a54814e1afbe5c436e0d329871146a3cd58c23a2b4afb50737",
+# strip_prefix = "toolchains_llvm-1.0.0",
+# url = "https://github.com/bazel-contrib/toolchains_llvm/releases/download/1.0.0/toolchains_llvm-1.0.0.tar.gz",
+# )
http_archive(
name = "rules_jvm_external",
diff --git a/bazel/zetasql_deps_step_1.bzl b/bazel/zetasql_deps_step_1.bzl
index 825bf8e..1fde594 100644
--- a/bazel/zetasql_deps_step_1.bzl
+++ b/bazel/zetasql_deps_step_1.bzl
@@ -22,25 +22,25 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# but depend on them being something different. So we have to override them both
# by defining the repo first.
load("@com_google_zetasql//bazel:zetasql_bazel_version.bzl", "zetasql_bazel_version")
-load("@toolchains_llvm//toolchain:deps.bzl", "bazel_toolchain_dependencies")
-load("@toolchains_llvm//toolchain:rules.bzl", "llvm_toolchain")
+# load("@toolchains_llvm//toolchain:deps.bzl", "bazel_toolchain_dependencies")
+# load("@toolchains_llvm//toolchain:rules.bzl", "llvm_toolchain")
def zetasql_deps_step_1(add_bazel_version = True):
if add_bazel_version:
zetasql_bazel_version()
- bazel_toolchain_dependencies()
- llvm_toolchain(
- name = "llvm_toolchain",
- llvm_versions = {
- "": "16.0.0",
- # The LLVM repo stops providing pre-built binaries for the MacOS x86_64
- # architecture for versions >= 16.0.0: https://github.com/llvm/llvm-project/releases,
- # but our Kokoro MacOS tests are still using x86_64 (ventura).
- # TODO: Upgrade the MacOS version to sonoma-slcn.
- "darwin-x86_64": "15.0.7",
- },
- )
+ # bazel_toolchain_dependencies()
+ # llvm_toolchain(
+ # name = "llvm_toolchain",
+ # llvm_versions = {
+ # "": "16.0.0",
+ # # The LLVM repo stops providing pre-built binaries for the MacOS x86_64
+ # # architecture for versions >= 16.0.0: https://github.com/llvm/llvm-project/releases,
+ # # but our Kokoro MacOS tests are still using x86_64 (ventura).
+ # # TODO: Upgrade the MacOS version to sonoma-slcn.
+ # "darwin-x86_64": "15.0.7",
+ # },
+ # )
http_archive(
name = "io_bazel_rules_go",
diff --git a/bazel/zetasql_deps_step_2.bzl b/bazel/zetasql_deps_step_2.bzl
index 6873dbe..03cd8df 100644
--- a/bazel/zetasql_deps_step_2.bzl
+++ b/bazel/zetasql_deps_step_2.bzl
@@ -19,7 +19,7 @@
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
-load("@llvm_toolchain//:toolchains.bzl", "llvm_register_toolchains")
+# load("@llvm_toolchain//:toolchains.bzl", "llvm_register_toolchains")
load("@rules_bison//bison:bison.bzl", "bison_register_toolchains")
load("@rules_flex//flex:flex.bzl", "flex_register_toolchains")
load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies")
@@ -29,7 +29,7 @@ load("@rules_proto//proto:setup.bzl", "rules_proto_setup")
load("@rules_proto//proto:toolchains.bzl", "rules_proto_toolchains")
def _load_deps_from_step_1():
- llvm_register_toolchains()
+# llvm_register_toolchains()
rules_foreign_cc_dependencies()
def textmapper_dependencies(): As a test, I replaced the system With the truncated-spec-file workaround, I then hit failures with tests that use non-latin filenames in But long story short, there seems to be a lot going on with this one. |