Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Build error on bare system - building from source #119

Closed
ratnadeepb opened this issue Jan 20, 2021 · 8 comments · Fixed by #120
Closed

Build error on bare system - building from source #119

ratnadeepb opened this issue Jan 20, 2021 · 8 comments · Fixed by #120
Labels
bug Something isn't working

Comments

@ratnadeepb
Copy link

Describe the bug?

Trying to build the repo from source throws errors about SSE support. Here is the error in its entirety:

Steps to reproduce?

  1. git clone https://github.com/capsule-rs/capsule.git
  2. cargo build

Expected behavior?

Successful build

Capsule version?

Git

OS?

Ubuntu 18.10

Docker / VM / Bare?

Bare

Stack trace or error log output

` running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-Wall" "-Wextra" "-march=corei7" "-o" "/users/deep83/rust/capsule/target/debug/build/capsule-ffi-9f389138f8a5f94a/out/src/shim.o" "-c" "src/shim.c"
cargo:warning=In file included from /usr/lib/gcc/x86_64-linux-gnu/7/include/immintrin.h:41:0,
cargo:warning= from /usr/lib/gcc/x86_64-linux-gnu/7/include/x86intrin.h:48,
cargo:warning= from /usr/local/include/rte_vect.h:28,
cargo:warning= from /usr/local/include/rte_memcpy.h:17,
cargo:warning= from /usr/local/include/rte_ether.h:21,
cargo:warning= from /usr/local/include/rte_ethdev.h:159,
cargo:warning= from src/shim.c:20:
cargo:warning=/usr/local/include/rte_memcpy.h: In function ‘rte_mov32’:
cargo:warning=/usr/lib/gcc/x86_64-linux-gnu/7/include/avxintrin.h:926:1: error: inlining failed in call to always_inline ‘_mm256_storeu_si256’: target specific option mismatch
cargo:warning= _mm256_storeu_si256 (__m256i_u *__P, __m256i __A)
cargo:warning= ^~~~~~~~~~~~~~~~~~~
cargo:warning=In file included from /usr/local/include/rte_ether.h:21:0,
cargo:warning= from /usr/local/include/rte_ethdev.h:159,
cargo:warning= from src/shim.c:20:
cargo:warning=/usr/local/include/rte_memcpy.h:321:2: note: called from here
cargo:warning= _mm256_storeu_si256((__m256i *)dst, ymm0);
cargo:warning= ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cargo:warning=In file included from /usr/lib/gcc/x86_64-linux-gnu/7/include/immintrin.h:41:0,
cargo:warning= from /usr/lib/gcc/x86_64-linux-gnu/7/include/x86intrin.h:48,
cargo:warning= from /usr/local/include/rte_vect.h:28,
cargo:warning= from /usr/local/include/rte_memcpy.h:17,
cargo:warning= from /usr/local/include/rte_ether.h:21,
cargo:warning= from /usr/local/include/rte_ethdev.h:159,
cargo:warning= from src/shim.c:20:
cargo:warning=/usr/lib/gcc/x86_64-linux-gnu/7/include/avxintrin.h:920:1: error: inlining failed in call to always_inline ‘_mm256_loadu_si256’: target specific option mismatch
cargo:warning= _mm256_loadu_si256 (__m256i_u const *__P)
cargo:warning= ^~~~~~~~~~~~~~~~~~
cargo:warning=In file included from /usr/local/include/rte_ether.h:21:0,
cargo:warning= from /usr/local/include/rte_ethdev.h:159,
cargo:warning= from src/shim.c:20:
cargo:warning=/usr/local/include/rte_memcpy.h:320:7: note: called from here
cargo:warning= ymm0 = _mm256_loadu_si256((const __m256i *)src);
cargo:warning= ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
exit code: 1

--- stderr

error occurred: Command "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-Wall" "-Wextra" "-march=corei7" "-o" "/users/deep83/rust/capsule/target/debug/build/capsule-ffi-9f389138f8a5f94a/out/src/shim.o" "-c" "src/shim.c" with args "cc" did not execute successfully (status code exit code: 1).`

@ratnadeepb ratnadeepb added the bug Something isn't working label Jan 20, 2021
@zeeshanlakhani
Copy link
Member

zeeshanlakhani commented Jan 23, 2021

@ratnadeepb If you're building without docker or our vm (via vagrant), take a gander here: https://github.com/capsule-rs/sandbox#without-docker. You'll need to install dpdk, etc... Let me know once you follow the directions in there.

@ratnadeepb
Copy link
Author

ratnadeepb commented Jan 23, 2021

@zeeshanlakhani actually I have been working on something similar. I have been using a slightly modified version of your ffi crate and core/dpdk module. I can build things fine. But when I try to build this repo from source it throws me this error.

Pre-requisites wise, I have the following libs installed - build-essential linux-headers-$(uname -r) git libnuma-dev linux-modules-extra-$(uname -r) libclang-dev clang llvm-dev libpcap-dev dpdk-igb-uio-dkms ninja-build. I am building DPDK with meson 0.56 and ninja 1.8.2. The igb_uio driver is from dpdk.org/dpdk-kmods.

This is what confuses me: The build script I use is mostly a derivative of the one you have. And for the bindings.h and shim.c, I have only added to those.

Also, I am building these on cloudlab's Ubuntu18 machines (if that helps).

@ratnadeepb
Copy link
Author

This is how my build.rs stands, in case that helps: https://github.com/ratnadeepb/vdataplane/blob/master/dpdk-sys/build.rs

@zeeshanlakhani
Copy link
Member

zeeshanlakhani commented Jan 23, 2021

@ratnadeepb I'll run up things on my Ubuntu box tonight and see. What DPDK version? Capsule uses 19.11.1 and that matters due to API breakage across DPDK versions. It seems specifically an issue in loading rte_ethdev, which we do here: https://github.com/capsule-rs/capsule/blob/master/ffi/build.rs#L47

@ratnadeepb
Copy link
Author

This error is from DPDK 19.11.6.

@zeeshanlakhani
Copy link
Member

@ratnadeepb ill test on that version this evening and see. I’ll be using our dpdk and setup install scripts here.

@zeeshanlakhani
Copy link
Member

zeeshanlakhani commented Jan 23, 2021

@ratnadeepb I was able to reproduce and fix. I'll push up a PR for @drunkirishcoder to test/review here and at the sandbox as well.

I repro'ed on 19.11.1, but will move us to 19.11.6 for LTS as part of this too.

We'll prob ship an ffi cargo release sometime later this week (possibly with a couple small changes, like moving to rust 1.49 too).

@ratnadeepb
Copy link
Author

@zeeshanlakhani cool!

zeeshanlakhani added a commit that referenced this issue Jan 24, 2021
changes:

- Fix for #119 with changes to meson/clang
- Move to Rust 1.49
  * assoc clippy changes
- Test/move to Dpdk 19.11.6
  * updated pcap open_dump doesn't err on empty file, so check for first
drunkirishcoder pushed a commit that referenced this issue Jan 27, 2021
changes:

- Fix for #119 with changes to meson/clang
- Move to Rust 1.49
  * assoc clippy changes
- Test/move to Dpdk 19.11.6
  * updated pcap open_dump doesn't err on empty file, so check for first
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

2 participants