-
Notifications
You must be signed in to change notification settings - Fork 5
Fix the build error with "with-serde" feature in CH branch (on AArch64) #1
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
Conversation
Hi, @rbradford, @sboeuf PTAL. |
@andreeaflorescu @aghecenco would you mind having a quick look? Did you run into the same issues since I think you maintain aarch64 support on your side too. |
I don't think we're using serde with arm just yet. Can you let us know what errors you've encounter? |
Hi @andreeaflorescu, some errors appeared when building with "--features with-serde":
The |
@michael2012z Can we add this as an issue in kvm-bindings? What rust version are you using? Shouldn't we have a test for this in kvm-bindings? |
Here comes more clarification about this PR. What's the problem? Now Cloud-hypervisor is using But the code is not ready for AArch64. It doesn't build with "with-serde" feature on AArch64. This PR is going to fix the build error. In fact, instead of fixing anything, I just removed all ARM code added in the on-review PR just mentioned. As the code in problem is not in rust-vmm master, but in a PR in-progress. So I can't create a issue to track it. Why we need to fix it? Because we are trying to enable Cloud-hypervisor on AArch64. In current stage, we need this branch to build with feature "with-serde" on ARM, after all X86 and AArch64 shares the same Cargo dependency: https://github.com/cloud-hypervisor/cloud-hypervisor/blob/d760010c9e22b60a09beb009ee4ebfb63334ccc7/vmm/Cargo.toml#L23 |
Hi, @aghecenco , could you help give some comments on this fix? |
@sboeuf , @rbradford , another PR cloud-hypervisor/cloud-hypervisor#1225 encountered the same build error on AArch64. Taking this PR may make things easier. And we can add some workflows to build on X86 and Arm64 with various feature selections (like those in CI), to verify the upcoming PR's (although there isn't many) against this repo. What do you think? |
I have the same error when In order to pass the compiling, I have to add Maybe it's not a good solution, but it dose work now. |
Signed-off-by: Michael Zhao <[email protected]>
I simplified the fix of the build error, it looks more straight-forward. Now we have to workaround the error in several places:
Fixing the error may make things easier. |
@michael2012z do you mean with this patch we won't need to do |
/cc @rbradford |
@sboeuf Yes, that's right. Please merge this. |
Thank you, @sboeuf , @Apokleos . I created PR cloud-hypervisor/cloud-hypervisor#1524 to follow up this fix. |
This PR is the dependency of cloud-hypervisor/cloud-hypervisor#1168.
Some code for supporting Serde was introduced on AArch64. But the
support was incomplete, some errors are seen while building on ARM.
This commit reverts all Serde support for AArch64. So nothing is
different even if "with-serde" feature is enabled on ARM.
This is a workaround for build before Serde is ready on ARM.
The change was verified on X86 and ARM with a testing PR
michael2012z/cloud-hypervisor#22.