[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Cross Compilation with CMake and mk-sbuild



Hi,

Quoting Gustaf Waldemarson (2023-02-01 10:17:07)
> Apologies in advance if this is the wrong place to ask this, but anyway:

if your question is about how to do cross compilation on a Debian system then
you came to the right place!

> Recently, I tried to use some Debian tools (mk-sbuild) to set up a sysroot
> for cross-compiling some CMake projects. The details of this as well as a
> test project is available:
> 
> 
> https://stackoverflow.com/questions/75247387/modern-cmake-cross-compiling-to-aarch64-with-sysroots/75277478
> 
> Long story short though: Since the libraries in the sysroot use symlinks to
> absolute paths (relative to the root of the sysroot), they are broken during
> compilation, but are still picked up by CMake.
> 
> So, I guess my question boils down to mk-sbuild itself: Is this tool really
> intended for cross-compilation, or is there a more appropriate one available?

I happen to be the maintainer of sbuild in Debian and I never heard of the
mk-sbuild tool. Where do you have this from and what does it do?

> Alternatively, is there some way of re-configuring the sysroot to use
> relative symlinks for all libraries to avoid these kinds of issues?

Why do you want to use a sysroot? Just use multi-arch and install the foreign
architecture packages directly on your system without a foreign architecture
chroot somewhere.

I'm also curious where you found the information to use a sysroot for cross
compilation. This is outdated for several years now and I do not know anybody
who does this these days. Is there any reason you need to use a sysroot over
just using multiarch?

Thanks!

cheers, josch

Attachment: signature.asc
Description: signature


Reply to: