Skip to content

Local build is broken on macOS #191

@mofeing

Description

@mofeing

While trying to build #178 in macOS aarch64, I encountered the following error:

ERROR: /private/var/tmp/_bazel_mofeing/348146763cd9e75f8b24f7326c7da0a0/external/enzyme_ad/BUILD:58:10: Linking external/enzyme_ad/enzymexlamlir-tblgen [for tool] failed: (Exit 1): cc_wrapper.sh failed: error executing command (from target @enzyme_ad//:enzymexlamlir-tblgen) 
  (cd /private/var/tmp/_bazel_mofeing/348146763cd9e75f8b24f7326c7da0a0/sandbox/darwin-sandbox/610/execroot/__main__ && \
  exec env - \
    PATH='/Users/mofeing/Library/Caches/bazelisk/downloads/sha256/c6b6dc17efcdf13fba484c6fe0b6c3361b888ae7b9573bc25a2dbe8c502448eb/bin:/opt/homebrew/bin:/opt/homebrew/Cellar/pyenv-virtualenv/1.2.4/shims:/Users/mofeing/.pyenv/shims:/opt/homebrew/bin:/opt/homebrew/sbin:/opt/homebrew/opt/llvm/bin:/Applications/SuperCollider.app/Contents/MacOS:/Users/mofeing/.cargo/bin:/opt/homebrew/Caskroom/supercollider/3.13.0/SuperCollider.app/Contents/Resources:/opt/homebrew/opt/molten-vk/bin:/Users/mofeing/.local/bin:/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:/opt/X11/bin:/Library/Apple/usr/bin:/Applications/Little Snitch.app/Contents/Components:/Applications/quarto/bin' \
    PWD=/proc/self/cwd \
  external/local_config_cc/cc_wrapper.sh @bazel-out/darwin_arm64-opt-exec-50AE0418/bin/external/enzyme_ad/enzymexlamlir-tblgen-2.params)
# Configuration: e0577b931c3d1306f5dfb647be2c29e19ef2a3f534787952d766fd2b735e74f6
# Execution platform: @local_execution_config_platform//:platform

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
clang: error: invalid linker name in argument '-fuse-ld=/opt/homebrew/opt/llvm/bin/ld64.lld'
Target //:libReactantExtra.so failed to build
INFO: Elapsed time: 135.791s, Critical Path: 20.59s
INFO: 2227 processes: 1622 internal, 605 darwin-sandbox.
FAILED: Build did NOT complete successfully

This bug was not introduced in #178 because there are no changes in the build system.
Bisecting the repo, I've found out that this bug was introduced in 00b4d69

@wsmoses no flag was modified in that commit, but the Enzyme-JAX commit was updated from 4eeaef06e0da144bebd08ec739cf01911dcddb47 to 9f93d6852d4fdc9287a8cfc6c1153eabd194e179, and the erroring target is external/enzyme_ad/enzymexlamlir-tblgen so most probably the bug origins there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions