User Tools

Site Tools


raspberry:cross-platform-compile:cross-compile-overview

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
raspberry:cross-platform-compile:cross-compile-overview [2026/09/02 20:40] – [Raspberry Pi OS vs Debian armhf] oscarraspberry:cross-platform-compile:cross-compile-overview [2026/09/04 12:41] (current) – [Cross Platform Development for Raspberry] oscar
Line 8: Line 8:
   - **Different Linux/Debian versions** on X86 build host and Raspberry runtime target   - **Different Linux/Debian versions** on X86 build host and Raspberry runtime target
  
-  - [[raspberry:cross-platform-compile:setup-for-identical-Debian-versions|Setup for Identical Debian versions]] +  - [[raspberry:cross-platform-compile:check-architecture|Check the architecture of Host and Target]]
-  - [[raspberry:cross-platform-compile:setup-for-different-Debian-versions|Setup for Different Debian versions]]+
  
-[[raspberry:cross-platform-compile:crossbuild-essential-armhf|crossbuild-essential-armhf]]+  - [[raspberry:cross-platform-compile:setup-for-identical-Debian-versions|For identical Debian distro/version]]
  
-===== Compatibility rule ===== +  - [[raspberry:cross-platform-compile:setup-for-different-Debian-versions|For different Debian distro/version]]
-Build against the oldest operating-system release and CPU that the resulting +
-binary must support.+
  
-Do not link a Bookworm target against Trixie ARM libraries. Doing so can create +  - [[raspberry:cross-platform-compile:cross-platform-debugging|Cross Platform Debugging]]
-dependencies on newer glibc or library symbols that are unavailable on the +
-Bookworm target.+
  
-For example: 
  
 +===== Compatibility rule =====
 +Build against the oldest operating-system release and CPU that the resulting
 +binary must support. Do not link a Bookworm target against Trixie ARM libraries. Doing so can create
 +dependencies on newer glibc or library symbols that are unavailable on the
 +Bookworm target. For example:
 <code> <code>
 Incorrect: Incorrect:
Line 68: Line 67:
        ".../lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.41' not found..."        ".../lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.41' not found..."
 </code> </code>
-This is one of the most common reasons why **building on a newer distribution for an older target** causes trouble.  +This is one of the most common reasons why **building on a newer distribution for an older target** causes trouble. It isn't only the **libraries** that matter. The headers matter too. Suppose you compile against Trixie's headers (///usr/include//), but run on Bookworm. You can potentially get differences in:
-It isn't only the **libraries** that matter. The headers matter too. Suppose you compile against Trixie's headers (///usr/include//), but run on Bookworm. You can potentially get differences in:+
   * API definitions   * API definitions
   * feature macros   * feature macros
Line 78: Line 76:
   * library-specific APIs   * library-specific APIs
 So the ideal relationship is: So the ideal relationship is:
-<code> 
-                   Raspbian Bookworm 
-                  ┌─────────────────┐ 
-                  │ headers         │ 
-                  │ libraries       │ 
-                  │ linker files    │ 
-                  │ ABI             │ 
-                  └────────┬────────┘ 
-                           │ 
-                           ▼ 
-                     cross compiler 
-                           │ 
-                           ▼ 
-                    your executable 
-</code> 
  
 That's why a **target-specific sysroot** is the clean solution. That's why a **target-specific sysroot** is the clean solution.
raspberry/cross-platform-compile/cross-compile-overview.1788381608.txt.gz · Last modified: by oscar