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

bpf_conformance dependency on elfio is hard to use #162

Open
dthaler opened this issue Dec 11, 2023 · 0 comments
Open

bpf_conformance dependency on elfio is hard to use #162

dthaler opened this issue Dec 11, 2023 · 0 comments

Comments

@dthaler
Copy link
Collaborator

dthaler commented Dec 11, 2023

A change made to bpf_conformance apparently breaks the verifier compilation, so I’m trying to determine the right way to fix.
Bump external/bpf_conformance from 78df87a to ab34094 by dependabot[bot] · Pull Request #543 · vbpf/ebpf-verifier (github.com) hits:

CMake Error at external/bpf_conformance/src/CMakeLists.txt:53 (add_dependencies):
The dependency target "elfio" of target "bpf_conformance" does not exist.

After the recent change, bpf_conformance\src\CMakeLists.txt now has:

add_dependencies(bpf_conformance elfio)

In the bpf_conformance repository this is fine since bpf_conformance\CMakeLists.txt (one level up) has:

add_subdirectory("external/elfio")

But ebpf-verifier\CMakeLists.txt has:

add_subdirectory("external/bpf_conformance/src")

Which means it tries to use the src\CMakeLists.txt without first invoking bpf_conformance\CMakeLists.txt, and hence can’t find the dependency
that is added inside bpf_conformance\external\elfio\CMakeLists.txt.

Options:

  1. Don’t add the dependency in bpf_conformance\src\CMakeLists.txt. This seems like the wrong choice.
  2. Move add_subdirectory("external/elfio") down inside bpf_conformance\src\CMakeLists.txt
  3. Update ebpf-verifier\CMakeLists.txt to depend on all of bpf_conformance\CMakeLists.txt not just bpf_conformance\src\CMakeLists.txt. This would slow down the build by having to compile bpf_conformance\tests etc. when that’s not needed by the verifier.
  4. Update ebpf-verifier\CMakeLists.txt to add_subdirectory(“external/bpf_conformance/external/elfio”) so the dependency is defined before invoking bpf_conformance\src\CMakeLists.txt

Alan stated offline:
"option 2 is probably the best option as this should permit other projects to consume bpf_conformance more easily."

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 a pull request may close this issue.

1 participant