-
Notifications
You must be signed in to change notification settings - Fork 209
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
Build fails on aarch64 hosts #747
Comments
Update: I tried the build with Ubuntu 22.04.4 LTS (Jammy Jellyfish) and am getting the same error. (I changed the title of the issue to reflect this.) |
Hi @msgilligan, The build works for me with Ubuntu 22.04 (22.04.4 LTS) using the Dockerfile at https://optee.readthedocs.io/en/latest/building/prerequisites.html. It looks like for some reason you build is not picking up the proper cross-compiler. Could you try building with |
Yes, when I run the same I will try your suggestion and report back. |
Here is the result:
|
I was able to successfully build the project in another Debian 12 environment and I compared the Of course, the code in |
@jforissier My goal is to be able to develop for OP-TEE on my M1 MacBook Pro. I have Docker installed and use Lima for long-lived development VMs. I prefer to use Debian (Bookworm) over Ubuntu, but am willing to use Ubuntu if necessary. But I do not want to use amd64/x86_64 emulation (builds take many hours), I want to run native arm64 VMs. I am willing to troubleshoot, document, and submit PRs to help make this happen. I can also move this to the mailing list, if that is a better venue. I have verified that the reference
Although this is different from the symptom I initially reported, it seems like the first place to start, because in the case of a Docker build the environment is more carefully controlled and I'm seeing a difference in behavior based (apparently) solely on the CPU architecture. I've also seen this problem (or similar) in builds inside VMs and on my Intel box. Under Docker the build seems to occur in the root directory, so From my perspective, It seems like there are at least two issues/todos to work on:
On a separate (and positive!) note, when I do run the Docker build using amd64 and use Docker to copy I should also mention that when I did preliminary investigations in October 2023, I was able to do the full build in an arm64 VM on macOS and run |
p.s. Using |
Hi @msgilligan, Being able to build natively on arm64 is a good thing obviously, and as you said it used to work. It should not be that hard to fix the issues and I appreciate your willingness to help in that regard.
That should be
Yes, it was introduced by f0a2eef. Basically it takes its value from
Does |
This documentation page shows
Yes. If I set
|
Ah, yes. The doc needs updating.
C++ support in TAs does not work with GCC 12.3. "make toolchains" is supposed to install 11.3, how does your setup end up pulling something from host-gcc-final-12.3.0?
|
|
I'm not sure. The only difference in my setup (I'm running a slightly modified version of the example
Will do. By the way, with the following make line the build completes successfully:
(So disabling Rust and removing the |
This works as well:
and so does:
|
I opened Issue #749 for the specific problem of the Rust toolchain not being downloaded on aarch64 hosts and I've submitted a "draft" patch that I believe addresses the issue. And PR #748 seems to solve the download part of the issue, but there is still a separate problem with actually building the Rust examples. I'll leave this issue open because I think we should probably also make an issue for the C++ tests not working on aarch64 hosts. |
@jforissier asks:
Looking at
So that seems to answer the question. So maybe we need to adjust the build root configuration to pull/build the compatible version? Update: I created Issue #751 for this specific problem as there are at least three sub-issues we've found on this issue. |
I have been unable to reproduce the original error (which I saw on x86_64) reported in this issue, but there are three aarch64 sub-issues now:
I also opened apache/incubator-teaclave-trustzone-sdk#135 in the Teaclave Rust repository that references these issues, so the Rust developers are made aware -- maybe they have some ideas. We should probably do one or more of the following:
@jforissier What do you suggest? |
Done. |
Update: The x86_64 build issue turned out to be non-reproducible, so this issue has been renamed. The actual problem I have been troubleshooting is building on aarch64 hosts and there are at least 3 sub-issues that have been discovered. This issue now serves as a parent issue for aarch64 host build issues.
On Debian 12 (x86_64), I'm following the standard build instructions for QEMU v8, e.g.
The error I'm getting is:
The text was updated successfully, but these errors were encountered: