What is the hard requirement for glibc?

If I understand correctly, it’s seems to me glibc 2.23 is the hard requirement for homebrew and recommended that users should install the glibc formula from the onset of the setup. In my setup, I totally forget to install glibc and thus all formulas are compiled/linked against the system glibc 2.17 (CentOS 7.8). I have 2 questions:

  • How would we enforce the hard requirement of glibc 2.23?
  • Why do we choose glibc 2.23 when glibc 2.17 (which is still popular and supported) can be used?

Many thanks

Hi. The hard requirement is glibc 2.13. See https://docs.brew.sh/Homebrew-on-Linux#requirements

Our bottles are built with glibc 2.23, that’s true. In the case of 2.17, brew should install glibc 2.23 for you and it should work out of the box. If this is not the case then it is a bug.

Could you please elaborate on which step that glibc would get installed automatically for me? Is it when invoking brew doctor? Or is it when installing formula that is built with glibc 2.23?

I guess whenever you brew install something. But I did not test it since a long time ago, so I hope it still works. You could also brew install glibc manually if it does not work.

Are you hitting any specific issue/error message?

I do not hit any error. It is just a generic question as I am continuing to build more bottles for my ppc64le homebrew version.

Ha, got it.

So there are 2 bottles that we build on Debian 7 (It’s a little bit messy too to get the bottles uploaded and working, this is a manual process I need to redo sometimes). Debian 7 has glibc 2.13. These bottles are “patchelf” and “binutils”. Once these are built, all the other bottles are built with ubuntu 16.04 and glibc 2.23.

If you want to gain time and simplify your life, you could build everything with glibc 2.23 (or a system with glibc 2.17 if this is what you need). It depends what you think is the lowest version that needs to be supported. I might chose something different than linuxbrew-core.

I would just recommend that you try to build stuff with system gcc5 as we do, to ease your life, as linuxbrew-core is mostly tested against gcc 5. We plan to migrate to gcc 7 next year.

Whenever brew install foo would install a bottle, Homebrew on Linux installs glibc if your host’s version of glibc is less than version 2.23.

1 Like

Thanks for the info. My goal is to stay as close as possible to the official linuxbrew so I am going to re-build patchelf and binutils on Debian 7 and the rest on Ubuntu 16.04 with glibc 2.23.

1 Like