Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1925040pxb; Sun, 18 Apr 2021 11:38:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzX4TzmrZG4ybTxyWua0V/d68VI9DYpEX4/ufXLTKj9dGmahcSrNagHkADspGp6gNYxF3To X-Received: by 2002:a65:6917:: with SMTP id s23mr8465960pgq.35.1618771138098; Sun, 18 Apr 2021 11:38:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618771138; cv=none; d=google.com; s=arc-20160816; b=xV4KNcsgiM6bmp14lna5v4BHMadm9HhhUbo6p7GzZgh1vxBECTPEhH2kp3fLCFVo5v wSC2W6JiXaR5cTJ7KLpEu0uvfjHQeZEI6D+ghu+NVBXCkyCAV2qpEJakvpTM3kxPRZUy Vi6Ip3BlxZlAtrQSpudNR+98OyHBphSQVQR/zLOsAEL5xrYIgSL8mEu4gQwmARJFyAuI 6U6S29hP0+5ZOAXyXHO2nkmCvNNQR1mtGmWcO8yvPxV/BPdWl2K4/iUwSs13DRTLWmHK x/TbWjoWC3O8NkUy7/5hctZ57vi6CuAufu7kmtP06JLkstk5QZDtQTrOc+87XH5vqd4s FVGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=P0Xk5Jk4DwavboZs+mCpPcS4kjil4x2DKU8FU7r0zPQ=; b=ULYDw8Z/86FY4yWezTQtxZXl4t20p5uRWmF5Pq4arVEMy1PJAqlJ+Rhdt+9tHJGQ7b 1q25GqTiQZ25BEXTR+YJqAjYz1gbhxfRxT6Ej/pZ1S8jP0KxQvIlnhJv5hvvnghAZN22 AtyzsVATyKWMXDEZ6YfebX/bfIr34DjjsFL6qLBldwg+tZGjBhtum80ES0fyXBb1GJxW 2UVjHU9pLsx0ikAZRQUsyeoVRHIOwYGM6AIHOS96ZRQf0u+0vfMUVSSHT3X6wg4B3yoY yxZHt6guo1eQuF4seZ005gW8tuRBKxbY8QXGVu4Ieqa1BJatYT4QolVR3PVEgIFY0lDx FHvg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w22si8290477pgi.362.2021.04.18.11.38.45; Sun, 18 Apr 2021 11:38:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232291AbhDRSho (ORCPT + 99 others); Sun, 18 Apr 2021 14:37:44 -0400 Received: from wtarreau.pck.nerim.net ([62.212.114.60]:51860 "EHLO 1wt.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229783AbhDRSho (ORCPT ); Sun, 18 Apr 2021 14:37:44 -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 Cc: Greg KH , Arnd Bergmann , kernelnewbies , Linux Kernel Mailing List 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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