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

Failing test on MacOS, OpenMP library is not found #42

Closed
ArseniyKholod opened this issue Apr 24, 2024 · 5 comments · Fixed by #41 or #43
Closed

Failing test on MacOS, OpenMP library is not found #42

ArseniyKholod opened this issue Apr 24, 2024 · 5 comments · Fixed by #41 or #43
Assignees
Labels
bug Something isn't working

Comments

@ArseniyKholod
Copy link
Collaborator

ArseniyKholod commented Apr 24, 2024

See https://github.com/sloede/openfhe-julia/actions/runs/8816068748/job/24199359449?pr=41

@ArseniyKholod ArseniyKholod changed the title Failing test on MacOS, OpenMP library not fined Failing test on MacOS, OpenMP library not find Apr 24, 2024
@ArseniyKholod ArseniyKholod changed the title Failing test on MacOS, OpenMP library not find Failing test on MacOS, OpenMP library is not found Apr 24, 2024
@ArseniyKholod ArseniyKholod added the bug Something isn't working label Apr 24, 2024
@ArseniyKholod ArseniyKholod self-assigned this Apr 24, 2024
@ArseniyKholod
Copy link
Collaborator Author

ArseniyKholod commented Apr 24, 2024

Hi @sloede!
I'm not really pro in MacOS and GitHub CI, may be you could give me a hint. The problem in this issue is that on MacOS runners OpenMP library is not installed, so it should be installed in ci.yml.
I install it using brew install libomp.
But CI on MacOS passes only if I also rebuild both openfhe-development and libcxxwrap-julia, but if they would be retrieved from the cache, linker fails to find installed OpenMP while building openfhe-julia

ld: warning: search path '/usr/local/opt/libomp/lib' not found
ld: library 'omp' not found 

I'm not sure, how it woks with caching, does packages update every time they are compiled? I also saw, that there are several locations, where OpenMP could be saved, depending on if MacPorts or Home-brew were used. For Home-brew location of OpenMP also differs depending on architecture. Does caching mechanism aware of these differences?
All CI I runned were on M1, that uses Home-brew, but if openfhe-development is retrieved from cache, while building openfhe-julia linker search for OpenMP in the /usr/local/opt/libomp/lib location. That location is right only in case of MacPorts utilization, according to the CMakelist of openfhe-development
I should probably update some environmental variables, but I tried all I could guess, it doesn't work.

I'm dealing first time with MacOS, so if you have some ideas from experience, it would be very very helpful! Of course only if you have time, I can proceed my project without this MacOS CI, as on Ubuntu all works.

@sloede
Copy link
Member

sloede commented Apr 24, 2024

macos-latest was changed from macos-12 to macos-14-arm64 in this commit. Can you please check if the errors disappear if you change macos-latest to macos-12?

@ArseniyKholod
Copy link
Collaborator Author

ArseniyKholod commented Apr 24, 2024

macos-latest was changed from macos-12 to macos-14-arm64 in this commit. Can you please check if the errors disappear if you change macos-latest to macos-12?

That's great! The problem vanishes. You found out from the first shot! 🥇 :) Could we just replace macos-latest by macos-12? #41 should be merged then

@ArseniyKholod ArseniyKholod linked a pull request Apr 24, 2024 that will close this issue
@sloede
Copy link
Member

sloede commented Apr 24, 2024

Could we just replace macos-latest by macos-12?

No. I don't think this is a viable strategy, since macos-12 is to be deprecated soon(ish). We should get this up and running again with macos-latest. While I merged #41 such that you can get on with the other PRs, I am reopening this issue here as a reminder that we need to find a proper fix (and soon!).

@sloede sloede reopened this Apr 24, 2024
@ArseniyKholod
Copy link
Collaborator Author

Thank you!

sloede added a commit that referenced this issue Apr 29, 2024
sloede added a commit that referenced this issue Apr 29, 2024
* Switch to `macos-latest` for CI testing

Fixes #42.

* Set appropriate flags

* Remove macos-12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants