lycheeverse / lychee

⚡ Fast, async, stream-based link checker written in Rust. Finds broken URLs and mail addresses inside Markdown, HTML, reStructuredText, websites and more!
https://lychee.cli.rs
Apache License 2.0
2.22k stars 134 forks source link

[macos] release asset lychee-v0.15.1-macos-x86_64.dmg contains only ARM64 executable #1475

Closed nbriggs closed 3 months ago

nbriggs commented 3 months ago

I expected that a disk image named "lychee-v0.15.1-macos-x86_64.dmg" would contain an x86_64 executable (or a Universal one) but instead it contains only an ARM64 file. Did you mean that to be the case? If so, perhaps you could rename the release asset to reflect the architecture it supports.

mre commented 3 months ago

I'm guessing we'll only support ARM moving forward. @axel-kah, do you think you could take a look? I'm guessing we'd have to adjust the pipeline again to reflect that.

nbriggs commented 3 months ago

That's too bad. The MacOS x86 is Tier 1 supported for the rust compiler so I would have expected it to be easy to build.

mre commented 3 months ago

It's not only about building the binary, it's also about GitHub providing runners for intel mac, about updating and maintaining our pipelines, building the Docker image, and testing it. The builds might also get slower, although all builds happen in parallel.

There's always the option to build it locally (try make install in the project root). For Docker, unofficial macOS x86 images are possible, too. That part would be way easier.

I say this to make people aware of the hidden work that goes into supporting a platform.

I don't have any statistics, but I doubt also that many people would use the image, so it would be maintained for a small group.

nbriggs commented 3 months ago

@mre - we do our Interlisp virtual machine builds on macOS (amongst others), it's C code, so we run on any macos-latest github runner and compile twice, once for each of --target=x86_64-apple-darwin and --target=aarch64-apple-darwin and lipo them together. It doesn't matter whether we're running the compiles on Intel or Apple Silicon. It sounds as though the rust compiler installation on macOS isn't set up with cross-compilation enabled for the two architectures?

mre commented 3 months ago

Yes, I think the same would work for Rust. I would be fine with merging a pull request if someone updates the pipeline to add support for it and tests these changes. It's just that I don't have the bandwidth nor the interest to do myself.

axel-kah commented 3 months ago

I'm guessing we'll only support ARM moving forward. @axel-kah, do you think you could take a look? I'm guessing we'd have to adjust the pipeline again to reflect that.

I can do that. I verified the macos binaries from the latest release and the nightly:

lychee/lychee: Mach-O 64-bit arm64 executable, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|PIE|HAS_TLV_DESCRIPTORS>

Will raise a PR to rename the assets accordingly. According to this document macos-latest runner switched from x86_64 to arm64 hardware with the last release, which means that cross compilation will be required to support x86_64 builds going forward.