google / google/xls

Tracking issue: OS X (aarch64) build/test status

Open
#1,434 5 comments 0 reactions 1 assignee Claimed by @cdleary View on GitHub
unsupported-env
Dominant language
C++
Stars
1.9k
Forks
283
Avg merge
2d 10h
Merged PRs (30d)
135

Description

Just an issue to track and take notes on the current (merged to google/xls) status of OS X support. Taking notes in an issue in the google/xls repo as it's (currently) canonical mainline. This is all work-aroundable, but my intent is to get mainline into a state where it "usually" works on OS X (via fixes and PRs if it happens to break).

- The hermetic LLVM toolchain does not work on OS X
- But if you comment out the registration of LLVM toolchain from the `WORKSPACE` file, almost everything works with the clang-15 installation that's present on latest OS X
- iverilog build doesn't work, which I think is understandable because we did a lot of hacktastic stuff to make it work on Linux
- current grpc dep (at HEAD) has issues
- AoT compilations fail here: https://github.com/google/xls/blob/ec4df616bc8b3acd25db670259316e675b53edc9/xls/jit/aot_compiler.cc#L99

```
$ clang --version
Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: arm64-apple-darwin23.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
```

Note that if you don't comment out the hermetic toolchain registration it gives you an error indicating "you invoked llvm-ar with invalid command line arguments". Aside: I often use `//xls/ir:bits_test` as a simple canary target for a binary to build/test.

```
$ bazel build -c opt //xls/ir:bits_test
INFO: Analyzed target //xls/ir:bits_test (1 packages loaded, 2104 targets configured).
INFO: Found 1 target...
ERROR: /private/var/tmp/_bazel_cdleary/60c3e5ce2889de0dfd8db639786fbce7/external/com_google_absl/absl/base/BUILD.bazel:60:11: Linking external/com_google_absl/absl/base/liblog_severity.a [for tool] failed: (Exit 1): llvm-ar failed: error executing command (from target @com_google_absl//absl/base:log_severity) external/llvm_toolchain/bin/llvm-ar @bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/external/com_google_absl/absl/base/liblog_severity.a-2.params

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
external/llvm_toolchain/bin/llvm-ar: error: an archive name must be specified
OVERVIEW: LLVM Archiver

USAGE: llvm-ar [options] [-][modifiers] [relpos] [count] [files]
llvm-ar -M [ - ignored for compatibility
-h --help - display this help and exit
--output - the directory to extract archive members to
--rsp-quoting - quoting style for response files
=posix - posix
=windows - windows
--thin - create a thin archive
--version - print the version and exit
-X{32|64|32_64|any} - object mode (only for AIX OS)
@ - read options from

OPERATIONS:
d - delete [files] from the archive
m - move [files] in the archive
p - print contents of [files] found in the archive
q - quick append [files] to the archive
r - replace or insert [files] into the archive
s - act as ranlib
t - display list of files in archive
x - extract [files] from the archive

MODIFIERS:
[a] - put [files] after [relpos]
[b] - put [files] before [relpos] (same as [i])
[c] - do not warn if archive had to be created
[D] - use zero for timestamps and uids/gids (default)
[h] - display this help and exit
[i] - put [files] before [relpos] (same as [b])
[l] - ignored for compatibility
[L] - add archive's contents
[N] - use instance [count] of name
[o] - preserve original dates
[O] - display member offsets
[P] - use full names when matching (implied for thin archives)
[s] - create an archive index (cf. ranlib)
[S] - do not build a symbol table
[T] - deprecated, use --thin instead
[u] - update only [files] newer than archive contents
[U] - use actual timestamps and uids/gids
[v] - be verbose about actions taken
[V] - display the version and exit
Target //xls/ir:bits_test failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.735s, Critical Path: 0.38s
INFO: 9 processes: 9 internal.
FAILED: Build did NOT complete successfully
```

---

grpc issue:

```
ERROR: /private/var/tmp/_bazel_cdleary/60c3e5ce2889de0dfd8db639786fbce7/external/com_github_grpc_grpc/src/core/BUILD:2247:16: Compiling src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc [for tool] failed: (Exit 1): wrapped_clang_pp failed: error executing command (from target @com_github_grpc_grpc//src/core:cf_event_engine) external/local_config_cc/wrapped_clang_pp '-D_FORTIFY_SOURCE=1' -fstack-protector -fcolor-diagnostics -Wall -Wthread-safety -Wself-assign -fno-omit-frame-pointer -g0 -O2 -DNDEBUG ... (remaining 87 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
external/com_github_grpc_grpc/src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc:59:15: error: no member named 'StrCat' in namespace 'absl'
absl::StrCat("getsockname:", grpc_core::StrError(errno)));
~~~~~~^
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.