Porting Software from x86 to Kunpeng Linux: Compiled vs Interpreted Languages
This article introduces the process of migrating software from x86 Linux to the Kunpeng Linux platform, explaining the differences between compiled and interpreted languages, the implications for C/C++ and Java/Python applications, and outlines the steps and tools needed for successful porting.
From today we will provide a series of articles on porting software from x86 Linux to Kunpeng Linux, covering preparation of the compilation environment, scripts, source code modifications, and handling issues encountered during the migration.
Programming languages can be divided into two categories based on translation method: compiled languages and interpreted languages.
1. Compiled languages
Typical examples are C and C++. The compilation process produces machine instructions that the operating system loads into memory and the CPU executes directly.
2. Interpreted languages
Typical examples are Java and Python. Their source code is compiled into platform‑independent bytecode, which is then executed by a virtual machine that abstracts away platform differences.
3. Applications built with compiled languages
Applications written in C/C++ produce executables that depend on CPU architecture. Therefore, binaries compiled for x86 cannot run directly on Kunpeng servers and must be re‑compiled for the target architecture. Detailed solutions to common porting problems will be provided in subsequent articles.
4. Applications built with interpreted languages
Programs written in Java or Python are architecture‑independent; they can be deployed on Kunpeng servers without modification or recompilation. However, if a Java JAR contains native C/C++ libraries (SO files), those libraries must be re‑compiled for Kunpeng, and the JAR repackaged with the new libraries.
Further reading
Porting C/C++ programs requires a suitable compiler; GCC 7.3 or newer (minimum 4.8.5) is recommended.
GCC 7.3 download: http://ftp.gnu.org/gnu/gcc/gcc-7.3.0/
Installation guide: https://gcc.gnu.org/install/
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Huawei Cloud Developer Alliance
The Huawei Cloud Developer Alliance creates a tech sharing platform for developers and partners, gathering Huawei Cloud product knowledge, event updates, expert talks, and more. Together we continuously innovate to build the cloud foundation of an intelligent world.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
