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

Update bazel and capnproto, remove redundant zlib workaround #568

Merged
merged 1 commit into from
Apr 28, 2023

Conversation

fhanau
Copy link
Collaborator

@fhanau fhanau commented Apr 25, 2023

Second try at (re)moving the zlib workaround from bazelrc – I added the workaround to capnproto in capnproto/capnproto#1665, which fixes the capnproto compilation on macOS and added a note indicating it may no longer be needed from the next release.
Also removes an obsolete bind() statement no longer needed as V8's bazel no longer includes zlib (only the GN based build supports the full set of V8 compile options, some of which depend on zlib).
Builds are passing on the corresponding upstream branch.

@fhanau fhanau requested a review from ohodson April 25, 2023 13:27
Copy link
Member

@jasnell jasnell left a comment

Choose a reason for hiding this comment

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

bit of a rubber stamp LGTM

@fhanau fhanau merged commit 0a37335 into main Apr 28, 2023
@ohodson
Copy link
Contributor

ohodson commented Apr 28, 2023

Sorry, I've been OO and just seen this. Syncing and ToT appears broken on OS X. A bit puzzling.

ERROR: /private/var/tmp/_bazel_orion/0126d6c634aca3f3b55777a59ff39b0e/external/zlib/BUILD.bazel:3:11: Compiling gzlib.c failed: (Exit 1): wrapped_clang failed: error executing command (from target @zlib//:zlib)
...
  exec env - \
    APPLE_SDK_PLATFORM=MacOSX \
    APPLE_SDK_VERSION_OVERRIDE=13.3 \
    BAZEL_COMPILER=clang \
    CC=clang \
    CXX=clang++ \
...
  external/local_config_cc/wrapped_clang '-D_FORTIFY_SOURCE=1' -fstack-protector -fcolor-diagnostics -Wall -Wthread-safety -Wself-assign -fno-omit-frame-pointer -g 'DEBUG_PREFIX_MAP_PWD=.' -iquote external/zlib -iquote bazel-out/darwin_arm64-dbg/bin/external/zlib -isystem external/zlib -isystem bazel-out/darwin_arm64-dbg/bin/external/zlib -MD -MF bazel-out/darwin_arm64-dbg/bin/external/zlib/_objs/zlib/gzread.pic.d -fPIC '-DBAZEL_CURRENT_REPOSITORY="zlib"' '-frandom-seed=bazel-out/darwin_arm64-dbg/bin/external/zlib/_objs/zlib/gzread.pic.o' -isysroot __BAZEL_XCODE_SDKROOT__ -F__BAZEL_XCODE_SDKROOT__/System/Library/Frameworks -F__BAZEL_XCODE_DEVELOPER_DIR__/Platforms/MacOSX.platform/Developer/Library/Frameworks -no-canonical-prefixes -pthread -w '-Dverbose=-1' -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -target arm64-apple-macosx13.3 -c external/zlib/gzread.c -o bazel-out/darwin_arm64-dbg/bin/external/zlib/_objs/zlib/gzread.pic.o)
# Configuration: f6785eb8fc5fe8924a40e49f50f3896ebdf7caf3826fb9d5ff47d80301f13f16
# Execution platform: @local_config_platform//:host
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]
        ret = read(state->fd, buf + *have, get);
              ^
external/zlib/gzread.c:35:15: note: did you mean 'fread'?
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/stdio.h:158:9: note: 'fread' declared here
size_t   fread(void * __restrict __ptr, size_t __size, size_t __nitems, FILE * __restrict __stream);
         ^
external/zlib/gzread.c:651:11: error: call to undeclared function 'close'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    ret = close(state->fd);

I've tried bazel sync --configure and bazel clean --expunge.

fhanau added a commit that referenced this pull request Apr 29, 2023
fhanau added a commit that referenced this pull request Apr 29, 2023
Partially revert #568, fixing mac compilation
@fhanau fhanau deleted the felix/bazel-612 branch May 7, 2023 01:26
# 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.

3 participants