已开启
Upgrade bazel to 7.4.1 for building TF-2.12.1 #47
ylzhangah创建于 2025年8月15日
Upgrade bazel to 7.4.1 for building TF-2.12.1 #47
已开启
从refs/pull/47/head合入到openEuler-25.09
共 2 个文件变更+11-15
| @@ -1,26 +1,22 @@ | |||
| 1 | %define _disable_source_fetch 0 | 1 | %define _disable_source_fetch 0 |
| 2 | 2 | ||
| 3 | Name: bazel | 3 | Name: bazel |
| 4 | -Version: 5.3.0 | 4 | +Version: 7.4.1 |
| 5 | -Release: 2 | 5 | +Release: 0 |
| 6 | Summary: Correct, reproducible, and fast builds for everyone. | 6 | Summary: Correct, reproducible, and fast builds for everyone. |
| 7 | License: Apache License 2.0 | 7 | License: Apache License 2.0 |
| 8 | URL: http://bazel.io/ | 8 | URL: http://bazel.io/ |
| 9 | Source0: https://github.com/bazelbuild/bazel/releases/download/%{version}/bazel-%{version}-dist.zip | 9 | Source0: https://github.com/bazelbuild/bazel/releases/download/%{version}/bazel-%{version}-dist.zip |
| 10 | Source1: abseil-cpp-riscv.patch | 10 | Source1: abseil-cpp-riscv.patch |
| 11 | -Patch0: 01-fix-invalid-jni_md-select.patch | 11 | +Patch0: 04-riscv-distdir_deps.patch |
| 12 | -Patch1: 02-use-riscv64-jdk.patch | ||
| 13 | -Patch2: 03-set-default-nojdk.patch | ||
| 14 | -Patch3: linux-bazel-path-from-getauxval.patch | ||
| 15 | -Patch4: 04-riscv-distdir_deps.patch | ||
| 16 | # for folks with 'bazel' v1 package installed | 12 | # for folks with 'bazel' v1 package installed |
| 17 | Conflicts: bazel | 13 | Conflicts: bazel |
| 18 | Conflicts: bazel2 | 14 | Conflicts: bazel2 |
| 19 | 15 | ||
| 20 | -BuildRequires: java-11-openjdk-devel zlib-devel findutils gcc-c++ which unzip zip python3 | 16 | +BuildRequires: java-21-openjdk-devel zlib-devel findutils gcc-c++ which unzip zip python3 |
| 21 | -BuildRequires: pkgconfig(bash-completion) | 17 | +BuildRequires: bash-completion python3-devel |
| 22 | 18 | ||
| 23 | -Requires: java-11-openjdk-devel | 19 | +Requires: java-21-openjdk-devel |
| 24 | 20 | ||
| 25 | %define bashcompdir %(pkg-config --variable=completionsdir bash-completion 2>/dev/null) | 21 | %define bashcompdir %(pkg-config --variable=completionsdir bash-completion 2>/dev/null) |
| 26 | %global debug_package %{nil} | 22 | %global debug_package %{nil} |
| @@ -31,12 +27,8 @@ Correct, reproducible, and fast builds for everyone. | |||
| 31 | 27 | ||
| 32 | %prep | 28 | %prep |
| 33 | %setup -q -c -n bazel-%{version} | 29 | %setup -q -c -n bazel-%{version} |
| 34 | -%patch0 -p1 | ||
| 35 | -#%patch1 -p1 | ||
| 36 | -%patch2 -p1 | ||
| 37 | -%patch3 -p1 | ||
| 38 | %ifarch riscv64 | 30 | %ifarch riscv64 |
| 39 | -%patch4 -p1 | 31 | +%patch -P0 -p1 |
这里的patch无法apply,同时之前apply patch的方法也失效了 ![]() ![]() | |||
| 40 | mkdir third_party/abseil-cpp | 32 | mkdir third_party/abseil-cpp |
| 41 | cp %{SOURCE1} third_party/abseil-cpp | 33 | cp %{SOURCE1} third_party/abseil-cpp |
| 42 | %endif | 34 | %endif |
| @@ -76,6 +68,7 @@ g++ --version | |||
| 76 | export TMPDIR=%{_tmppath} | 68 | export TMPDIR=%{_tmppath} |
| 77 | export CC=gcc | 69 | export CC=gcc |
| 78 | export CXX=g++ | 70 | export CXX=g++ |
| 71 | +export JAVA_HOME=/usr/lib/jvm/java-21-openjdk | ||
| 79 | export EXTRA_BAZEL_ARGS="${EXTRA_BAZEL_ARGS} --sandbox_debug --tool_java_runtime_version=local_jdk --verbose_failures --subcommands --explain=build.log --show_result=2147483647" | 72 | export EXTRA_BAZEL_ARGS="${EXTRA_BAZEL_ARGS} --sandbox_debug --tool_java_runtime_version=local_jdk --verbose_failures --subcommands --explain=build.log --show_result=2147483647" |
| 80 | env ./compile.sh | 73 | env ./compile.sh |
| 81 | env ./scripts/generate_bash_completion.sh --bazel=output/bazel --output=output/bazel-complete.bash | 74 | env ./scripts/generate_bash_completion.sh --bazel=output/bazel --output=output/bazel-complete.bash |
| @@ -99,6 +92,9 @@ env ./scripts/generate_bash_completion.sh --bazel=output/bazel --output=output/b | |||
| 99 | %attr(0755,root,root) %{bashcompdir}/bazel | 92 | %attr(0755,root,root) %{bashcompdir}/bazel |
| 100 | 93 | ||
| 101 | %changelog | 94 | %changelog |
| 95 | +* Fri Aug 15 2025 Yale Zhang <ylzhangah@qq.com> - 7.4.1-0 | ||
| 96 | +- Upgrade bazel to 7.4.1 for building TF-2.12.1 | ||
| 97 | + | ||
| 102 | * Tue Jul 09 2024 laokz <zhangkai@iscas.ac.cn> - 5.3.0-2 | 98 | * Tue Jul 09 2024 laokz <zhangkai@iscas.ac.cn> - 5.3.0-2 |
| 103 | - riscv64: fix 'rdcycle' SIGILL of dependency abseil-cpp | 99 | - riscv64: fix 'rdcycle' SIGILL of dependency abseil-cpp |
| 104 | 100 | ||


patch0-patch3文件没有删除