kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: Willy Tarreau <w@1wt.eu>
To: Fawad Lateef <fawadlateef@gmail.com>
Cc: Greg KH <greg@kroah.com>,
	kernelnewbies <kernelnewbies@kernelnewbies.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Arnd Bergmann <arnd@kernel.org>
Subject: Re: Compiling kernel-3.4.xxx with gcc-9.x. Need some help.
Date: Sun, 18 Apr 2021 20:36:59 +0200	[thread overview]
Message-ID: <20210418183659.GA22430@1wt.eu> (raw)
In-Reply-To: <CAGgoGu4EzSKE68pva74Pdhdf+ssZddhFLzFTOFxMKiJOBaW8aw@mail.gmail.com>

On Sun, Apr 18, 2021 at 07:25:08PM +0200, Fawad Lateef wrote:
> I tried booting the userspace compiled with gcc-9.1 and kernel
> compiled with gcc-5.5. But seems like the kernel 3.4.111 is not
> compatible with user-space compiled with gcc-9.1.
> During boot getting error: "FATAL: kernel too old." (from init I
> believe) and then kernel Panics. Log (part) below:

That's not a compiler issue, it's a libc issue. When you built your
toolchain you have likely (or accidently) selected a minimum kernel
version that is more recent than this one. The init code in the linker
checks the kernel version and refuses to start in such a case. If your
init depends on this libc, you simply cannot boot.

I don't know how far recent libcs can go on kernel support, but
you may possibly need to rebuild an older one, and sometimes older
libc will not build with modern gcc. So you should use the most
recent libc that still claims to support that kernel, and use the
most recent compiler your libc can be built with (maybe yours is
OK but I don't know).

Hoping this helps,
Willy

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

  reply	other threads:[~2021-04-26  3:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-28 20:20 Compiling kernel-3.4.xxx with gcc-9.x. Need some help Fawad Lateef
2021-03-28 20:49 ` Andy Shevchenko
2021-03-28 21:02   ` Fawad Lateef
2021-03-29  4:57 ` Greg KH
2021-03-29 19:20   ` Fawad Lateef
2021-03-29 19:35     ` Greg KH
2021-03-29 20:06     ` Arnd Bergmann
2021-03-30 13:23       ` Fawad Lateef
2021-03-30 13:40         ` Greg KH
2021-04-18 17:23           ` Fawad Lateef
2021-04-18 17:25           ` Fawad Lateef
2021-04-18 18:36             ` Willy Tarreau [this message]
2021-03-30 14:22         ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210418183659.GA22430@1wt.eu \
    --to=w@1wt.eu \
    --cc=arnd@kernel.org \
    --cc=fawadlateef@gmail.com \
    --cc=greg@kroah.com \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).