Skip to content

Build Failure: 'build //Pods/Zip'  #913

@Jacky-LinPeng

Description

@Jacky-LinPeng

Hi,

I'm encountering an issue where the build for 'build //Pods/Zip' fails, while all other third-party Pods compile without any problems. It's quite strange that only this library causes an error. I'd appreciate it if you could take a look when you have some time.

Here is the Bazel rule I’m using:

load("@build_bazel_rules_ios//rules:framework.bzl", "apple_framework")

apple_framework(
    name = "Zip",
    srcs = glob([
        "Zip/*.swift",
        "Zip/*.h",
        "Zip/minizip/*.c",
        "Zip/minizip/include/*.h",
    ]),
    platforms = {"ios": "9.0"},
    public_headers = ["Zip/Zip.h"],
    sdk_dylibs = ["z"],
    swift_version = "5.3",
    visibility = ["//visibility:public"],
    xcconfig = {
        "SWIFT_INCLUDE_PATHS": ["Zip/Zip/minizip/**"],
        "LIBRARY_SEARCH_PATHS": ["Zip/Zip/"],
    },
)

1、Version info

bazel --version 
bazel 7.3.1


http_archive(
    name = "build_bazel_rules_ios",
    sha256 = "d1cc852aa9e989c12b802e04cb66dfe51418153c781d6073bb30e82284866865",
    url = "https://github.com/bazel-ios/rules_ios/releases/download/5.0.0/rules_ios.5.0.0.tar.gz",
)

2、Error Info

ERROR: /Users/mac/Documents/Test/forks/ios_bazel/Pods/Zip/BUILD.bazel:3:16: Compiling Swift module //Pods/Zip:Zip_swift failed: (Exit 1): worker failed: error executing SwiftCompile command (from target //Pods/Zip:Zip_swift)
  (cd /private/var/tmp/_bazel_mac/e3fb201ad4e26871038d858fb256cda1/execroot/_main && \
  exec env - \
    APPLE_SDK_PLATFORM=iPhoneSimulator \
    APPLE_SDK_VERSION_OVERRIDE=17.0 \
    PATH=/Users/mac/Library/Caches/bazelisk/downloads/bazelbuild/bazel-7.3.1-darwin-x86_64/bin:/Users/mac/.nvm/versions/node/v22.0.0/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Users/mac/.rvm/bin \
    SWIFT_AVOID_WARNING_USING_OLD_DRIVER=1 \
    XCODE_VERSION_OVERRIDE=15.0.1.15A507 \
  bazel-out/darwin_x86_64-opt-exec-ST-d57f47055a04/bin/external/rules_swift~/tools/worker/worker swiftc @bazel-out/ios_x86_64-fastbuild-ios-x86_64-min9.0-applebin_ios-ST-7d3e9b1ca54f/bin/Pods/Zip/Zip.swiftmodule-0.params)
# Configuration: b36a9fff5ecdbf4626b97e122e7b3bd2e8fce492573b76727e70938cff690ab0
# Execution platform: @@platforms//host:host
error: emit-module command failed with exit code 1 (use -v to see invocation)
Pods/Zip/Zip/Zip.swift:10:29: error: no such module 'Minizip'
@_implementationOnly import Minizip
                            ^
Pods/Zip/Zip/Zip.swift:10:29: error: no such module 'Minizip'
@_implementationOnly import Minizip
                            ^
error: fatalError
Target //Pods/Zip:Zip failed to build
INFO: Elapsed time: 36.762s, Critical Path: 14.85s
INFO: 58 processes: 29 internal, 28 darwin-sandbox, 1 local.
ERROR: Build did NOT complete successfully

3、Zip
Zip Pod Click Here
@_implementationOnly import Minizip

I’d really appreciate your help. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions