Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add compilation fix for zlib #530

Merged
merged 1 commit into from
Apr 10, 2023
Merged

Conversation

ohodson
Copy link
Contributor

@ohodson ohodson commented Apr 10, 2023

Later xcode toolchains fail to compile zlib under bazel. This change adds a workaround based on bazelbuild/bazel#17956.

Without this change, zlib compilation generates errors like: external/zlib/gzread.c:35:15: error: call to undeclared function 'read'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

Test: bazel build @zlib//:zlib

@ohodson ohodson requested review from mrbbot and fhanau April 10, 2023 16:40
Later xcode toolchains fail to compile zlib under bazel. This change
adds a workaround based on bazelbuild/bazel#17956.

Without this change, zlib compilation generates errors like:
external/zlib/gzread.c:35:15: error: call to undeclared function 'read'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

Test: bazel build @zlib//:zlib
Test: bazel build //...
@ohodson ohodson force-pushed the orion-bazel-6.1.1-osx-zlib-compilation branch from 4d9a17a to 7f2aff8 Compare April 10, 2023 16:46
Copy link
Collaborator

@fhanau fhanau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I encountered the same issue but wasn't sure what caused it, this looks like a sensible fix.

@ohodson ohodson merged commit 3c23f8e into main Apr 10, 2023
@ohodson ohodson deleted the orion-bazel-6.1.1-osx-zlib-compilation branch April 10, 2023 18:11
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants