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

Detect incompatible K / Python installations #4196

Open
Baltoli opened this issue Nov 20, 2023 · 2 comments
Open

Detect incompatible K / Python installations #4196

Baltoli opened this issue Nov 20, 2023 · 2 comments
Labels

Comments

@Baltoli
Copy link
Contributor

Baltoli commented Nov 20, 2023

When K is installed via kup, care needs to be taken to make sure that we use a Nix-supplied version of Python to run Pyk applications via the Poetry environment. If this is not the case, we see errors like:

I have proposed a new feature in kup that will supply the correct Python interpreter path to use; we should also have Pyk print a friendlier error message when the following conditions are met on running llvm-kompile to build a runtime Python binding module:

  • llvm-kompile is somewhere under /nix/store/...
  • The --python argument (i.e. the current executing Python interpreter) is not under /nix/store/...
  • llvm-kompile fails to run successfully

If these conditions are met, we should add a message that suggests running something like:

$ poetry env use --no-cache $(k-which-python)

Note that these conditions are just a heuristic for a particular common bug with kup + K + Pyk, so we should still report the full error message from llvm-kompile, and allow it to run successfully if it somehow does work.

Blocked on kup support in: runtimeverification/kup#92

@Baltoli Baltoli self-assigned this Feb 14, 2024
@Baltoli
Copy link
Contributor Author

Baltoli commented Feb 21, 2024

There's a second way that this can manifest, whereby an ImportError is thrown when running module_from_spec(spec). We should catch this and report the error similarly.

@Baltoli
Copy link
Contributor Author

Baltoli commented Feb 21, 2024

We should just add this to the new Pyk documentation with some examples of the error and how to fix it.

@Baltoli Baltoli removed their assignment Feb 23, 2024
@Baltoli Baltoli added the pyk label Apr 10, 2024
@Baltoli Baltoli transferred this issue from runtimeverification/pyk Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant