panda icon indicating copy to clipboard operation
panda copied to clipboard

Dependency tracking improvements

Open AndrewFasano opened this issue 1 year ago • 0 comments

Some recent upgrades to rust and libosi have revealed that our build.sh script could use some improvements when re-building on a system after the initial install.

  1. If your rust version is too old(?) you can get errors trying to build our rust plugins:
error[E0599]: no method named `line` found for struct `proc_macro::Span` in the current scope
  --> /home/andrew/.cargo/registry/src/index.crates.io-6f17d22bba15001f/inline-python-macros-0.12.0/src/embed_python.rs:57:35
   |
57 |             self.add_whitespace(span, span.line(), span.column())?;
   |                                            ^^^^ method not found in `Span`

I was able to resolve this with a cargo update

  1. changes to libosi aren't automatically pulled:
/home/andrew/git/panda/panda/plugins/wintrospection/wintrospection.cpp: In function ‘void on_get_mapping_by_addr(CPUState*, OsiProc*, target_ptr_t, OsiModule**)’:
/home/andrew/git/panda/panda/plugins/wintrospection/wintrospection.cpp:577:17: error: ‘get_module_by_addr’ was not declared in this scope; did you mean ‘get_mapping_by_addr’?
  577 |   auto mentry = get_module_by_addr(kernel, p->taskd, process_is_wow64(proc),
      |                 ^~~~~~~~~~~~~~~~~~
      |                 get_mapping_by_addr

I'll defer to @jamcleod for how we should handle part 1 here - I've generally had a hard time with rust projects always being a moving target and haven't yet figured out how to handle it well.

For part 2 - I think we could specify a minimum libosi version somewhere in panda and raise an error if it's not available.

AndrewFasano avatar Sep 01 '23 13:09 AndrewFasano