Skip to content

Docs instructions for installing LLVM OpenMP with Homebrew may need updating #31930

@DeaMariaLeon

Description

@DeaMariaLeon

Describe the issue linked to the documentation

Environment variables CFLAGS, CXXFLAGS, CXXFLAGS mentioned here:
https://scikit-learn.org/dev/developers/advanced_installation.html#compiler-macos:~:text=Set%20the%20following%20environment%20variables%3A
may be for Intel-based Macs only.

So when trying to do this:

make clean
pip install --editable . \
    --verbose --no-build-isolation \
    --config-settings editable-verbose=true

I got ../../meson.build:1:0: ERROR: Compiler /usr/bin/clang cannot compile programs.

The reason being that Homebrew installed libomp here: /opt/homebrew/opt/libomp and not here/usr/local/opt/libomp/.

Suggest a potential alternative/fix

Modify the env variables that I mentioned above to the right path to libomp for M2 macs.

Please note:

  • I'm not sure if the variables should be updated or have the two mac versions (Intel vs M1/M2).
  • I didn't test that all works for an Intel mac.
  • Modifying the variables to the correct path, I was able to make the new environment.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions