raspberry:cross-platform-compile:setup-for-identical-debian-versions
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| raspberry:cross-platform-compile:setup-for-identical-debian-versions [2026/09/04 07:36] – [Method 1: Debian Crossbuild packages] oscar | raspberry:cross-platform-compile:setup-for-identical-debian-versions [2026/09/04 12:39] (current) – oscar | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Cross Platform Development for Raspberry | + | ====== Cross Platform Development for identical distributions |
| --- | --- | ||
| This page describes how to setup a cross platform build environment where the Debian distribution and version on build host and run-time Raspberry are identical. It will install and use the same ARM libraries (libc) and header version for building the armhf binary. | This page describes how to setup a cross platform build environment where the Debian distribution and version on build host and run-time Raspberry are identical. It will install and use the same ARM libraries (libc) and header version for building the armhf binary. | ||
| Line 6: | Line 6: | ||
| - Manual setup | - Manual setup | ||
| Debian' | Debian' | ||
| - | ===== GCC and Linux Architectures ===== | + | |
| + | ==== Architecture | ||
| GCC is also used to cross compile Linux applications. Applications can be compiled for 32-bit or 64-bit Linux systems. | GCC is also used to cross compile Linux applications. Applications can be compiled for 32-bit or 64-bit Linux systems. | ||
| ^Architecture^Compilers^ | ^Architecture^Compilers^ | ||
| |32-bit|arm-linux-gnueabihf-gcc \\ arm-linux-gnueabihf-g++| | |32-bit|arm-linux-gnueabihf-gcc \\ arm-linux-gnueabihf-g++| | ||
| |64-bit|aarch64-linux-gnu-gcc \\ aarch64-linux-gnu-g++| | |64-bit|aarch64-linux-gnu-gcc \\ aarch64-linux-gnu-g++| | ||
| - | Check the current target architecture by logging into the Pi: | ||
| - | To check if system is running a 32 (Raspberry) or 64 (X86) architecture, | ||
| - | < | ||
| - | # getconf LONG_BIT | ||
| - | ------------------ | ||
| - | 32 | ||
| - | |||
| - | file / | ||
| - | ------------------------- | ||
| - | / | ||
| - | </ | ||
| ===== Method 1: Debian Crossbuild packages ===== | ===== Method 1: Debian Crossbuild packages ===== | ||
| === Build tools === | === Build tools === | ||
| Line 31: | Line 21: | ||
| # apt-get install crossbuild-essential-armhf | # apt-get install crossbuild-essential-armhf | ||
| </ | </ | ||
| - | `crossbuild-essential-armhf` installs the ARM cross C/C++ compiler and its | + | `build-essential` is for building **native x86-64 programs**.`crossbuild-essential-armhf` installs the ARM cross C/C++ compiler and its basic runtime support. It does not install arbitrary target libraries such as |
| - | basic runtime support. It does not install arbitrary target libraries such as | + | |
| OpenSSL, curl or ALSA development files. | OpenSSL, curl or ALSA development files. | ||
raspberry/cross-platform-compile/setup-for-identical-debian-versions.1788507397.txt.gz · Last modified: by oscar
