GCC 10 isn't available on Linux

I’m using the homebrew/ubuntu20.04 image for testing. I ran brew update and brew is up-to-date. I ran the following commands and got the following output:

root@48f8ce54f9dc:/home/linuxbrew# brew info gcc
gcc: stable 5.5.0 (bottled)
GNU compiler collection
https://gcc.gnu.org/
Not installed
From: https://github.com/Homebrew/linuxbrew-core/blob/HEAD/Formula/gcc.rb
==> Dependencies
Build: xz ✘
Required: gmp ✔, libmpc ✔, mpfr ✔, binutils ✔, isl@0.18 ✔, zlib ✔
==> Analytics
install: 9,405 (30 days), 27,536 (90 days), 86,840 (365 days)
install-on-request: 7,115 (30 days), 21,097 (90 days), 64,814 (365 days)
build-error: 0 (30 days)

root@48f8ce54f9dc:/home/linuxbrew# brew info gcc@10
gcc: stable 5.5.0 (bottled)
GNU compiler collection
https://gcc.gnu.org/
Not installed
From: https://github.com/Homebrew/linuxbrew-core/blob/HEAD/Formula/gcc.rb
==> Dependencies
Build: xz ✘
Required: gmp ✔, libmpc ✔, mpfr ✔, binutils ✔, isl@0.18 ✔, zlib ✔
==> Analytics
install: 9,405 (30 days), 27,536 (90 days), 86,840 (365 days)
install-on-request: 7,115 (30 days), 21,097 (90 days), 64,814 (365 days)
build-error: 0 (30 days)

Where on macOS I get different output:

❯ brew info gcc
gcc: stable 10.1.0 (bottled), HEAD
GNU compiler collection
https://gcc.gnu.org/
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/gcc.rb
==> Dependencies
Required: gmp ✘, isl ✘, libmpc ✘, mpfr ✘
==> Options
--HEAD
	Install HEAD version
==> Analytics
install: 109,270 (30 days), 300,147 (90 days), 1,187,353 (365 days)
install-on-request: 51,628 (30 days), 142,820 (90 days), 587,972 (365 days)
build-error: 0 (30 days)

❯ brew info gcc@10
gcc: stable 10.1.0 (bottled), HEAD
GNU compiler collection
https://gcc.gnu.org/
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/gcc.rb
==> Dependencies
Required: gmp ✘, isl ✘, libmpc ✘, mpfr ✘
==> Options
--HEAD
	Install HEAD version
==> Analytics
install: 109,270 (30 days), 300,147 (90 days), 1,187,353 (365 days)
install-on-request: 51,628 (30 days), 142,820 (90 days), 587,972 (365 days)
build-error: 0 (30 days)

Yes, GCC 10 is not currently available for Homebrew on Linux. This open PR would add GCC 10 to Homebrew on Linux, but it does other stuff as well.


A simpler PR would replace the alias gcc@10 which points to gcc with a formula gcc@10.rb.
1 Like