7z2604-mac binary fails to launch on macOS < 26 due to LC_BUILD_VERSION minos 26.0

Open Beginner friendly
#257 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
cpp, macos
Domain
build-system

Research direction

Start with CPP/7zip/var_mac_arm64.mak and var_mac_x64.mak, then trace how the official macOS packages invoke these makefiles. Check the built 7zz with vtool -show-build to confirm the deployment target is recorded below 26.0; done means the package binary can launch on the intended older macOS versions.

Written by the indexing model from the issue text.

Description

The official 7z2604-mac.tar.xz binary cannot launch on macOS 15 or earlier because its minos in LC_BUILD_VERSION is stamped as 26.0, causing dyld to reject it immediately.

vtool -show-build 7zz output
platform MACOS
   minos 26.0
     sdk 26.5
Cause

Neither CPP/7zip/var_mac_arm64.mak nor var_mac_x64.mak sets a deployment target:

MY_ARCH=-arch arm64

Clang therefore defaults to stamping the host macOS version of the build machine into LC_BUILD_VERSION.

Suggestion

Could you pass an explicit deployment target (e.g. -mmacosx-version-min=12.0 or MACOSX_DEPLOYMENT_TARGET=12.0) when building the official macOS packages? Since 7zz only links libSystem and libc++, this would allow the binary to run on older macOS versions.

Dominant language
C++
Stars
4.6k
Forks
519
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ip7z/7zip

All issues in ip7z/7zip

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.