0

On Debian 12 with KDE cat /proc/version returns:

Linux version 5.10.0-17-amd64 ([email protected]) (gcc-10 (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2) #1 SMP Debian 5.10.136-1 (2022-08-13)

Why does it show gcc-10 / Debian 10, not gcc-12 / Debian 12? Is that a problem?

I found out when I was investigating why xbindkeys kept working long after upgrading to D12 and Wayland despite that it shouldn't work under Wayland. It kept working for several months after upgrading until it suddenly stopped working breaking my mousewheel config so I wanted to see my version number because I suspected that maybe it has to do with a recent point upgrade. I have the latest Debian version and it's 12.7 as of now (verified with cat /etc/debian_version).

gcc --version shows gcc (Debian 12.2.0-14) 12.2.0.

It could be that I have the permissions of gcc set with this for security reasons as recommended by sudo lynis audit system: sudo chmod 0444 /usr/bin/gcc which I change only whenever I compile something with gcc. I have not seen any error message or similar about problems during upgrade. Does this permission need to be changed before upgrading?

5
  • 2
    I’m voting to close this question because the OP is not running a Debian 12 kernel (likely due to a partial/failed upgrade). It may make sense for the OP to create a new question along the lines of "After a Debian upgrade my kernel is still an old version" if they need help resolving that problem. Commented Nov 1, 2024 at 18:52
  • @StephenHarris Nothing suggested that the upgrade has failed. No error, no warning, no missing upgrades, nothing. Closing this just because an additional question seems appropriate does not make sense. I'll make a separate question about that then. Commented Nov 1, 2024 at 19:12
  • 2
    Debian 12 comes with a 6.1 kernel. That you're running a 5.10 kernel means you are not running a Debian 12 kernel. Thus the premise of your question ("why was gcc-10 used in debian 12") is incorrect; it wasn't. Commented Nov 1, 2024 at 19:21
  • cat /etc/debian_version, KDE Info Center, lsb_release -a and all other ways to show the current Debian version show and showed Debian 12 so then it's Debian 12 according to ways to see the running Debian version (which is too long to add to the title and somewhat implicit). Seems like all those methods to see the current Debian version are broken then. Commented Nov 1, 2024 at 19:29
  • 1
    Debian, like many modern Linux distros is not a "monolith" and can be upgraded and changed piecemeal. This means one component can say one thing and another component can say another. In your case some of the userspace components (eg files in /etc) are saying "I came from Debian 12", but your kernel is saying "I came from Debian 11". The result is an inconsistent installation. But despite what the userspace says, the kernel is not a Debian 12 kernel. Commented Nov 1, 2024 at 20:13

1 Answer 1

3

The kernel packages don’t necessarily use the system version of GCC; sometimes they use a slightly older version. The “Debian” version indicated alongside the GCC version isn’t the Debian release, it’s the Debian GCC package version.

However in your case the discrepancy comes from the fact that you’re running a Debian 11 kernel, and Debian 11 mostly used GCC 10. Debian 12 uses kernels in the 6.1 series, not 5.10.

(In any case, most packages are built with whatever version of the relevant compiler is in unstable at the time they’re uploaded, or when they are last rebuilt; that might not be the default compiler in the final release of Debian. The exception is packages that are updated within a release; those are built with the corresponding compiler in that release.)

Permissions don’t matter during package upgrades unless they prevent a required program from running during preinst; that isn’t an issue with GCC. The permissions revert to the package’s default permissions when the package is unpacked.

9
  • Isn't it a problem I'm running a Debian 11 kernel? Why and how to change that? It's certainly not what I intended and nothing is shown about that when running apt-get upgrade/dist-upgrade. Commented Nov 1, 2024 at 18:09
  • What does apt policy linux-image-amd64 show? Commented Nov 1, 2024 at 19:25
  • This linux-image-amd64: Installed: (none) Candidate: 6.1.112-1 Version table: 6.10.11-1~bpo12+1 100 100 http://ftp.XY.debian.org/debian bookworm-backports/main amd64 Packages 6.1.112-1 500 500 http://security.debian.org/debian-security bookworm-security/main amd64 Packages 6.1.106-3 500 500 http://ftp.XY.debian.org/debian bookworm/main amd64 Packages (only replaced XY) Commented Nov 1, 2024 at 19:30
  • If you install that and reboot, you should find yourself running the Debian 12 kernel. Commented Nov 1, 2024 at 19:32
  • Nothing is asked to be installed when running sudo apt-get dist-upgrade or sudo apt-get upgrade (except sysv-rc-conf) or when I upgraded. How should I know that I should install this kernel, why is it not installed after upgrading and how to even install it? Commented Nov 1, 2024 at 19:34

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.