btop icon indicating copy to clipboard operation
btop copied to clipboard

[BUG] Why is gcc a dependency in the homebrew package of btop?

Open ghoffart opened this issue 3 years ago • 3 comments

Describe the bug

Installing the btop package from homebrew with brew install btop installs gcc as a dependency, too. As the btop package is "poured" and not built, why is gcc needed, if there is no compilation step?

To Reproduce

macOS % brew install btop […] ==> Installing btop dependency: gcc ==> Pouring gcc--11.2.0_3.monterey.bottle.1.tar.gz 🍺 /usr/local/Cellar/gcc/11.2.0_3: 2,163 files, 459.8MB ==> Installing btop ==> Pouring btop--1.2.6.monterey.bottle.tar.gz 🍺 /usr/local/Cellar/btop/1.2.6: 26 files, 952.7KB […]

Expected behavior

No gcc binary package is installed on macOS via brew.

Screenshots

see above

Info (please complete the following information):

  • btop++ version: btop -v: btop version: 1.2.6
  • Binary: [self compiled or static binary from release]: binary from homebrew
  • (If compiled) Compiler and version: n.a.
  • Architecture: [x86_64, aarch64, etc.] uname -m: arm64
  • Platform: [Linux, FreeBSD, OsX]: macOS
  • (Linux) Kernel: uname -r: n.a.
  • (OSX/FreeBSD) Os release version: 11.6.5 and 12.3.1
  • Terminal used: iTerm2
  • Font used: n.a.

ghoffart avatar Apr 13 '22 17:04 ghoffart

@ghoffart See https://github.com/Homebrew/homebrew-core/pull/90061

The short version: Btop++ needs GCC to compile since Clang don't fully support C++20 yet. This isn't any problem with the binaries I publish with the releases for macos since they are statically linked with libgcc and libstdc++. Brew however don't allow static linking with dependencies so they instead compile btop++ dynamically and then add dependency on gcc because it needs libgcc.

aristocratos avatar Apr 26 '22 19:04 aristocratos

I have the same problem, it would be nice if I could install it with brew without relying on GCC depends.

XhstormR avatar Apr 28 '22 00:04 XhstormR

@XhstormR You would have to take that up with homebrew. I neither created the brew formula for btop or hold any sway over their dependency rules.

aristocratos avatar Apr 28 '22 12:04 aristocratos