Skip to content
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

Update macos-openmp GitHub actions workflow for macos-14 and higher #92

Merged
merged 9 commits into from
May 29, 2024

Conversation

rileyjmurray
Copy link
Contributor

@rileyjmurray rileyjmurray commented May 29, 2024

The macos-openmp CI build has been failing lately. The error occurrs when trying to build blaspp:

Cloning into 'blaspp'...
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:[16](https://github.com/BallisticLA/RandBLAS/actions/runs/9229409689/job/25395565417?pr=89#step:4:17) (project):
  The CMAKE_CXX_COMPILER:

    /usr/local/opt/llvm/bin/clang++

  is not a full path to an existing compiler tool.

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.

I'm pretty sure this stems from changes to the macos-latest GitHub Actions runner. When the failing builds install the LLVM toolchain, they report using llvm--18.1.5.arm64_sonoma.bottle.tar.gz and install to /opt/homebrew/opt/llvm/. Compare to the successful builds, which report using llvm--17.0.6_1.monterey.bottle.tar.gz and install to /usr/local/opt/llvm/.

I'm not sure if I have a fix at time of opening this PR. I'm only opening it now because I need to test potential fixes and actually run the actions.

My suspicion was right. The CMake configuration lines for blaspp and RandBLAS explicitly set /usr/local/opt/llvm/bin/clang++ and /usr/local/opt/llvm/bin/clang for C++ and C compilers. These paths needed to be updated to reflect the new location of these compilers in the latest macos runner.

Incidental changes

The macos-latest build showed compiler warnings about allocating dynamically-sized arrays on the stack. I've changed them to allocate on the heap (with T* val = new T[size], as opposed to T val[size]).

@rileyjmurray rileyjmurray merged commit 21700fd into main May 29, 2024
5 checks passed
@rileyjmurray rileyjmurray deleted the macos-actions-fix branch May 29, 2024 11:00
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