Giter Club home page Giter Club logo

Comments (6)

jafingerhut avatar jafingerhut commented on July 17, 2024

You can see a compiler error message shortly before it hangs. It is annoying that the script hangs like this in such a situation, but it does. I am pretty sure it is not because any compilation process is hanging.

It is not clear to me why you are getting a compilation error. I have tested these scripts recently on an Apple Silicon Mac running Ubuntu 22.04 Linux inside of UTM, and did not experience this compilation error. The behavioral-model project code does not change very often, so it isn't easy for me to imagine why you are getting such an error, unless you are going out of your way to install different versions of development tools like make, g++, etc.

You can see the logs from when I last ran install-p4dev-v7.sh in this environment here: https://github.com/jafingerhut/p4-guide/blob/master/bin/output/ubuntu22.04-arm64-install-p4dev-v7.txt

When it comes to using these scripts on an Apple Silicon Mac, the only way I have tried to do so is to run an aarch64 (aka arm64) Ubuntu or Fedora Linux VM inside of UTM, and then put all files into a "local" file system within the VM, not a file system stored on the host OS. That might not be the root cause of the problem you are experiencing, but I wanted to mention it.

Also, install-p4dev-v7.sh is the only script that has been enhanced to (maybe) be usable on an arm64 system. install-p4dev-v6.sh has not been enhanced in this way, and I have no plans to do so. I tend to create a new version of my install script with an explicit version number in its name (e.g. v6, v7), and while I do make some fixes and enhancements to one version of the script over a year or two that I support it, I do eventually retire them in favor of newer versions. I should probably add a check to the install-p4dev-v6.sh script so that it fails quickly on detecting an aarch64/arm64 system, to make it obvious that it is not expected to work.

from p4-guide.

zzmic avatar zzmic commented on July 17, 2024

@jafingerhut Thanks for your reply and information, Andy!

It is indeed quite bizarre since I didn't install any development tools like make and g++ after I freshly installed Ubuntu 22.04 Linux inside of UTM. I did mount a file system stored on my host macOS to the VM after the system's installation, as you may have pointed out, so I will try to run through the whole procedure all over again without mounting one.

Would you mind leaving this issue open for a while? I may follow up if anything goes right or wrong regarding this issue. Thanks for your understanding!

from p4-guide.

jafingerhut avatar jafingerhut commented on July 17, 2024

I do not mind at all leaving the issue open. Let me know if you have any other questions about this. I will try running install-p4dev-v7.sh again on macOS + UTM + Ubuntu 22.04 soon and report back my results here.

from p4-guide.

zzmic avatar zzmic commented on July 17, 2024

@jafingerhut Thanks for your help, Andy! Surprisingly, mounting a folder stored on my host macOS to the VM (i.e., the folder was shared among my host macOS and the Ubuntu 22.04 VM) is precisely the issue. That was the only change I made in my installation procedure, and it turned out that everything ran smoothly and noticeably faster. I was able to test my installation through "Run tests included with p4c" and Send ping packets in the solution to basic exercise of p4lang/tutorials repository. Both of the testings turned out to be successful (with "Run tests included with p4c" having reasonable amount of failures).

from p4-guide.

jafingerhut avatar jafingerhut commented on July 17, 2024

Excellent. It was a lucky guess on my part, but glad I mentioned it as a thing worth trying to change to see if it helped.

from p4-guide.

jafingerhut avatar jafingerhut commented on July 17, 2024

Closing this issue since now I have documented a warning against running the install scripts in a folder that is shared between guest OS and host OS here: 31473b8

from p4-guide.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.