Skip to content
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

Latest image will not build on ARM architechture #1751

Open
solarisfire opened this issue Oct 8, 2024 · 5 comments
Open

Latest image will not build on ARM architechture #1751

solarisfire opened this issue Oct 8, 2024 · 5 comments
Labels
arm64 Arm64 support

Comments

@solarisfire
Copy link

Describe the bug
If I check-out the code in the release/v2.7.0 branch, the code compiles correctly on an ARM based system.

If I check-out the develop or staging branches, the code will not compile on an ARM based system with the following errors:

build_log.txt

Develop branch will build successfully on an amd64 based system.

To Reproduce
Grab an ARM computer (Raspberry Pi 5, Ampere Altra, etc).
Check out the develop branch.
Run "./scripts/release.sh --skip-publish"

Expected behavior
Image builds successfully.

Screenshots
If applicable, add screenshots to help explain your problem.

** OS info (please complete the following information):**

  • Distro: Ubuntu 24.04 & Ubuntu 22.04
  • Kernel version 6.8.0-45-generic & 6.6.31+rpt-rpi-2712
@maxwnewcomer
Copy link
Contributor

Was able to reproduce this. Wonder if upgrading to the latest libspdk-dev-24.09 would help? No idea, but I'll try to check out soon.

@maxwnewcomer
Copy link
Contributor

maxwnewcomer commented Dec 14, 2024

Just coming back to note that upgrading to 24.09 (and to the 25 rc) does not alleviate this issue.

Also I tried installing on t4g + c7g instances (gravitron 2 + 3) to confirm reproduction. I initially thought it was a cpu feature issue (specifically SVE), but since c7g supports SVE and still doesn't compile I'm once again out of ideas.

@maxwnewcomer
Copy link
Contributor

maxwnewcomer commented Dec 14, 2024

Just built spdk from source on the gravitron 3 arm chip and it works great + passes unit tests (rev. e01cb43). Seems like an issue in the build pipeline. Don't know nix that well, but I'll start digging into that I guess!

@tiagolobocastro
Copy link
Contributor

Could be something to do with our build flags.
You could try custom spdk-rs build: https://github.com/openebs/spdk-rs/blob/93d0d206e48961f02b54bf32d87b13726027974c/README.md#custom-spdk

@maxwnewcomer
Copy link
Contributor

Could be something to do with our build flags. You could try custom spdk-rs build: https://github.com/openebs/spdk-rs/blob/93d0d206e48961f02b54bf32d87b13726027974c/README.md#custom-spdk

Just fixed the nix shell for arm in spdk-rs to get raw spdk to build (there were some x86 specific compiler flags + pyelf issues). Haven't tried building spdk-rs off it, but feeling good! Will test + make branch soon.

bors-openebs-mayastor bot pushed a commit that referenced this issue Jan 6, 2025
1796: fix: proper to_ptr type cast to c_char r=tiagolobocastro a=maxwnewcomer

## Platform agnostic `c_char` type casting

Instead of hard-casting to `i8` or `u8` we can just cast to the built in `std::os::raw::c_char`. This change allows for full `arm64` compilation of mayastor.

### Related

- Fixes #1795 
- Part of the fix to #1751 (not including `spdk-rs` changes)


Co-authored-by: Max Newcomer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arm64 Arm64 support
Projects
None yet
Development

No branches or pull requests

3 participants