diff --git a/bazel-5.1.1-dist.zip b/bazel-5.3.0-dist.zip similarity index 95% rename from bazel-5.1.1-dist.zip rename to bazel-5.3.0-dist.zip index be19be117e4432a94caa0cf143332e3c57f9f6e0..971ff5ab1296823b71e5b19193fb025336195b51 100644 Binary files a/bazel-5.1.1-dist.zip and b/bazel-5.3.0-dist.zip differ diff --git a/bazel.spec b/bazel.spec index 3e026f77a5640cf56c4861cf04d7a1091a1fac84..0e9ca209be3218e369c4d849702d895c40ea0289 100644 --- a/bazel.spec +++ b/bazel.spec @@ -1,8 +1,8 @@ %define _disable_source_fetch 0 Name: bazel -Version: 5.1.1 -Release: 1 +Version: 5.3.0 +Release: 0 Summary: Correct, reproducible, and fast builds for everyone. License: Apache License 2.0 URL: http://bazel.io/ @@ -96,6 +96,9 @@ env ./scripts/generate_bash_completion.sh --bazel=output/bazel --output=output/b %attr(0755,root,root) %{bashcompdir}/bazel %changelog +* Fri Sep 08 2023 Jincheng Miao - 5.3.0-0 +- upgrade bazel to 5.3.0 for building TF-2.12.1 + * Fri Jun 09 2023 Jingwiw - 5.1.1-1 - fix riscv64 build error and add qemu user support diff --git a/linux-bazel-path-from-getauxval.patch b/linux-bazel-path-from-getauxval.patch index a68ed34558943946d401763c765cb611a2876b4c..0482feb701cefaade396b712c1c190b8e16ea17d 100644 --- a/linux-bazel-path-from-getauxval.patch +++ b/linux-bazel-path-from-getauxval.patch @@ -62,45 +62,37 @@ index c2e8e1f..33d1a96 100755 char pathbuf[PROC_PIDPATHINFO_MAXSIZE] = {}; int len = proc_pidpath(getpid(), pathbuf, sizeof(pathbuf)); if (len == 0) { -diff --git a/src/main/cpp/blaze_util_linux.cc b/src/main/cpp/blaze_util_linux.cc +diff --git a/src/main/cpp/get_self_path_linux.cc b/src/main/cpp/get_self_path_linux.cc index 2183d43..3e75ef0 100755 ---- a/src/main/cpp/blaze_util_linux.cc -+++ b/src/main/cpp/blaze_util_linux.cc -@@ -21,6 +21,7 @@ - #include - #include - #include // strerror -+#include - #include - #include - #include -@@ -29,6 +30,7 @@ - - #include "src/main/cpp/blaze_util.h" +--- a/src/main/cpp/get_self_path_linux.cc 2023-09-07 09:45:41.310000000 +0000 ++++ b/src/main/cpp/get_self_path_linux.cc 2023-09-07 09:47:28.512000000 +0000 +@@ -14,8 +14,10 @@ + + #include + #include ++#include + #include "src/main/cpp/blaze_util_platform.h" +#include "src/main/cpp/startup_options.h" #include "src/main/cpp/util/errors.h" #include "src/main/cpp/util/exit_code.h" - #include "src/main/cpp/util/file.h" -@@ -82,11 +84,13 @@ void WarnFilesystemType(const blaze_util::Path &output_base) { - } - } - + #include "src/main/cpp/util/logging.h" +@@ -25,7 +27,14 @@ namespace blaze { + using blaze_util::GetLastErrorString; + using std::string; + -string GetSelfPath(const char* argv0) { -- // The file to which this symlink points could change contents or go missing -- // concurrent with execution of the Bazel client, so we don't eagerly resolve -- // it. -- return "/proc/self/exe"; +string GetSelfPath(const char* argv0, const StartupOptions &options) { -+ // Sometimes /proc/self/exec isn't valid (binfmt_misc + qemu) -+ // so we provide an alternate API. e.g. Linux aarch64 running -+ // bazel-x86_64-linux -+ if (options.linux_bazel_path_from_getauxval) { -+ return reinterpret_cast(getauxval(AT_EXECFN)); -+ } - } - - uint64_t GetMillisecondsMonotonic() { ++ // Sometimes /proc/self/exec isn't valid (binfmt_misc + qemu) ++ // so we provide an alternate API. e.g. Linux aarch64 running ++ // bazel-x86_64-linux ++ if (options.linux_bazel_path_from_getauxval) { ++ return reinterpret_cast(getauxval(AT_EXECFN)); ++ } ++ + char buffer[PATH_MAX] = {}; + ssize_t bytes = readlink("/proc/self/exe", buffer, sizeof(buffer)); + if (bytes == sizeof(buffer)) { diff --git a/src/main/cpp/blaze_util_platform.h b/src/main/cpp/blaze_util_platform.h index 42075f1..54afa8e 100755 --- a/src/main/cpp/blaze_util_platform.h