Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rweickelt opened this issue Mar 19, 2024 · 1 comment

Comments

@rweickelt
Copy link

rweickelt commented Mar 19, 2024

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:

  • Raspbian images follow the multi-arch layout where includes are found under /usr/include/arm-linux-gnueabihf and libs under /usr/lib/arm-linux-gnueabihf
  • The sysroot delivered with these toolchains here does not have such an architecture subfolder, but puts everything directly under /usr/include or /usr/lib respectively.

Example:

  • Raspbian image: /usr/include/arm-linux-gnueabihf/sys/cdefs.h
  • This toolchain: /usr/include/sys/cfefs.h

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant