This is an automated email from the ASF dual-hosted git repository.

lizhimin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/rocketmq-apis.git


The following commit(s) were added to refs/heads/main by this push:
     new f4e9239  build(bazel): Compile using the specified versions of GCC and 
G++ (#97)
f4e9239 is described below

commit f4e923933a2ed281a27abbea7fde32465770e4af
Author: lizhimins <[email protected]>
AuthorDate: Tue Oct 14 19:28:08 2025 +0800

    build(bazel): Compile using the specified versions of GCC and G++ (#97)
    
    build(bazel): Compile using the specified versions of G++. In Ubuntu-24, 
gcc-13 is used by default. Some absl syntax can be compiled normally in gcc-11 
but cannot be compiled in gcc-13.
---
 .bazelrc                   | 4 ++--
 .github/workflows/main.yml | 2 +-
 deps.bzl                   | 1 -
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/.bazelrc b/.bazelrc
index 21901dc..874d347 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -20,8 +20,8 @@ build --javabase=@bazel_tools//tools/jdk:remote_jdk11
 build --enable_platform_specific_config
 
 # Pass PATH, CC, CXX and LLVM_CONFIG variables from the environment.
-build --action_env=CC
-build --action_env=CXX
+build --action_env=CC=gcc-11
+build --action_env=CXX=g++-11
 build --action_env=LD_LIBRARY_PATH
 build --action_env=LLVM_CONFIG
 build --action_env=PATH
\ No newline at end of file
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index feb9f2d..f8a19be 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -27,7 +27,7 @@ jobs:
       
       - name: Setup Bazel
         run: |
-          sudo apt-get -qq install npm
+          sudo apt-get -qq install npm gcc-11 g++-11
           sudo npm install -g @bazel/bazelisk
       - name: Use Bazel
         if: matrix.os != 'windows'
diff --git a/deps.bzl b/deps.bzl
index 0345afa..fd17a7b 100644
--- a/deps.bzl
+++ b/deps.bzl
@@ -38,7 +38,6 @@ def github_archive(name, org, repo, ref, sha256):
             name = name,
             strip_prefix = repo + "-" + stripRef,
             urls = [
-                
"https://mirror.bazel.build/github.com/%s/%s/archive/%s.tar.gz"; % (org, repo, 
ref),
                 "https://github.com/%s/%s/archive/%s.tar.gz"; % (org, repo, 
ref),
             ],
             sha256 = sha256,

Reply via email to