Anyone else having problems with Homebrew-installed gcc?

Thank you for this interesting project. I’m having issues installing gcc with Homebrew and wondered if anyone might have a fix. FWIW I am using a freshly installed Secureblue image (silverblue-asus-userns-hardened:latest, installed from the .iso). I did ‘ujust brew’ to set up Homebrew and then tried to install a font, which pulled in gcc as a dependency. But the post-install script fails with this error: “The post-install step did not complete successfully.” Re-running it via brew postinstall just produces the same error. If I run brew doctor it tells me I don’t have the developer tools installed.

Googling around, the only advice I could find for this was to make sure the Homebrew requirements for Linux are satisfied. But the Fedora section seems outdated (use yum??) and presumably doesn’t apply to Silverblue variants. My impression was that this was inteded to work out of the box after installing with ‘ujust brew’ – am I missing something?

Happy to raise this in Secureblue’s issue tracker, but thought I would start here since AFAIK all the Homebrew stuff is inherited from the base images. Many thanks for any help you can provide.

Impossible to help you without the details. Which font? Describing the error doesn’t help we need to see the terminal output.

Brew requires the hosts gcc to setup gcc installed via brew.

$ brew doctor

Warning: No developer tools installed.
Install Clang or run ‘brew install gcc.’

$ brew list

binutils gcc gmp isl libmpc lz4 mpfr xz zlib zstd

$ brew install gcc

Warning: gcc 14.1.0_2 is already installed and up-to-date. To reinstall 14.1.0_2, run: brew reinstall gcc

$ brew reinstall gcc

… Reinstalling gcc …

Warning: The post-install step did not complete successfully. You can try again using: brew postinstall gcc

$ brew install font-iosevka

Error: The following formula cannot be installed from bottle and must be built from source: font-iosevka. Install Clang or run ‘brew install gcc’.

The problem is that your system host doesn’t have gcc installed, like @m2Giles said. It seems that gcc from homebrew uses the libc from host system, that’s why homebrew’s gcc need host gcc. Maybe Bluefin need to include gcc in the image. You can install gcc in your system by yourself:

sudo rpm-ostree install gcc

Thank you for the explanation.

I find it hard to understand why a system which ships with Homebrew should also require the user to manually layer gcc in order to get Homebrew to work. Especially since users are explicitly admonished against layering packages in general.

I will take a look in Secureblue to see if they might have configured gcc in a way that breaks Universal Blue’s Homebrew installation.

I saw here bluefin-dx already have gcc installed. See if bluefind is good for your needs.

gcc has been on the image for about 5 months, it may be that you’re on a custom image which doesn’t provide that.

bluefin from ublue-os has gcc installed on it.

Thanks for all the help, everyone. I guess I did pick the wrong place to report this – again, I’m using a Secureblue image (silverblue-asus-userns-hardened, which is built from Universal Blue’s silverblue-asus base image). And it looks like gcc is not on that image. So when you ujust brew and start installing Homebrew packages, brew will complain about gcc not being on the host.

Oddly enough there is no Bluefin variant for Asus in Secureblue (but a hardened Bluefin for Asus would be cool!). I guess I will, with some trepidation, raise this with Secureblue and see what they say.

(Although come to think of it… if you’re going to either pre-install Homebrew or make it very easy for users to install Homebrew on every UBlue base image, would it not make sense to also include gcc on every base image since it’s needed by Homebrew?)

1 Like

Are you just wanting to install Iosevka font or do you need gcc also?

Apparently you need to do the one to do the other.

My intention was to use Homebrew for installing all the command-line software I want to use on the host, as well as a few odds and ends like fonts.

I was surprised that it did not work as advertised, that’s all.

Sorry it’s impossible for us to support images we do not make, if you want things to work use a supported configuration.