Skip to content

Foundation framework link option leaking into Android builds #326

@goaway

Description

@goaway

We have a project that builds a native library for Android that depends on Abseil. With this change:
ca3f875#diff-020a0864e5179d94daa487a30519b6acR79
our builds broke when performed on MacOS with the following error:

Execution platform: @bazel_tools//platforms:host_platform
external/androidndk/ndk/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld: cannot find Foundation: No such file or dir
ectory
clang: error: linker command failed with exit code 1 (use -v to see invocation)

We suspect we may somehow be specifying crosstool options or the target platform incorrectly, but what's surprising is up until this point everything worked. (We're actually not specifying these options at all explicitly, but rather relying on transitions built into the android_binary rule.)

Although Abseil may very well be doing the right thing here, we wanted to reach out to see if anyone was willing and able to provide us some guidance. This may be as much a Bazel question as it is an Abseil question, and we're following up with Bazel folks as well.

If this falls outside the scope of the support issues in this project, feel free to close.

Thanks!

Metadata

Metadata

Assignees

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