Skip to content

Documentation improvement for macOS Homebrew libomp installation #31359

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ParthS007 opened this issue May 13, 2025 · 4 comments · May be fixed by #31361
Open

Documentation improvement for macOS Homebrew libomp installation #31359

ParthS007 opened this issue May 13, 2025 · 4 comments · May be fixed by #31361
Assignees

Comments

@ParthS007
Copy link

Describe the issue linked to the documentation

The current documentation in doc/developers/advanced_installation.rst under the "macOS compilers from Homebrew" section provides environment variable examples using the path /usr/local/opt/libomp/. While this is correct for Intel-based Macs, Homebrew on Apple Silicon (arm64) Macs installs packages, including libomp, to /opt/homebrew/opt/libomp/.

This can lead to confusion and build issues for users on Apple Silicon hardware who follow the documentation to install from source.

The documentation will improve from mentioning that libomp is often installed as "keg-only" by Homebrew, which is why explicitly setting these paths is necessary. Homebrew's own output (brew info libomp) often provides guidance on the necessary CPPFLAGS and LDFLAGS.

Suggest a potential alternative/fix

The documentation could be updated to:

  1. Mention the different Homebrew base paths for Intel (/usr/local) and Apple Silicon (/opt/homebrew).
  2. Update the example environment variable settings to reflect the /opt/homebrew/opt/libomp path as a common case for Apple Silicon, or provide instructions for users to identify and use the correct path for their system.
  3. Optionally, We could briefly explain the "keg-only" nature of libomp from Homebrew and how it relates to needing these environment variables.
@ParthS007 ParthS007 added Documentation Needs Triage Issue requires triage labels May 13, 2025
@ParthS007
Copy link
Author

/take

@lesteve
Copy link
Member

lesteve commented May 16, 2025

I guess this section can likely be simplified indeed.

As mentioned in #31361 (comment) I there is likely no need to set environment variables now that we use Meson but this needs to be double-checked.

@lesteve
Copy link
Member

lesteve commented May 22, 2025

Actually I did not remember but I created an issue saying that we can probably remove the environment variables a while ago #29603.

@ParthS007
Copy link
Author

Okay, cool. Thanks for confirming. I will update the PR 👍

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