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) How to Build a GCC Cross-Compiler GCC is not just a compiler. It’s an open source project that lets you build all kinds of compilers. Some compilers support multithreading; some support shared libraries; … 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 Sent: Saturday, October 7, 2023 2:18 AM To: Jonathan Wakely ; Dingjun Chen Cc: gcc-help 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 School of Aerospace Science and Technology, Xidian University