AdaCore / RecordFlux

Formal specification and generation of verifiable binary parsers, message generators and protocol state machines
Apache License 2.0
107 stars 7 forks source link

issue installing 0.23.0: error: [Errno 2] No such file or directory: 'cargo' #1299

Closed dalybrown closed 3 months ago

dalybrown commented 3 months ago

When trying to install the latest version 0.23.0 I get the following error:

...
[link library] librflxlang.so
error: [Errno 2] No such file or directory: 'cargo'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for RecordFlux
...

What is the cargo dependency here? Is this a new dependency on Rust? I previously had 0.19.0 installed. I'm not sure how to work around this at the moment. Please advise - thanks!

kanigsson commented 3 months ago

This is indeed a new dependency on Rust. See also this new part of the User's guide.

dalybrown commented 3 months ago

Ah ok. I thought it was optional for some reason (I saw that in the users guide, didn't register that it was mandatory).

Thanks!

p.s. what was the reason you introduced a rust dependency?

treiher commented 3 months ago

We are rewriting some parts in Rust to enhance performance and enable new features, such as automatic test case generation, where Python would be too slow.

We provide wheels with precompiled libraries for systems with glibc 2.35+ (e.g., Ubuntu 22.04). So on these systems no Rust compiler is needed when installing RecordFlux from PyPI. Unfortunately, we cannot provide wheels for systems with older glibc at the moment.

dalybrown commented 3 months ago

Gotcha. I was wondering because my colleague uses an amd64 machine and didn't have the same issue whereas I use an arm64 machine and ran into this. I guess there is no precompiled library for arm64.

I'll just install rust manually then.

How come you didn't use Ada/SPARK to rewrite?