[Bazel CI] Android Firebase Cloud Messaging fails on macOS arm64: zlib zutil.c does not compile with Xcode 26.6 (Bazel 7.2.0rc1)

Đang mở
#722 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
30/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
android, c, macos
Lĩnh vực
build-system, ci-cd, mobile-dev

Hướng nghiên cứu

Start with the failing target in android/firebase-cloud-messaging and reproduce with the listed steps on macOS arm64 using Bazel 7.2.0rc1. Read external/zlib/zutil.h around line 140, where fdopen is defined as a macro, alongside external/zlib/BUILD.bazel; compare with the macOS arm64 change in #716. Done means bazel build //app:app succeeds under Xcode 26.6 without breaking other zlib users.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

CI: https://buildkite.com/bazel/bazel-bazel-examples/builds/5640#01a21001-b43b-4d66-8a31-d33936c497f1

Platform: macOS arm64

Failing tasks:

  • android (Android Firebase Cloud Messaging)

Logs:

(01:02:19) ERROR: .../external/zlib/BUILD.bazel:31:11: Compiling zutil.c [for tool] failed: (Exit 1): cc_wrapper.sh failed: error executing CppCompile command (from target @@zlib//:zlib)
In file included from external/zlib/zutil.c:10:
In file included from external/zlib/gzguts.h:21:
In file included from /Applications/Xcode26.6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdio.h:61:
/Applications/Xcode26.6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:322:7: error: expected identifier or '('
  322 | FILE    *fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(fdopen));
external/zlib/zutil.h:140:33: note: expanded from macro 'fdopen'
  140 | #        define fdopen(fd,mode) NULL /* No fdopen() */
(01:02:20) ERROR: Build did NOT complete successfully

Culprit: This task runs on macos_arm64 since #716. There the job uses Xcode 26.6, and the zlib version this example pulls in defines fdopen as a macro, which breaks the SDK's _stdio.h.

Steps:

git clone https://github.com/bazelbuild/examples.git
git reset c511c5d8659148c4d6ef715f24864c90cc25a6ab --hard
export USE_BAZEL_VERSION=7.2.0rc1
cd android/firebase-cloud-messaging
bazel build //app:app

CC Greenteam @meteorcloudy

Ngôn ngữ chính
Starlark
Star
958
Fork
582
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của bazelbuild/examples

Tất cả issue của bazelbuild/examples

Issue tương tự

Thêm issue về Build System

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.