-
Notifications
You must be signed in to change notification settings - Fork 42
Conversation
Until now, aarch64 gcc was trying to use the x86 assembler, generating a build error. This commit adds the missing `aarch64-linux-gnu` directory to the kraft container, solving this issue.
`kraft run` is always trying to enable hardware acceleration, even when the host has an achitecture different from the emulated one. This commit solves the problem, taking into account the host architecture when generating the qemu command.
Hey @razvanvirtan! Thanks for taking the time to look into this, really appreciated! Looks like the dockerfile can't be built on the gcc image:
|
I think I know where the issue comes from, will come with a third commit after testing it. |
Before this commit, the gcc container image couldn't be built on arm or x86_64, generating a `file not found error`. Replace `aarch64-linux-gnu` in Dockerfile.gcc with the GCC_PREFIX that is architecture specific. This way, the problematic folder will always be found. This should also allow `kraft build` to cross-compile images on any architecture.
@nderjung The gcc images can be built now. However, we still have problems with the kraft one. Without seeing the check output, my guess is that the system tries to build the kraft image using gcc images from dockerhub: Since those images have been built using the initial |
Hey, apologies for not being able to see the CI output yet, we're still migrating services... Here's the relevant log:
|
Thanks!
|
This PR comes to solve issue #57. There are two problems with kraft on ARM64, solved by two different commits:
kraft build
usesaarch64-linux-gnu-gcc
, which in turn calls the x86_64 assembler, resulting in a build error. At first, I was thinking about replacing the current arm64 toolchain with the linaro one (as mentioned in a previous comment). Finally, I managed to solve this by adding a missing directory (aarch64-linux-gnu
) to the final kraft container. This way, we don't need to add linaro anymore.In order for this to work fine, I think we should also update the
unikraft/gcc:9.2.0-arm64-staging
image from docker hub[1].kraft run
is always trying to enable hardware acceleration, even if the host architecture is different from the emulated one. This generates errors when trying to emulate ARM64 images on x86 hosts. The problem can be easily solved by checking the architecture inkvm.py
and generating the right qemu command.[1]https://hub.docker.com/layers/unikraft/gcc/9.2.0-arm64/images/sha256-3fd1ce6b6f7acb9e259212bf922b8b2090f10cf0e93621f94f04c51a92a5835e?context=explore
Signed-off-by: Răzvan Vîrtan [email protected]