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

Cannot build 1.8.7+ on macOS < 12.3 because readlink doesn't accept -f flag #636

Closed
1 of 4 tasks
cvortmann opened this issue Nov 14, 2024 · 2 comments · Fixed by #640
Closed
1 of 4 tasks

Cannot build 1.8.7+ on macOS < 12.3 because readlink doesn't accept -f flag #636

cvortmann opened this issue Nov 14, 2024 · 2 comments · Fixed by #640

Comments

@cvortmann
Copy link

cvortmann commented Nov 14, 2024

Your Environment

  • mas version: 1.8.6
  • macOS version (system_profiler SPSoftwareDataType -detailLevel mini):
Software:

    System Software Overview:

      System Version: macOS 11.7.10 (20G1427)
      Kernel Version: Darwin 20.6.0
      Time since boot: 7 days 23:14

mas Install Method

  • brew install mas (homebrew-core)
  • mas-cli/tap
  • .pkg installer from releases
  • Built from source
    • Fork/branch: ? (e.g. mas-cli/main)
    • Xcode version: 10.?

Describe the Bug

When running brew upgrade the process of upgrading from 1.8.6 to 1.8.7 fails due to readlink: illegal option -- f.

To Reproduce

Steps to reproduce the behavior:

  1. Call brew upgrade with mas version 1.8.6 installed.

Expected Behavior

mas is upgrade to 1.8.7 successfully

Actual Behavior

The process fails. mas is locked on 1.8.6.

Screenshots, Terminal Output

Full Output of brew upgrade

==> Upgrading mas
  1.8.6 -> 1.8.7
==> script/build
Last 15 lines from /Users/.../Library/Logs/Homebrew/mas/01.build:
2024-11-14 10:26:26 +0000

script/build

readlink: illegal option -- f
usage: readlink [-n] [file ...]
@rgoldberg
Copy link
Contributor

rgoldberg commented Nov 14, 2024

@cvortmann mas 1.8.7+ can only be built with macOS 12.5+ because it requires Xcode 14.2+ to be able to build Swift 5.7.1 (but the generated executables should be able to be run by macOS 10.13+).

The formula will be updated to reflect the aforementioned version requirements.

-f was added to readline in macOS 12.3, so its use is fine for any macOS that can build mas.

The normal way to install mas on older macOS versions for which Homebrew doesn't provide bottles is to use the mas custom tap:

# uninstall only necessary if you already have pre-1.8.7 mas installed via Homebrew
brew uninstall mas

brew install mas-cli/tap/mas

The currently released 1.8.7 binaries, however, are accidentally only for Apple Silicon arm64, not for Universal 2, which would support both Apple Silicon arm64 & Intel x86_64.

The person working on the release process has been busy. If he cannot fix the released binaries & formula issues soon, I will look into it, but I am not experienced with either the old or the new release process.

When the release process is fixed, we'll release a new version. If anything goes wrong with that, please let us know.

Will leave this open until the version requirements are updated throughout the docs, release process, etc. Other release problems are already documented in other issues.

@rgoldberg rgoldberg changed the title 🐛 [BUG] Homebrew upgrade 18.6 -> 1.8.7 fails on MacOS 11.7.10 with "readlink: illegal option -- f" Cannot build 1.8.7+ macOS < 12.3 because readlink doesn't accept -f flag Nov 16, 2024
@rgoldberg rgoldberg added this to the 1.8.8 milestone Nov 21, 2024
@rgoldberg rgoldberg self-assigned this Nov 21, 2024
@rgoldberg rgoldberg changed the title Cannot build 1.8.7+ macOS < 12.3 because readlink doesn't accept -f flag Cannot build 1.8.7+ on macOS < 12.3 because readlink doesn't accept -f flag Nov 22, 2024
@rgoldberg
Copy link
Contributor

rgoldberg commented Dec 27, 2024

@cvortmann mas 1.8.8 was released.

The Homebrew custom tap now provides correct platform-specific binaries for both arm64 & x86_64.

The .pkg installer from the GitHub Release installs a Universal 2 binary.

Please let me know if it works for you. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants