From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id 675463858426 for ; Sat, 7 Oct 2023 06:18:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 675463858426 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xry111.site DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1696659510; bh=YDhRL1Eng2E6dswgLbOkQ4HmxmjeoPvgD9DwN2L0MRs=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=nKG1JevZ2aeit3H3sd91Rj1WpM/3kPSHeLNk5+7hW3tRFeP6v52HYjA/cvLzKIDAq o6bTCZ8SiPHl8pWNR4gmpb0u2alhwLzPAVc5nDEAwj37sfpagEWY+dO6Yx5bsxqL9J IktlwKMUQz3elg/AL+sJlzAErzxhnv/dxoOn6CF0= Received: from [127.0.0.1] (unknown [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 4324D66C8C; Sat, 7 Oct 2023 02:18:30 -0400 (EDT) Message-ID: Subject: Re: What caused my executable file not to run on a Linux of old version 2.4.36.1 From: Xi Ruoyao To: Jonathan Wakely , Dingjun Chen Cc: gcc-help Date: Sat, 07 Oct 2023 14:18:28 +0800 In-Reply-To: References: Autocrypt: addr=xry111@xry111.site; prefer-encrypt=mutual; keydata=mDMEYnkdPhYJKwYBBAHaRw8BAQdAsY+HvJs3EVKpwIu2gN89cQT/pnrbQtlvd6Yfq7egugi0HlhpIFJ1b3lhbyA8eHJ5MTExQHhyeTExMS5zaXRlPoiTBBMWCgA7FiEEkdD1djAfkk197dzorKrSDhnnEOMFAmJ5HT4CGwMFCwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQrKrSDhnnEOPHFgD8D9vUToTd1MF5bng9uPJq5y3DfpcxDp+LD3joA3U2TmwA/jZtN9xLH7CGDHeClKZK/ZYELotWfJsqRcthOIGjsdAPuDgEYnkdPhIKKwYBBAGXVQEFAQEHQG+HnNiPZseiBkzYBHwq/nN638o0NPwgYwH70wlKMZhRAwEIB4h4BBgWCgAgFiEEkdD1djAfkk197dzorKrSDhnnEOMFAmJ5HT4CGwwACgkQrKrSDhnnEOPjXgD/euD64cxwqDIqckUaisT3VCst11RcnO5iRHm6meNIwj0BALLmWplyi7beKrOlqKfuZtCLbiAPywGfCNg8LOTt4iMD Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.0 MIME-Version: 1.0 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_NUMSUBJECT,LIKELY_SPAM_FROM,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Fri, 2023-10-06 at 18:07 +0100, Jonathan Wakely via Gcc-help wrote: > > However, the executable file: vtem_xyz cannot run on RTD single board > > computer with Linux 2.4.36.1 2009, i686. > > All shared .so libraries are under the same directory with the executab= le > > file: vtem_xyz. I am wondering what's wrong with it. > >=20 >=20 >=20 > You haven't told us what happens, so we can't help you. What does "cannot > run" mean? What happens when you try to run it? Linux 2.4.36.1? Really? The recent Glibc releases needs Linux kernel >=3D 3.2. So if you copy the Glibc from the host system (or statically link it into the executable) it won't work because the kernel version is too low. If you just link the executable dynamically with host Glibc but attempt to run it with the Glibc on your target board it won't work too because the executable may use symbols which don't exist in the old Glibc. Running Linux 2.4.36.1 is just wrong in 2023 (it was already wrong even in 2013). > Do you have any suggestions when building an executable file running > under a Linux of old version? Build a cross compiler and use the root FS of the target board as the sysroot. But again it's just wrong to run Linux 2.4 today, so you'll likely encounter problems here or there. And it's very difficult to find any support because nobody wants to install something based on Linux 2.4 and reproduce the problem for you, in 2023. Try upgrade the software stack for the target board. --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University