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

CI: add macos-14 #394

Merged
merged 4 commits into from
Oct 3, 2024
Merged

CI: add macos-14 #394

merged 4 commits into from
Oct 3, 2024

Conversation

mgeier
Copy link
Member

@mgeier mgeier commented Mar 24, 2024

See also #384.

@HaHeho
Copy link
Contributor

HaHeho commented Mar 25, 2024

This is very strange what is going on with the macos-14, Xcode_15.2 instance.

Looking through the logs I've noticed the following based on e.g. the qt@5 package. macos-13, Xcode_14.3 places installed homebrew packages into /usr/local/opt/qt@5, whereas they are placed in /opt/homebrew/opt/qt@5/ on macos-14, Xcode_15.2.

/usr/local/ does not seem to exist on the latter, which is the reason for the Intersense lib install as well as the fix to find qt@5 during ./configure to fail on macos-14, Xcode_15.2.

@HaHeho
Copy link
Contributor

HaHeho commented Mar 25, 2024

macos-14, Xcode_15.2 ends up being Apple ARM (see https://github.com/SoundScapeRenderer/ssr/actions/runs/8410773165/job/23029617211?pr=394#step:1:11), although Apple Intel is also available for this combination.

For some reason (I guess this is the future), Apple ARM seems to be the default configuration on macos-14. If this is the current state, then it will probably stay like this. Apple Intel should be available, but I don't know if macos-14-large is available to open-source and for free (right now or ever). See the list of available runners.

To fix this, we have to adapt the build pipeline to handle the slightly different environment on Apple ARM, including the different default install path of homebrew packages. However, supporting and testing builds on Apple ARM has been on the wishlist for a while. Free runners are available now, so this seems the right time to do it. I believe to remember that we started to gather information on what changes to the build scripts may be required?!

@mgeier
Copy link
Member Author

mgeier commented Apr 15, 2024

Without really expecting it to work, I tried macos-14 for the homebrew bottle: SoundScapeRenderer/homebrew-ssr#30

And it seems to have worked without warnings!

This is without Intersense but it should be with libmysofa.

@HaHeho
Copy link
Contributor

HaHeho commented Oct 2, 2024

Same old, same old. The path of homebrew installed dependencies (brew --prefix) is different on Apple x86 (/usr/local) vs Apple ARM (/opt/homebrew). The following code was introduced to help to link against qt@5 if qt (v6) is also present on the system:

# Link keg-only Qt5 according to homebrew info
echo "/usr/local/opt/qt@5/bin" >> $GITHUB_PATH
echo LDFLAGS="-L/usr/local/opt/qt@5/lib" >> $GITHUB_ENV
echo CPPFLAGS="-I/usr/local/opt/qt@5/include" >> $GITHUB_ENV
echo PKG_CONFIG_PATH="/usr/local/opt/qt@5/lib/pkgconfig" >> $GITHUB_ENV

Here, I assume, is where the problem arises that makes the macos-14 (employing Apple ARM) build fail. The paths in the above fix point to the wrong location. The following line on my local systems, Apple x86, and Apple ARM solves the problem brew link --overwrite qt@5. I would hope that this could replace the above lines on all macOS builds.

@mgeier
Copy link
Member Author

mgeier commented Oct 2, 2024

The following line on my local systems, Apple x86, and Apple ARM solves the problem brew link --overwrite qt@5. I would hope that this could replace the above lines on all macOS builds.

But didn't we change that in the opposite direction in #381?

I tried using brew --prefix in 7060245, wouldn't this be better?

@HaHeho
Copy link
Contributor

HaHeho commented Oct 2, 2024

The following line on my local systems, Apple x86, and Apple ARM solves the problem brew link --overwrite qt@5. I would hope that this could replace the above lines on all macOS builds.

But didn't we change that in the opposite direction in #381?

I tried using brew --prefix in 7060245, wouldn't this be better?

Yes, you're right. I didn't remember, but the outlined advantages, i.e. the force link does not need to be reverted after building, seem helpful for DIY builders. Although, maybe the brew behavior has also changed since then. But it seems fine to keep the current solution. The change to brew --prefix is good to be Apple Intel vs Apple ARM agnostic.

EDIT:
Local ./configure on Apple ARM now also works after modifying CPPFLAGS and LDFLAGS (correctly!).

@mgeier mgeier merged commit bc4f0c2 into SoundScapeRenderer:master Oct 3, 2024
12 checks passed
@mgeier mgeier deleted the ci-macos-14 branch October 3, 2024 08:04
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.

2 participants