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

Does not compile on aarch64 #132

Open
JakkuSakura opened this issue Mar 10, 2021 · 7 comments
Open

Does not compile on aarch64 #132

JakkuSakura opened this issue Mar 10, 2021 · 7 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@JakkuSakura
Copy link
Contributor

Removes corei7-avx related stuff in ffi/build.rs would solve the problem

warning: cc1: error: unknown value ‘corei7-avx’ for ‘-march’
warning: cc1: note: valid arguments are: armv8-a armv8.1-a armv8.2-a armv8.3-a armv8.4-a armv8.5-a armv8.6-a armv8-r native
@JakkuSakura JakkuSakura added the bug Something isn't working label Mar 10, 2021
@zeeshanlakhani
Copy link
Member

@qiujiangkun it's been something on our mind, i.e. running on arm, though we need to do more tests generally. From the build.rs perspective, I think we need to feature flag compile depending on the arch, which should be doable. We'll look into it.

@qiujiangkun did you test with an update to build.rs?

@JakkuSakura
Copy link
Contributor Author

I'm stuck on another step. Seems I'm missing some modules in dpdk.

 /usr/bin/ld: cannot find -lrte_rawdev_ioat
 /usr/bin/ld: cannot find -lrte_pmd_sfc

@zeeshanlakhani
Copy link
Member

@qiujiangkun yeah. we haven't tested on any arm setup/container, so the build file should/would be different. We'll def. put it on our list.

@JakkuSakura
Copy link
Contributor Author

I have tried to compile these to components.
It's a bit weird
meson says

net/sfc:        only supported on x86_64
raw/ioat:       only supported on x86

however, Ubuntu has at least raw/ioat binary for arm64 https://launchpad.net/ubuntu/groovy/arm64/librte-rawdev-ioat20.0/19.11.4-1.
Also, it seems newer version of dpdk supports arm better

@JakkuSakura
Copy link
Contributor Author

JakkuSakura commented Mar 10, 2021

I have compiled it successfully, not tested yet.
On Ubuntu 20.04 LTS aarch64, after removing corei7-avx, I can compile capsule with

apt install dpdk-dev
export C_INCLUDE_PATH="/usr/include/dpdk/:/usr/include/aarch64-linux-gnu/dpdk/"
cargo build

Ubuntu automagically adapted dpdk 19.11.6 for aarch64, it's just awesome

@drunkirishcoder
Copy link
Contributor

Right we don't officially have a arm based build process. A couple things we can do to move us towards better support for non x86-64 platform is

  1. Make the march overridable without code changes. This is something we've wanted. The big challenge here is changing the rust side is very easy. but we build dpdk into the sandbox assuming the platform to be corei7. that gets a bit more difficult to untangle unless we start publishing different variants of the sandbox. Have to think that one through.

  2. Don't hardcode the binaries we link to. Better to dynamically detect the list based on the output. That will guard us against dpdk changes or platform variances. Again though, it's contingent on figuring out how to compile dpdk correctly for the target platform.

@zeeshanlakhani
Copy link
Member

To add to what @drunkirishcoder. It may be better to bite the bullet and build dpdk, via build.rs, as part of building capsule—making sure caching is in place if dpdk has been built already on the host. Essentially, we can just use a feature flag to build for ARM or X86.

Also, of note, putting this here for info: https://doc.dpdk.org/guides/linux_gsg/cross_build_dpdk_for_arm64.html

@zeeshanlakhani zeeshanlakhani added the enhancement New feature or request label Mar 10, 2021
@JakkuSakura JakkuSakura mentioned this issue Jul 4, 2021
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Development

Successfully merging a pull request may close this issue.

3 participants