Update the build instructions in the README to be generator-independent.#5517
Update the build instructions in the README to be generator-independent.#5517
Conversation
Signed-off-by: fruffy <fruffy@nyu.edu>
|
🚀 Doxygen Preview Ready! |
1 similar comment
|
🚀 Doxygen Preview Ready! |
|
If I understand correctly, the current directions do work, but the new proposed directions are more general and support more options? |
Yes, the current directions only work when you have selected |
jafingerhut
left a comment
There was a problem hiding this comment.
LGTM, with the minor annoyance that I am either not installing other dependencies properly for the ctags target to work, or there is something wrong in how that is implemented in the p4c repo.
| the same name in existence.) | ||
| apt-get install exuberant-ctags.` The CMake targets `ctags` and `etags` generate | ||
| tags for vi and Emacs respectively via `cmake --build build --target ctags` or | ||
| `cmake --build build --target etags`. (Make sure that you are using the correct |
There was a problem hiding this comment.
When I try the following sequence of steps on an aarch64 Ubuntu 24.04 Linux system with ctags and etags installed:
# First installed all dependencies of p4c, including behavioral-model from source
sudo apt-get install exuberant-ctags
git clone https://github.com/p4lang/p4c
cd p4c
cmake -B build -DCMAKE_BUILD_TYPE=Debug
I get these errors trying to build ctags or etags targets:
$ cmake --build build --target ctags
gmake: *** No rule to make target 'ctags'. Stop.
Building the etags target seems to work fine, although it issues a warning message:
$ cmake --build build --target etags
Generating extended ctags
ctags: Warning: cannot open source file "extensions" : No such file or directory
Built target etags
I get the same results whether I use -DCMAKE_BUILD_TYPE=Debug or -DCMAKE_BUILD_TYPE=Release.
There was a problem hiding this comment.
FYI, I'm happy merging this PR as is, and creating a separate issue to track the ctags problem.
| 4. (Optional) Install the compiler and the P4 shared headers globally. | ||
| ``` | ||
| sudo make install | ||
| sudo cmake --build build --target install |
There was a problem hiding this comment.
Not a requirement, but it might be nice to mention the option of the following target, which installs binaries that have been stripped of debug symbols, so are noticeably smaller in size:
sudo cmake --build build --target install/strip
We are not always using make, often we use ninja for faster builds.