public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Dingjun Chen <Dingjun.Chen@geotechairborne.com>
To: Xi Ruoyao <xry111@xry111.site>, Jonathan Wakely <jwakely.gcc@gmail.com>
Cc: gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: What caused my executable file not to run on a Linux of old version 2.4.36.1
Date: Tue, 10 Oct 2023 17:13:58 +0000	[thread overview]
Message-ID: <YT2P288MB00739A5C2DF9401721FD348C97CDA@YT2P288MB0073.CANP288.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <d05d9f9aa9c3e5f24a3596f9db24d6cafbffd233.camel@xry111.site>

[-- Attachment #1: Type: text/plain, Size: 3192 bytes --]

Hi, Ruoyao,

Could you please tell me how to build cross compiler for Linux of different versions?

I followed the following method, but I failed. I look forward to your help!

Thanks again and regards,

Dingjun


How to Build a GCC Cross-Compiler (preshing.com)<https://preshing.com/20141119/how-to-build-a-gcc-cross-compiler/>
How to Build a GCC Cross-Compiler<https://preshing.com/20141119/how-to-build-a-gcc-cross-compiler/>
GCC is not just a compiler. It&rsquo;s an open source project that lets you build all kinds of compilers. Some compilers support multithreading; some support shared libraries; &hellip;
preshing.com







> 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.

________________________________
From: Xi Ruoyao <xry111@xry111.site>
Sent: Saturday, October 7, 2023 2:18 AM
To: Jonathan Wakely <jwakely.gcc@gmail.com>; Dingjun Chen <Dingjun.Chen@geotechairborne.com>
Cc: gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: What caused my executable file not to run on a Linux of old version 2.4.36.1

External Email Warning: Do not click any links or open any attachments unless you trust the sender and know the content is safe. From Geotech IT.



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 executable
> > file: vtem_xyz. I am wondering what's wrong with it.
> >
>
>
> 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
>= 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.

--
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

  parent reply	other threads:[~2023-10-10 17:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-06 14:43 Dingjun Chen
2023-10-06 15:33 ` Fw: " Dingjun Chen
2023-10-06 17:07 ` Jonathan Wakely
2023-10-07  6:18   ` Xi Ruoyao
2023-10-07 11:19     ` Kai Ruottu
2023-10-10 10:28       ` Dingjun Chen
2023-10-10 12:36         ` Xi Ruoyao
2023-10-10 12:30     ` Dingjun Chen
2023-10-10 17:13     ` Dingjun Chen [this message]
2023-10-10 17:41       ` Kai Ruottu

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=YT2P288MB00739A5C2DF9401721FD348C97CDA@YT2P288MB0073.CANP288.PROD.OUTLOOK.COM \
    --to=dingjun.chen@geotechairborne.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=jwakely.gcc@gmail.com \
    --cc=xry111@xry111.site \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).