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

brew deps --os linux does not report Linux dependencies on macOS ARM #19021

Open
3 tasks done
steveh opened this issue Dec 31, 2024 · 1 comment
Open
3 tasks done

brew deps --os linux does not report Linux dependencies on macOS ARM #19021

steveh opened this issue Dec 31, 2024 · 1 comment
Labels
bug Reproducible Homebrew/brew bug install from api Relates to API installs

Comments

@steveh
Copy link

steveh commented Dec 31, 2024

brew doctor output

Your system is ready to brew.

Verification

  • My "brew doctor output" above says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update twice and am still able to reproduce my issue.
  • This issue's title and/or description do not reference a single formula e.g. brew install wget. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.

brew config output

HOMEBREW_VERSION: 4.4.14-12-gc723e2f
ORIGIN: https://github.com/Homebrew/brew
HEAD: c723e2fde3ed98f5aa763e8eed152aadfa3bff3a
Last commit: 51 minutes ago
Branch: master
Core tap HEAD: 3f636c3ff7244707e4c13a613f672aaee6cb8582
Core tap last commit: 21 minutes ago
Core tap JSON: 31 Dec 21:01 UTC
Core cask tap HEAD: 21862d9c82c9909995a19df597e27490a16f5f11
Core cask tap last commit: 40 minutes ago
Core cask tap JSON: 31 Dec 21:01 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_BAT_THEME: gruvbox-dark
HOMEBREW_CASK_OPTS: []
HOMEBREW_EDITOR: vim
HOMEBREW_MAKE_JOBS: 10
HOMEBREW_SORBET_RUNTIME: set
Homebrew Ruby: 3.3.6 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.6/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 16.0.0 build 1600
Git: 2.47.1 => /opt/homebrew/bin/git
Curl: 8.7.1 => /usr/bin/curl
macOS: 15.2-arm64
CLT: 16.2.0.0.1.1733547573
Xcode: N/A
Rosetta 2: false

What were you trying to do (and why)?

List all Linux dependencies for a formula, so I could install on a different machine to create a bottle.

What happened (include all command output)?

$ brew deps --os linux [email protected]
bzip2
ca-certificates
expat
libedit
libffi
libxcrypt
mpdecimal
ncurses
openssl@3
readline
sqlite
unzip
xz
zlib

What did you expect to happen?

The 3 on_linux dependencies to be included in the output. I assume leaving --arch blank means it's using --arch arm on my M1 Mac, but these dependencies are not architecture-dependent on Linux.

depends_on "berkeley-db@5"
depends_on "libnsl"
depends_on "libtirpc"

per https://github.com/Homebrew/homebrew-core/blob/3f636c3ff7244707e4c13a613f672aaee6cb8582/Formula/p/python%403.12.rb#L41C1-L45C6

Step-by-step reproduction instructions (by running brew commands)

1. `brew deps --os linux [email protected]`
2. Note absence of `libnsl`, `berkeley-db@5`, `libtirpc`
3. `brew deps --os linux --arch intel [email protected]`
4. Dependencies are now shown
@steveh steveh added the bug Reproducible Homebrew/brew bug label Dec 31, 2024
@cho-m
Copy link
Member

cho-m commented Jan 1, 2025

Issue is JSON API specific as variations are recorded based on os/arch combination:

curl -sL https://formulae.brew.sh/api/formula/[email protected] | jq .variations
{
  "x86_64_linux": {
    "dependencies": [
      "mpdecimal",
      "openssl@3",
      "sqlite",
      "xz",
      "berkeley-db@5",
      "libnsl",
      "libtirpc"
    ]
  }
}

If run on tap, then behavior is as expected:

HOMEBREW_NO_INSTALL_FROM_API=1 brew deps --os linux [email protected]
berkeley-db@5
bzip2
ca-certificates
expat
krb5
libedit
libffi
libnsl
libtirpc
libxcrypt
mpdecimal
ncurses
openssl@3
readline
sqlite
unzip
xz
zlib

@cho-m cho-m added the install from api Relates to API installs label Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Reproducible Homebrew/brew bug install from api Relates to API installs
Projects
None yet
Development

No branches or pull requests

2 participants