abhiTronix / raspberry-pi-cross-compilers

Latest GCC Cross Compiler & Native (ARM & ARM64) CI generated precompiled standalone toolchains for all Raspberry Pis. 🍇
https://sourceforge.net/projects/raspberry-pi-cross-compilers
GNU General Public License v3.0
583 stars 102 forks source link

Sysroot of this toolchain is incompatible to sysroot in official Raspbian images #118

Closed rweickelt closed 1 week ago

rweickelt commented 6 months ago

I am trying to cross-build a complex project with CMake and VCPKG and a sysroot configuration. My sysroot content is extracted from the official Raspbian RFS image.

Neither compilation nor linking works properly which is caused by a file layout deviation:

Example:

I cannot work around by simply passing additional include paths and rpaths to the compiler/linker driver. That is because VCPKG swallows additional include paths outside of the vcpkg build tree but passes CMAKE_SYSROOT.

I would expect the sysroot of this toolchain to match Rapsbians RFS 100%, except that it contains less. The cross toolchain for Windows actually does that.

rweickelt commented 6 months ago

Actually, I think the problem is a missing --enable-multiarch in this toolchain's configuration.

abhiTronix commented 1 week ago

@rweickelt No need to do anything, since you could easily make symlinks in Linux envs. Follow this step: https://github.com/abhiTronix/raspberry-pi-cross-compilers/wiki/Cross-Compiler-CMake-Usage-Guide-with-rsynced-Raspberry-Pi-32-bit-OS#8-setup-important-symlinks-as-follows-important