Homebrew / homebrew-core

🍻 Default formulae for the missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
13.77k stars 12.45k forks source link

libelf symlinks points nowhere #198038

Open tommythorn opened 4 hours ago

tommythorn commented 4 hours ago

brew gist-logs <formula> link OR brew config AND brew doctor output

$   brew config
HOMEBREW_VERSION: 4.4.5
ORIGIN: https://github.com/Homebrew/brew
HEAD: 254bf3fe9d8fa2e1b2fb55dbcf535b2d870180c4
Last commit: 7 days ago
Core tap JSON: 18 Nov 00:11 UTC
Core cask tap JSON: 18 Nov 00:11 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_EDITOR: emacs -nw
HOMEBREW_MAKE_JOBS: 14
Homebrew Ruby: 3.3.6 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.6/bin/ruby
CPU: 14-core 64-bit dunno
Clang: 16.0.0 build 1600
Git: 2.47.0 => /opt/homebrew/bin/git
Curl: 8.7.1 => /usr/bin/curl
macOS: 15.1-arm64
CLT: 16.1.0.0.1.1729049160
Xcode: N/A
Rosetta 2: false
$ brew doctor
Your system is ready to brew.

Verification

What were you trying to do (and why)?

I was trying to build software that uses libelf and it couldn't find libgelf.h

What happened (include all command output)?

$ ls -l /usr/local/opt/libelf lrwxr-xr-x 1 tommy admin 25 Nov 2 2022 /usr/local/opt/libelf@ -> ../Cellar/libelf/0.8.13_1 ls -l /usr/local/opt/Cellar ls: /usr/local/opt/Cellar: No such file or directory $ ls -l /opt/homebrew/Cellar/libelf/0.8.13_1/ total 176 -rw-r--r--@ 1 tommy admin 25275 Nov 1 2009 COPYING.LIB -rw-r--r--@ 1 tommy admin 35406 Nov 1 2009 ChangeLog -rw-r--r--@ 1 tommy admin 916 Nov 17 16:06 INSTALL_RECEIPT.json -rw-r--r--@ 1 tommy admin 13232 Nov 1 2009 README drwxr-xr-x@ 3 tommy admin 96 Nov 1 2009 include/ drwxr-xr-x@ 5 tommy admin 160 Nov 1 2009 lib/ -rw-r--r--@ 1 tommy admin 2678 Nov 17 16:06 sbom.spdx.json

What did you expect to happen?

I expect the link to point to the right location

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

See above
daeho-ro commented 4 hours ago

AFAIK, silicon mac uses the location /opt/homebrew/lib path not /usr/local/lib.