From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2698DC433ED for ; Mon, 26 Apr 2021 03:17:53 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 711766101B for ; Mon, 26 Apr 2021 03:17:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 711766101B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=1wt.eu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94) (envelope-from ) id 1larkF-0000Dc-CH; Sun, 25 Apr 2021 23:17:11 -0400 Received: from wtarreau.pck.nerim.net ([62.212.114.60] helo=1wt.eu) by shelob.surriel.com with esmtp (Exim 4.94) (envelope-from ) id 1lYCI9-0004bY-PD for kernelnewbies@kernelnewbies.org; Sun, 18 Apr 2021 14:37:10 -0400 Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id 13IIaxro022446; Sun, 18 Apr 2021 20:36:59 +0200 Date: Sun, 18 Apr 2021 20:36:59 +0200 From: Willy Tarreau To: Fawad Lateef Subject: Re: Compiling kernel-3.4.xxx with gcc-9.x. Need some help. Message-ID: <20210418183659.GA22430@1wt.eu> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Mailman-Approved-At: Sun, 25 Apr 2021 23:17:09 -0400 Cc: Greg KH , kernelnewbies , Linux Kernel Mailing List , Arnd Bergmann X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org 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