-
Notifications
You must be signed in to change notification settings - Fork 445
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
README: add a couple packages required for passing tests on Ubuntu 20.04 #4132
Open
thomascalvert-xlnx
wants to merge
1
commit into
p4lang:main
Choose a base branch
from
thomascalvert-xlnx:readme-fix-deps
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These packages seems to be specific to ebpf/ubpf backends, not the whole compiler.
libpcap-dev
is already mentioned for ebpf backand here:p4c/backends/ebpf/README.md
Line 219 in 847187f
I wonder that it would be better to just update that line with
gcc-multilib
, because main README mentions backend specific dependencies.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These packages are required to run the unit tests for the whole compiler. Copy-pasting a single
apt-get
command is rather convenient and IMHO it would be nice if that was the only step required to getmake check
passing for the default build options (which include ebpf/ubpf) -- rather than digging through multiple backend-specific README files.This is just my opinion based on my recent experience of bringing up this repo. Happy to change the patch as suggested if that is the consensus.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, we should check with CMake whether all necessary dependencies are available for the eBPF back end. If that is not the case throw an error. Or simply disable the eBPF back end by default.
It is better to not pollute the top-level with back end specific dependencies and instructions. Especially, because we keep adding back ends.
We should really think of adding a comprehensive install script for these things...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you are also missing done libelf related packages
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any kind of consensus on what we want in the top level README, vs. in back-end specific files here?
(a) One option: Top level README gives instructions that enable building ALL back ends, if that is possible on a single system (I think it is, with the right prerequisites installed).
(b) Another option: Top level README gives instructions for building p4test ONLY. Or at least a particular set of back ends that is explicitly listed as supported by the top level README instructions, with explicit pointers to back-end-specific READMEs where additional prerequisites are listed for each of them.
Any strong preferences?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally prefer b) here. a) can turn messy really quickly. For the current back ends we have it already will be. The psa-eBPF backend, which uses NIKSS, the DPDK back end, the TC back end, and p4testgen already require a lot of dependencies to run, for example. You could make this even more complex with install instruction for all the different distributions we would need to write down etc.