Hi there folks,
Hope you're all doing well. I've encountered a problem in my build system and was curious if anyone had any leads on how I should approach this. There is a similar debugging statement located here
https://github.com/bazelbuild/bazel/issues/14118.
Here is the error message when I try building my custom toolchain.
(base) alejandro@Voyager GitHubActions % bazel build --config=opencilk_toolchain //src:main --sandbox_debug
INFO: Analyzed target //src:main (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /Users/alejandro/Programming/GitHubActions/src/foo_dir/BUILD:3:11: Linking src/foo_dir/libfoo.a failed: (Exit 1): sandbox-exec failed: error executing command
(cd /private/var/tmp/_bazel_alejandro/1972fb8dcd8f88c900f1a6f8fce7076b/sandbox/darwin-sandbox/2/execroot/GitHubActions && \
exec env - \
PATH=/Users/alejandro/.gem/ruby/3.0.0/bin:/opt/homebrew/opt/ruby@3.0/bin:/opt/homebrew/opt/postgresql@13/bin:/opt/homebrew/opt/postgresql@13/bin:/opt/homebrew/opt/postgresql@13/bin:/Users/alejandro/miniforge3/bin:/Users/alejandro/miniforge3/condabin:/Users/alejandro/Downloads/opencilk-project/llvm/build/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/alejandro/.cargo/bin \
PWD=/proc/self/cwd \
TMPDIR=/var/folders/bh/79ms89214n70lb56qjzk005c0000gn/T/ \
/usr/bin/sandbox-exec -f /private/var/tmp/_bazel_alejandro/1972fb8dcd8f88c900f1a6f8fce7076b/sandbox/darwin-sandbox/2/sandbox.sb /var/tmp/_bazel_alejandro/install/0a609247a9eb0c65a5f1ae48ca487674/process-wrapper '--timeout=0' '--kill_delay=15' /usr/bin/ar rcsD bazel-out/k8-fastbuild/bin/src/foo_dir/libfoo.a bazel-out/k8-fastbuild/bin/src/foo_dir/_objs/foo/foo.o)
/Library/Developer/CommandLineTools/usr/bin/ar: illegal option -- D
usage: ar -d [-TLsv] archive file ...
ar -m [-TLsv] archive file ...
ar -m [-abiTLsv] position archive file ...
ar -p [-TLsv] archive [file ...]
ar -q [-cTLsv] archive file ...
ar -r [-cuTLsv] archive file ...
ar -r [-abciuTLsv] position archive file ...
ar -t [-TLsv] archive [file ...]
ar -x [-ouTLsv] archive [file ...]
Target //src:main failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.173s, Critical Path: 0.06s
INFO: 2 processes: 2 internal.
FAILED: Build did NOT complete successfully
I'm not sure I'm completely understanding how to set the archiver flags, nor why they are defaulting to an option that does not run on MacOS. Any help is greatly appreciated!
Best,
Alejandro