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

fix: nix-shell environment for building spdk on arm #72

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

maxwnewcomer
Copy link

@maxwnewcomer maxwnewcomer commented Dec 23, 2024

This PR documents the changes needed to get the ARM64 build working and some of the issues encountered along the way.

  1. Debugging the ARM Build

    • I spun up an arm64 machine on Hetzner and debugged the install process step by step.
    • First tried running nix-shell without SPDK and hit issues with pyelf. Replacing python3.withPackages with pkgs.python3Packages.pyelftools fixed that.
  2. Key Issue

    • The main problem in a manual build was the -msse4 flag, which is for x86 extended instruction sets and doesn’t work on ARM.
    • I split the nix-shell compiler flags into configurable strings so we can set optimization flags per architecture.
    • Then, in the default nix-shell spdk configure and build, Clang was the default compiler, this led to SVE compilation issues. In the "no-spdk-installed" nix environment, I noticed I was getting success w/ GCC, so migrated the nix script to remove Clang and use GCC by default. I don't want to get presumptuous that this is the best solution, very open to feedback on this.
  3. Context

Addresses


Please let me know if you'd rather me focus on getting the OEP to implementable rather than starting to implement fixes!

Signed-off-by: Max Newcomer <[email protected]>

fix: echo string formating

Signed-off-by: Max Newcomer <[email protected]>

fix: remove neon flag

Signed-off-by: Max Newcomer <[email protected]>

fix(wip): compile with gcc

Signed-off-by: Max Newcomer <[email protected]>
@maxwnewcomer maxwnewcomer marked this pull request as ready for review December 24, 2024 20:24
@maxwnewcomer maxwnewcomer marked this pull request as draft December 25, 2024 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Will not build on ARM
1 participant