install-boost icon indicating copy to clipboard operation
install-boost copied to clipboard

Feature request: Mac aarch64 builds

Open pettyalex opened this issue 10 months ago • 9 comments

Hello,

Thanks for this action, it's been super useful. Is there any chance of adding Apple Silicon builds to this, given that Github has apple silicon runners and ARM64 is the future of Mac OS in general?

pettyalex avatar Mar 28 '24 18:03 pettyalex

Related: free M1 runners now for open source https://github.com/actions/runner-images/issues/9254

pettyalex avatar Mar 28 '24 18:03 pettyalex

This has also been asked here: https://github.com/MarkusJx/prebuilt-boost/issues/11 I'll look into it

MarkusJx avatar Mar 28 '24 19:03 MarkusJx

I've been trying to use the binaries from MarkusJx/prebuilt-boost/issues/11, but it looks they're tagged as "arm64" whereas the install scripts expects "aarch64". Am I confused or is there a mismatch?

ciaranm avatar Apr 29 '24 20:04 ciaranm

The architecture for arm macos builds is arm64 (which is confusing, not sure why I did this). Is there a specific error while installing you may be able to provide?

MarkusJx avatar Apr 30 '24 07:04 MarkusJx

According to https://github.com/MarkusJx/install-boost/blob/main/README.md#arch I should be specifying "aarch64" for "arch", and if I instead put "arm64" I get

Run MarkusJx/[email protected]
Starting [email protected]
Using @action/cache to improve build times
Warning: The 'platform_version' input is unset. This may lead to inconsistent build results.
Error: Error: 'arch' must be one of: 'x86' or 'aarch64'

but if I specify "aarch64" I instead get


Run MarkusJx/[email protected]
Starting [email protected]
Using @action/cache to improve build times
Warning: The 'platform_version' input is unset. This may lead to inconsistent build results.
Trying to retrieve cache...
Cache miss
Downloading versions-manifest.json...
Parsing versions-manifest.json...
Error: Error: Could not find boost version 1.78.0

My attempt at getting automatic builds using boost + macos 14 can be found in https://github.com/ciaranm/glasgow-constraint-solver/pull/53 .

ciaranm avatar Apr 30 '24 22:04 ciaranm

I see. I'll change the architecture for macos to aarch64. I'll post an update once that's done.

MarkusJx avatar May 01 '24 05:05 MarkusJx

I've only managed to rename the architecture for boost version 1.78.0.beta1 as it seems like github updated the runners to a new macOs SDK which does not allow me to build any older boost binaries.

MarkusJx avatar May 04 '24 15:05 MarkusJx

Thanks. I can confirm that 1.78.0.beta1 at least partially works now. However, there are some incompatibility issues between Boost and XCode 15 that are fixed in 1.81 (https://github.com/boostorg/config/pull/440) which make older Boost versions largely unusable.

ciaranm avatar May 04 '24 15:05 ciaranm

I guess I've been seeing these issues whilst trying to rebuild version 1.78.0. I've simply renamed an older build of version 1.78.0.beta1 once I've noticed the older versions won't compile anymore. I'll rebuild all versions starting from 1.81.0, so you can at least use those newer ones.

MarkusJx avatar May 04 '24 15:05 MarkusJx

Things are looking better: I can now use 1.84.0.beta1 on a macos-14 ARM image (see e.g. https://github.com/ciaranm/glasgow-constraint-solver/blob/main/.github/workflows/cmake.yml if anyone else is trying the same). It looks like 1.84.0 isn't there yet though.

ciaranm avatar May 15 '24 14:05 ciaranm

I've now re-built boost versions 1.81.0 through 1.84.0 for macos arm

MarkusJx avatar Jun 02 '24 08:06 MarkusJx

Thanks, for me this is now working perfectly.

ciaranm avatar Jun 03 '24 18:06 ciaranm

I'll close this for now. Feel free to re-open if you encounter any issues.

MarkusJx avatar Jun 05 '24 15:06 MarkusJx