refactor!: make bootstrap.sh work on mac (draft)#19357
Closed
refactor!: make bootstrap.sh work on mac (draft)#19357
Conversation
Collaborator
Flakey Tests🤖 says: This CI run detected 2 tests that failed, but were tolerated due to a .test_patterns.yml entry. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the result of tasking Claude Code with getting
bootstrapto work locally on a MacBook Pro, with M5 and Tahoe 26.1.I'm posting it as a PR since it seems a handy way of showing all the tweaks and env work in a single place, but I don't work on these scripts myself so I don't expect this to be merged as-is. All credit goes to Claude!
Changes to the codebase itself are easily reviewable here. I dump below a report of out of band changes that were necessary.
1. Software Installed
Homebrew Packages
brew install bash cmake ninja llvm@20 yarn corepackClang 20 Symlinks
Created symlinks in ~/bin/ pointing to Homebrew's LLVM 20:
Zig Compiler (0.15.1)
Rust Toolchain
wasi-sdk (for WASM builds)
cd /opt
sudo curl -L https://github.com/aspect-build/aspect-cli/releases/download/wasi-sdk-v0.0.5/wasi-sdk-24.0-arm64-macos.tar.gz | sudo tar xz
sudo mv wasi-sdk-24.0-arm64-macos wasi-sdk
curl -L https://foundry.paradigm.xyz | bash
foundryup
nvm install 24
nvm use 24
aarch64|arm64)
echo arm64
;;
After the bb target definition (around line 42-50):
Re-sign on macOS to fix invalid linker-generated adhoc signature
if(APPLE)
add_custom_command(TARGET bb POST_BUILD
COMMAND codesign -s - -f $<TARGET_FILE:bb>
COMMENT "Re-signing bb binary for macOS"
)
endif()
After the bb-avm target definition (around line 95-101):
Re-sign on macOS to fix invalid linker-generated adhoc signature
if(APPLE)
add_custom_command(TARGET bb-avm POST_BUILD
COMMAND codesign -s - -f $<TARGET_FILE:bb-avm>
COMMENT "Re-signing bb-avm binary for macOS"
)
endif()
At the end of the inject_version function (around line 37-40):
export PATH="/opt/zig:/opt/homebrew/bin:/opt/homebrew/sbin:$HOME/bin:$HOME/.cargo/bin:$HOME/.foundry/bin:$HOME/.nvm/versions/node/v24.12.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
cd /path/to/aztec-packages
PATH="/opt/zig:/opt/homebrew/bin:/opt/homebrew/sbin:$HOME/bin:$HOME/.cargo/bin:$HOME/.foundry/bin:$HOME/.nvm/versions/node/v24.12.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/opt/homebrew/bin/bash -c 'source ci3/source && ./bootstrap.sh'