Skip to content

The repository '@zlib' could not be resolved and referenced by '@com_google_protobuf//:protobuf' #10270

@jverkoey

Description

@jverkoey

Description of the problem:

Context: https://github.com/material-foundation/material-text-accessibility-ios/pull/28/files

I am attempting to build an iOS repository with a mixture of Swift and Objective-C libraries. It seems to break when I try to build a swift_library, while objc_library targets seem to build fine.

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

git clone https://github.com/jverkoey/material-text-accessibility-ios.git
cd material-text-accessibility-ios
git checkout upgrade
bazel test //... --apple_platform_type=ios --ios_minimum_os=9.0

# Output:
INFO: Writing tracer profile to '/private/var/tmp/_bazel_featherless/47449ac432b212324a64889579370bdd/command.profile.gz'
ERROR: /private/var/tmp/_bazel_featherless/47449ac432b212324a64889579370bdd/external/com_google_protobuf/BUILD:148:1: no such package '@zlib//': The repository '@zlib' could not be resolved and referenced by '@com_google_protobuf//:protobuf'
ERROR: Analysis of target '//:UnitTestsSwiftLib' failed; build aborted: no such package '@zlib//': The repository '@zlib' could not be resolved
INFO: Elapsed time: 0.115s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)

Note that the following does succeed:

bazel build //:MDFTextAccessibility --apple_platform_type=ios --ios_minimum_os=9.0

But the following fails:

bazel build //:UnitTestsSwiftLib --apple_platform_type=ios --ios_minimum_os=9.0
INFO: Writing tracer profile to '/private/var/tmp/_bazel_featherless/47449ac432b212324a64889579370bdd/command.profile.gz'
ERROR: /private/var/tmp/_bazel_featherless/47449ac432b212324a64889579370bdd/external/com_google_protobuf/BUILD:148:1: no such package '@zlib//': The repository '@zlib' could not be resolved and referenced by '@com_google_protobuf//:protobuf'
ERROR: Analysis of target '//:UnitTestsSwiftLib' failed; build aborted: no such package '@zlib//': The repository '@zlib' could not be resolved
INFO: Elapsed time: 0.096s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)

What operating system are you running Bazel on?

macOS Mojave 10.14.6

What's the output of bazel info release?

release 1.0.0

What's the output of git remote get-url origin ; git rev-parse master ; git rev-parse HEAD ?

[email protected]:material-foundation/material-text-accessibility-ios.git
218532c3702affc711473096a277664889c64162
b9d0fe36162a4e8e133dd7ef8da892041bbbce23

Metadata

Metadata

Assignees

No one assigned

    Labels

    team-OSSIssues for the Bazel OSS team: installation, release processBazel packaging, websiteuntriaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions