0

I need to install gcc-11.4.0 + dependencies on Debian Bullseye. I downloaded gcc-11.4.0 from:

http://ftp.de.debian.org/debian/pool/main/g/gcc-11/gcc-11_11.4.0-7_amd64.deb

However, if I try to install it via

sudo apt install ./gcc-11_11.4.0-7_amd64.deb

I receive

The following packages have unmet dependencies:
 gcc-11 : Depends: cpp-11 (= 11.4.0-7) but it is not installable
          Depends: gcc-11-base (= 11.4.0-7) but it is not installable
          Depends: libcc1-0 (>= 11.4.0-7) but 10.2.1-6 is to be installed
          Depends: binutils (>= 2.41.50.20231214) but 2.35.2-2 is to be installed
          Depends: libgcc-11-dev (= 11.4.0-7) but it is not installable
          Depends: libc6 (>= 2.34) but 2.31-13+deb11u5 is to be installed
          Depends: libgmp10 (>= 2:6.3.0+dfsg) but 2:6.2.1+dfsg-1+deb11u1 is to be installed
          Depends: libzstd1 (>= 1.5.5) but 1.4.8+dfsg-2.1 is to be installed

and some of these packages have dependencies again. It seems really cumbersome to install a specific version of a package if this package has a lot of dependencies.

Any tips on how to avoid downloading and installing the packages by hand are very much appreciated.

1 Answers1

3

Even though it’s “just” a compiler, GCC is tied to a number of core packages, which means it’s difficult to upgrade to a newer version than the version around which a Debian release is based (in Debian 11, that’s GCC 10). Ultimately you risk breaking your setup.

You could manually build GCC 11 on your Debian 11 system, but in practice it should be much easier to run your builds in a Debian 12 container (which will have GCC 11).

Stephen Kitt
  • 434,908
  • So if I was able to build gcc-11.4 on my bullseye system, I wouldn't need to build all the dependencies myself? I was thinking I would have to build all dependencies as listed above myself then. – binaryBigInt Jan 22 '24 at 10:44
  • No, you would build GCC 11 with the dependencies available in Debian 11 (binutils 2.35.2, libgmp10 6.2.1, etc.). That way you’d end up with a GCC 11 build which only uses dependencies in Debian 11. – Stephen Kitt Jan 22 '24 at 10:58
  • But trying to install gcc-11 .deb it told me it expects certain versions from its dependencies which are not available on my system and yet I can build the gcc-11.4 source without having the dependency versions met? – binaryBigInt Jan 22 '24 at 11:44
  • 1
    Yes. The versions of the dependencies encoded in the .deb you downloaded are a reflection of the versions used during the build (in Debian unstable, for the GCC 11.4 packages). When building GCC from source, the versions of the dependencies that matter are those reflected in the various configure.ac files. I haven’t checked recently but as far as I’m aware, the libraries available in Debian 11 (without rebuilding) meet the requirements for building GCC 11 from source. – Stephen Kitt Jan 22 '24 at 12:39
  • gcc-11.x.x__configure.txt https://drive.google.com/file/d/139Nmva_r4Y_nVEGaxghzD0um365qdTT_/view?usp=drive_link ....... Available is gcc11.2-c++_11.2.0-8LOCAL_amd64.tar.xz (once built with Debian 8) https://drive.google.com/file/d/1-yEMEIU_066UJSuGSu-dopK_jNWBom3J/view?usp=drive_link – Knud Larsen Jan 24 '24 at 09:54