-
Notifications
You must be signed in to change notification settings - Fork 448
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
P4C arm64/aarch64 support #4390
Comments
I have not tried to compile it in macOS ever (neither Intel nor arm64 processors), but I have successfully compiled p4c and other open source P4 dev tools on Ubuntu Linux for arm64 on an Apple Silicon Mac, using UTM as the virtualization software to run Ubuntu Linux arm64, and some updates I made to my install-p4dev-v7.sh script so that it installs Z3 from source code : https://github.com/jafingerhut/p4-guide/blob/master/bin/README-install-troubleshooting.md#quick-instructions-for-successful-install-script-run |
Do we have access to CI running the M-series HW? It seems there should be one -- https://github.blog/2023-10-02-introducing-the-new-apple-silicon-powered-m1-macos-larger-runner-for-github-actions/. Ideally we are looking for a volunteer with M-series MacBook to do the porting anyway, as fixing this just based on CI will be very painful. I think we as p4c community should decide what platforms make sense to be supported -- from the readme even older x64-based macOS is "unofficial". So do we want to add M-series Apple products? Do we want to make them official? It is a major platform... As a side note, since the issue topic mentions aarch64 in general, we do support Ubuntu and Ubuntu has official aarch64 version, do we want to support that too? |
This is is useful, thanks. I have been thinking that we should incorporate some of your install scrips into the compiler at some point. At least the parts concerning the compiler. It would be nice to have a one-shot install script for the common development environments. There seems to be issues with using boost, have you run into these? Or is Z3 the only problem?
Yeah I have also been thinking about this. The macOS support is unofficial because, while a lot of P4C developers use Linux environments, students often prefer MacBooks to learn about P4 and P4C. Supporting macOS reduces the friction of outreach somewhat. We could make it one of the nightly CI runs if the work required is low. |
@fruffy asked: "There seems to be issues with using boost, have you run into these? Or is Z3 the only problem?" I have not noticed any issued with Ubuntu 20.04, 22.04, or 23.04 (arm64) when running my install-p4dev-v7.sh script. In all cases, the p4c/etc. executables that result enable all but about 15 of the |
Does this also include support for BMv2? |
My install-p4dev-v7.sh script builds all of these things from source code, both on x86_64 and arm64, with good test results (minus the very few failed tests I mentioned earlier): https://github.com/jafingerhut/p4-guide/blob/master/bin/install-p4dev-v7.sh#L405-L419 |
Great, thanks. |
It looks like the M1 runners are not free yet: |
What are M1 problems? I am on M1 laptop and everything works for me somehow (besides obvious Linux-y things like ebpf that requires linux kernel headers, etc.). So, if there is a particular configuration for me to try, I can do it |
@asl Fabian can confirm, but I believe this issue is primarily focused on the topic of doing CI testing of p4c on arm64, but the free arm64 hosts available to us right now via Github actions do not have enough memory on the arm64 hosts. I have also run p4c on arm64 (Apple Silicon Mac) with no trouble, most tests passing just fine. |
@jafingerhut Yeah, this is what I wanted to know as "but can not get it to work". @fruffy – any further information? |
How do you install your dependencies? Students I work with ostensibly had issues with boost and Protobuf, but I can not check for issues without CI support. For what it is worth using Andy's scripts worked for them. |
Homebrew works reasonable well. I think I had issues with protobuf from there as it is a bit non-trivial to provide protobuf in non-standard location (from homebrew) within present build system, but the one installed via I can try to replicate some fresh setup from scratch if you're having some particular configuration in mind for me to try |
No need thanks! I will just wait until the M1 runner is widely available. It's good to know that the FetchContent version of Protobuf works. |
This increasingly comes up as a topic. For example, users with M1 MacBook would like to try out the compiler but can not get it to work. It might not be too much effort to fix the issues causing compiler errors.
The text was updated successfully, but these errors were encountered: