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

bfrt_python is missing #23

Open
vgurevich opened this issue Jan 16, 2025 · 6 comments · May be fixed by #29
Open

bfrt_python is missing #23

vgurevich opened this issue Jan 16, 2025 · 6 comments · May be fixed by #29
Labels
bug Something isn't working

Comments

@vgurevich
Copy link
Contributor

vgurevich commented Jan 16, 2025

After building Open-P4Studio, and running the suggested example (and observing the tests successfully passing), I noticed that `bfrt_python command is not not accessible from bfshell.

Here is the output:

ubuntu@ip-172-31-1-135:~/open-p4studio$ ./run_bfshell.sh
Using SDE /home/ubuntu/open-p4studio
Using SDE_INSTALL /home/ubuntu/open-p4studio/install
Connecting to localhost port 7777 to check status on these devices: [0]
Waiting for device 0 to be ready
/home/ubuntu/open-p4studio/install/bin/bfshell

        ********************************************
        *      WARNING: Authorised Access Only     *
        ********************************************
    
bfshell>  <TAB>
access  exit    help    pipemgr quit    ucli    version 
bfshell> 

As you can see, bfrt_python command is missing.

This is a very serious issue as it makes both prototyping and debugging nearly impossible without writing tons of complicated code for every single little thing one needs to check.

@fruffy
Copy link
Contributor

fruffy commented Jan 16, 2025

@pkotikal Which packages provides bfrt_python? Was that part of the compiler?

@fruffy fruffy added the bug Something isn't working label Jan 16, 2025
@vgurevich
Copy link
Contributor Author

@fruffy -- bfrt_python consists of two main components:

  1. It's own CPython distribution, located in ${SDE}/pkgsrc/target-utils/cpython -- I see that it is not present in the current tree. It might be related to Use the system-level Python for bf-python instead of a hardcoded 3.10 cpython. #15
  2. The actual implementation in Python, located in ${SDE}/pkgsrc/bf-drivers/src/bf_rt/bf_rt_python. This one seems to be present and OK

@fruffy
Copy link
Contributor

fruffy commented Jan 16, 2025

@fruffy -- bfrt_python consists of two main components:

1. It's own CPython distribution, located in `${SDE}/pkgsrc/target-utils/cpython` -- I see that it is **not present** in the current tree. It might be related to [Use the system-level Python for bf-python instead of a hardcoded 3.10 cpython. #15](https://github.com/p4lang/open-p4studio/issues/15)

Ah yes, now I remember. There are some problems with bf-python and we were not able to build it. Now that we have at least a basic working version we can go back and sort out the build issues there.

@jafingerhut
Copy link
Contributor

@fruffy -- bfrt_python consists of two main components:

  1. It's own CPython distribution, located in ${SDE}/pkgsrc/target-utils/cpython -- I see that it is not present in the current tree. It might be related to Use the system-level Python for bf-python instead of a hardcoded 3.10 cpython. #15
  2. The actual implementation in Python, located in ${SDE}/pkgsrc/bf-drivers/src/bf_rt/bf_rt_python. This one seems to be present and OK

@vgurevich Is this directory in the repository the one you call ${SDE}/pkgsrc/target-utils/cpython above?

@vgurevich
Copy link
Contributor Author

@jafingerhut -- oops, you are right -- I missed it somehow. Then, it's a matter of making sure the stuff is compiled.

@fruffy fruffy linked a pull request Jan 17, 2025 that will close this issue
@fruffy
Copy link
Contributor

fruffy commented Jan 17, 2025

@vgurevich Can you try and see whether enabling the variable toggled here works for you?

Right now this is not enabled because of Python versioning problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants