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

CMake build fails on macOS-13 #158

Closed
zaikunzhang opened this issue Feb 14, 2024 · 3 comments
Closed

CMake build fails on macOS-13 #158

zaikunzhang opened this issue Feb 14, 2024 · 3 comments

Comments

@zaikunzhang
Copy link
Member

zaikunzhang commented Feb 14, 2024

For the moment, the failure is observed only if we use ifort as the Fortran compiler. gfortran works fine (maybe due to gcc?).

See https://github.com/libprima/prima/actions/runs/7894696232/job/21545822585

Note, however, that the following run was successful:

https://github.com/libprima/prima/actions/runs/7894650578/job/21545696890

Checking the runner images (See "Set up job" section of the log), I found the following.

Failure (for https://github.com/libprima/prima/actions/runs/7894696232/job/21545822585):

  Image: macos-13
  Version: 20240204.1
  Included Software: https://github.com/actions/runner-images/blob/macos-13/20240204.1/images/macos/macos-13-Readme.md
  Image Release: https://github.com/actions/runner-images/releases/tag/macos-13%2F20240204.1

Success (for https://github.com/libprima/prima/actions/runs/7894650578/job/21545696890):

  Image: macos-13
  Version: 20240114.1
  Included Software: https://github.com/actions/runner-images/blob/macos-13/20240114.1/images/macos/macos-13-Readme.md
  Image Release: https://github.com/actions/runner-images/releases/tag/macos-13%2F20240114.1

We can see that the two runs used different versions of the image. In particular, following the "Included Software" link, I find that the failing run used Clang/LLVM 15.0.0, while the successful one used Clang/LLVM 14.0.3. I am not sure whether this is the reason for the failure (doesn't clang provide ld on macOS-13?).

@zaikunzhang
Copy link
Member Author

I am not sure whether the following issues are related:

llvm/llvm-project#59427

mesonbuild/meson#12288

@zaikunzhang
Copy link
Member Author

This seems to be related to the failure of MEX on macOS-13 with Xcode 15 and LLVM/Clang 15:

matlab-actions/setup-matlab#96

@zaikunzhang
Copy link
Member Author

zaikunzhang added a commit that referenced this issue Feb 16, 2024
zaikunzhang added a commit that referenced this issue Feb 16, 2024
This is a workaround for #161, where MEX fails due to incompatibility between the new linker of Xcode 15 on macOS and Intel oneAPI 2023.  The fix is to replace the linker option "-undefined error" with "-undefined dynamic_lookup". See also #158. Note that we have to modify `LDFLAGSVER`. Setting `LDFLAGS` or `LINKFLAGS` does not work, although the latter is suggested at https://www.mathworks.com/help/matlab/ref/mex.html.
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

No branches or pull requests

1 participant