Skip to content

Enable clean macOS Apple Silicon builds with Apple Clang and Homebrew GCC - #2

Open
bglenden wants to merge 1 commit into
ARDG-NRAO:mainfrom
bglenden:codex/macos-build
Open

Enable clean macOS Apple Silicon builds with Apple Clang and Homebrew GCC#2
bglenden wants to merge 1 commit into
ARDG-NRAO:mainfrom
bglenden:codex/macos-build

Conversation

@bglenden

@bglenden bglenden commented Apr 10, 2026

Copy link
Copy Markdown

Summary

This PR adds the changes needed to build LibRA cleanly on current macOS (26.4) on Apple Silicon.

The work covers both macOS toolchain paths I was able to exercise locally:

  • default Apple Clang
  • Homebrew GCC / GFortran

What changed

The macOS bring-up required a mix of build-system and source-compatibility fixes, including:

  • propagating the selected compiler toolchain correctly into ExternalProject dependencies
  • adding Apple-Clang-specific OpenMP handling via Homebrew libomp
  • making Darwin builds avoid GNU/Linux-specific linker flags
  • adjusting external dependency builds and patches for casacore, parafeed, FFTW, HPG, Kokkos, and pybind11
  • fixing a small number of source-level compatibility issues exposed by newer macOS toolchains and libc++, including removal of legacy standard-library adaptors such as std::unary_function, std::binary_function, std::bind2nd, std::mem_fun, std::mem_fun_ref, and std::not1
  • adding a few macOS-specific linkage and runtime compatibility fixes in the app and synthesis layers
  • ignoring generated macOS build output that should not appear as untracked files

Validation

This branch builds cleanly on macOS 26.4 on Apple Silicon with both:

  • Apple Clang
  • Homebrew GCC / GFortran

I verified the full top-level build and install path locally.

I also let a Linux smoke build run to completion in the local Docker Desktop VM using Ubuntu 24.04 on linux/arm64 (Apple Silicon). That is useful additional coverage for the Linux path, but it is ARM rather than x86_64.

Testing

I was not able to run the repo's dataset-backed tests because the apps/src/tests/gold_standard test data could not be located from the repository contents or submodule wiring currently visible from my fork.

If the maintainers let me (BG) know where to obtain the gold_standard data, I would be happy to run the tests and report back, with the caveat that I only have access to relatively low-end Mac hardware.

Notes

I also included an AGENTS.md file with repository-specific build notes for AI coding assistants, in case that is of interest to the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant