[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Installing gcc-10 on buster



Dear Experts,

Can anyone suggest the best approach to installing a
newer gcc on an older Debian system?

Specifically, I have an Nvidia Jetson developer board which
is running buster, and cannot easily be upgraded because of
the non-free Nvidia stuff. But I'd like to install a newer
g++ in order to get more C++20 features.

In the past I've also wanted to do this in order to use
distcc; it requires that all the workers have the same version
of gcc, so if the clients have different Debian versions the
workers will need to have multiple versions of gcc installed
concurrently.

I hoped to find gcc packages in Debian backports, but there
aren't any - perhaps there could be? But maybe I can just
install the bullseye gcc? I added sources.list lines for both
buster and bullseye and configured APT::Default-Release "buster";
and then:

# apt-get -t bullseye install gcc-10
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
binutils binutils-aarch64-linux-gnu binutils-common clang clang-11 cpp cpp-10 g++
  g++-10 gcc gcc-10-base libasan6 libatomic1 libbinutils libc-bin libc-dev-bin
  libc-devtools libc-l10n libc6 libc6-dbg libc6-dev libcbor0 libcc1-0
  libclang-common-11-dev libclang-cpp11 libclang1-11 libcrypt-dev libcrypt1
libctf-nobfd0 libctf0 libffi7 libfido2-1 libgc1 libgcc-10-dev libgcc-s1 libgomp1
  libisl23 libitm1 libllvm11 liblsan0 libmpdec3 libnsl-dev libnsl2 libnss-nis
  libnss-nisplus libobjc-10-dev libobjc4 libpcre2-16-0 libpcre2-32-0 libpcre2-8-0
  libpcre2-dev libpcre2-posix2 libpython3-stdlib libpython3.9-minimal
  libpython3.9-stdlib libreadline8 libselinux1 libselinux1-dev libsepol1
libsepol1-dev libstdc++-10-dev libstdc++6 libtirpc-common libtirpc-dev libtirpc3
  libtsan0 libubsan1 libz3-4 locales manpages manpages-dev openssh-client
  openssh-server openssh-sftp-server python3 python3-distutils python3-lib2to3
  python3-minimal python3.9 python3.9-minimal runit-helper
Suggested packages:
binutils-doc clang-11-doc cpp-doc gcc-10-locales gcc-10-doc gcc-multilib flex
  bison gcc-doc glibc-doc libstdc++-10-doc keychain libpam-ssh monkeysphere
  ssh-askpass molly-guard ufw python3-doc python3-tk python3-venv python3.9-venv
  python3.9-doc
Recommended packages:
  llvm-11-dev libomp-11-dev
The following packages will be REMOVED:
  clang-7 g++-8 gcc-8 libgcc-8-dev libobjc-8-dev libstdc++-8-dev python3.7
The following NEW packages will be installed:
  clang-11 cpp-10 g++-10 gcc-10 gcc-10-base libasan6 libc-devtools libcbor0
  libclang-common-11-dev libclang-cpp11 libclang1-11 libcrypt-dev libcrypt1
libctf-nobfd0 libctf0 libffi7 libfido2-1 libgc1 libgcc-10-dev libgcc-s1 libisl23
  libllvm11 libmpdec3 libnsl-dev libnsl2 libnss-nis libnss-nisplus libobjc-10-dev
  libpcre2-16-0 libpcre2-32-0 libpcre2-dev libpcre2-posix2 libpython3.9-minimal
  libpython3.9-stdlib libreadline8 libstdc++-10-dev libtirpc-common libtirpc-dev
  libtirpc3 libz3-4 python3.9 python3.9-minimal runit-helper
The following packages will be upgraded:
  binutils binutils-aarch64-linux-gnu binutils-common clang cpp g++ gcc libatomic1
  libbinutils libc-bin libc-dev-bin libc-l10n libc6 libc6-dbg libc6-dev libcc1-0
  libgomp1 libitm1 liblsan0 libobjc4 libpcre2-8-0 libpython3-stdlib libselinux1
  libselinux1-dev libsepol1 libsepol1-dev libstdc++6 libtsan0 libubsan1 locales
manpages manpages-dev openssh-client openssh-server openssh-sftp-server python3
  python3-distutils python3-lib2to3 python3-minimal
39 upgraded, 43 newly installed, 7 to remove and 526 not upgraded.
Need to get 115 MB of archives.
After this operation, 278 MB of additional disk space will be used.
Do you want to continue? [Y/n]


The main problem there is that it wants to remove gcc-8. Strangely it also
wants to upgrade clang (which I don't use, hmm) and various other odd things
like openssh.

Is there any chance of something like this working?

Or should I build gcc-10 from source? Or install in a chroot, or some
other sort of container?

Searching mainly finds websites suggesting that it's as simple as
"apt-get install gcc-7 gcc-8 gcc-9" *on Ubuntu 20.04* ....


Thanks for any suggestions!


Regards, Phil.






Reply to: