-
Notifications
You must be signed in to change notification settings - Fork 455
-
I'm attempting to cross build a binary that uses slint kms backend https://releases.slint.dev/1.4.0/docs/slint/src/advanced/backend_linuxkms
It is possible to use a "noseat" version but i was experimenting with adding libseat. Unfortunately it refuses to build using cross with an unclear error:
❯ just build
cross build --target=aarch64-unknown-linux-gnu --package app --release
Dockerfile.aarch64-unknown-linux-gnu-custom:5
--------------------
3 | ARG CROSS_DEB_ARCH=
4 | ARG CROSS_CMD
5 | >>> RUN eval "${CROSS_CMD}"
--------------------
ERROR: failed to solve: process "/bin/sh -c eval \"${CROSS_CMD}\"" did not complete successfully: exit code: 100
Error:
0: could not run container
1: when building custom image
2: when pre-building
3: `"C:\Program Files\Docker\Docker\resources\bin\docker.exe" buildx build --progress auto --label 'org.cross-rs.for-cross-target=aarch64-unknown-linux-gnu' --label 'org.cross-rs.runs-with=x86_64-unknown-linux-gnu' --label 'org.cross-rs.workspace_root=C:\Users\ttolle\Dev\app' --tag localhost/cross-rs/cross-custom-app:aarch64-unknown-linux-gnu-b759e-pre-build --build-arg 'CROSS_CMD=dpkg --add-architecture $CROSS_DEB_ARCH
apt-get update
apt-get --assume-yes install libgbm-dev:$CROSS_DEB_ARCH libxkbcommon-dev:$CROSS_DEB_ARCH libinput-dev:$CROSS_DEB_ARCH libudev-dev:$CROSS_DEB_ARCH libseat-dev:$CROSS_DEB_ARCH' --build-arg 'CROSS_DEB_ARCH=arm64' --file 'C:\Users\ttolle\Dev\app\target\aarch64-unknown-linux-gnu\Dockerfile.aarch64-unknown-linux-gnu-custom' --output 'type=docker' 'C:\Users\ttolle\Dev\app'` failed with exit code: 1
Location:
/rustc/90c541806f23a127002de5b4038be731ba1458ca\library\core\src\convert\mod.rs:727
Warning: call to docker.exe failed
Suggestion: is `buildx` available for the container engine?
Note: disable the `buildkit` dependency optionally with `CROSS_CONTAINER_ENGINE_NO_BUILDKIT=1`
Note: CROSS_CMD=dpkg --add-architecture $CROSS_DEB_ARCH
apt-get update
apt-get --assume-yes install libgbm-dev:$CROSS_DEB_ARCH libxkbcommon-dev:$CROSS_DEB_ARCH libinput-dev:$CROSS_DEB_ARCH libudev-dev:$CROSS_DEB_ARCH libseat-dev:$CROSS_DEB_ARCH
Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
error: Recipe `build` failed on line 5 with exit code 1
information
Cross.toml
[build] pre-build = [ "dpkg --add-architecture $CROSS_DEB_ARCH", "apt-get update", "apt-get --assume-yes install libgbm-dev:$CROSS_DEB_ARCH libxkbcommon-dev:$CROSS_DEB_ARCH libinput-dev:$CROSS_DEB_ARCH libudev-dev:$CROSS_DEB_ARCH libseat-dev:$CROSS_DEB_ARCH", ]
Cargo.toml
[package] name = "app" version = "0.1.0" [dependencies] slint = { version = "1.6", default-features = false, features = [ "std", "compat-1-2", "renderer-femtovg", "backend-linuxkms", ] }
main.rs
slint::slint!{ export component HelloWorld { Text { text: "hello world"; color: green; } } } fn main() { HelloWorld::new().unwrap().run().unwrap(); }
Build command
cross build --target=aarch64-unknown-linux-gnu --release
Can anyone help me figure out why this fails?
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 2 replies
-
If you change the prebuild to exit 0, does it work? I suspect you dont have buildkit/buildx installed.
Try also running the cross command with -v to get output
Beta Was this translation helpful? Give feedback.
All reactions
-
I can build just fine when the pre-build doesn't include libseat
[build] pre-build = [ "dpkg --add-architecture $CROSS_DEB_ARCH", "apt-get update && apt-get --assume-yes install libgbm-dev:$CROSS_DEB_ARCH libxkbcommon-dev:$CROSS_DEB_ARCH libinput-dev:$CROSS_DEB_ARCH libudev-dev:$CROSS_DEB_ARCH", ]
But when I add it the build errors.
When I add -v i see the following error
8.189 Reading package lists...
10.35 Reading package lists...
12.02 Building dependency tree...
12.35 Reading state information...
12.44 E: Unable to locate package libseat-dev:arm64
While I do believe there are libseat-dev versions for arm64 so I'm not sure why it is unable to locate the package.
Beta Was this translation helpful? Give feedback.
All reactions
-
Ah this appears to be caused by libseat-dev just not being available for Ubuntu 20.
I see #973 and your response that this will be included in the next release, I appreciate your work and look forward to the next release!
Beta Was this translation helpful? Give feedback.