Can't cross compile #23319
-
Hi, I'm trying to cross-compile vector to ARM64
I tried it on two different machines - the error is the same. Is my setup maybe wrong? I would really appreciate any hints 🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Hi @europaul, this is likely due to using If you hit any issues running the make command, |
Beta Was this translation helpful? Give feedback.
-
Hi @thomasqueirozb, thank you for the answer! The make target you mentioned indeed works outside of the environment container. I found out by following the steps from the I also found out what was causing the issue mentioned above: cross is relying on docker to fetch the cross compilation container, so the first thing it does is trying to find out if it's being run inside a container by looking at #!/usr/bin/env bash
# set HOSTNAME to container id for `cross`
HOSTNAME="$(head -1 /proc/self/cgroup|cut -d/ -f3)"
export HOSTNAME
exec "$@" doesn't work and sets HOSTNAME to an empty string. And of course As far as I understood the environment container was also not build to support cross compiling vector. Or was it? In that case I think I can fix |
Beta Was this translation helpful? Give feedback.
-
Created #23479 |
Beta Was this translation helpful? Give feedback.
Nope, cross compiling from inside the container is still broken as I mentioned in my previous comment. I keep getting an
wrap-rustc
unused error. This is probably some weirdcross
behavior which is likely resolved by using an argument. Tracking this down is a bit of a nightmare and git bisecting would require cherry picking my partial fix commit and then trying to runmake environment
and thenmake build-aarch64-unknown-linux-musl
from inside the container. And even when you find the offending commit (which may not exist due to different docker versions) the issue might live inside ofcross
source code. It's a rabbit hole.I'd be happy to accept any contributions that fix this issue thoug…