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

Yocto cross-compilation broken with Rust & CMake #7463

Open
tronical opened this issue Jan 26, 2025 · 4 comments
Open

Yocto cross-compilation broken with Rust & CMake #7463

tronical opened this issue Jan 26, 2025 · 4 comments
Labels
a:ci Automation for CI (Continous integration system) and tests (mT,bO)
Milestone

Comments

@tronical
Copy link
Member

tronical commented Jan 26, 2025

After commit 1830042 , slint-compiler invokes a configure script for jemalloc which seems to use autoconf to cross-compile.

When building within a Yocto environment, CC, etc. are set to the target compiler, and during the Slint-cpp crate build we have some build scripts that use cc.rs to build for the host. Therefore we set CC_${host} and cc.rs uses that instead.

As per 3c37c51 the same trick would work for jemalloc's configure to get past checking whether the C compiler works... no, but then we hit this:

  checking how to run the C preprocessor... aarch64-poky-linux-gcc -E  -mcpu=cortex-a57 -march=armv8-a+crc -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/runner/work/slint/yocto-sdk/sysroots/cortexa57-poky-linux

and that can't work.

@tronical tronical added the a:ci Automation for CI (Continous integration system) and tests (mT,bO) label Jan 26, 2025
@tronical tronical added this to the 1.10 milestone Jan 26, 2025
@tronical
Copy link
Member Author

I tried setting HOST_CPP in bbc25d4 but that didn't help:

https://github.com/slint-ui/slint/actions/runs/12973562980/job/36182368807

same error.

@tronical
Copy link
Member Author

Same problem with CPP_$target:

b1e5761

@ogoffart
Copy link
Member

Maybe we need to make a change in corrosion?
We can also make the jemalloc a feature in slint-compiler and not enable it when cross compiling.
Or we just don't use jemalloc in the slint-compiler at all, that is not performance critical.

@tronical
Copy link
Member Author

I think upstream needs to be fixed (maybe just the crate).

I think a feature makes sense, and we opt in for the binaries that we build in the CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:ci Automation for CI (Continous integration system) and tests (mT,bO)
Projects
None yet
Development

No branches or pull requests

2 participants