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

PANDA container seems broken #1438

Closed
zestrada opened this issue Feb 9, 2024 · 1 comment · Fixed by #1565
Closed

PANDA container seems broken #1438

zestrada opened this issue Feb 9, 2024 · 1 comment · Fixed by #1565
Assignees

Comments

@zestrada
Copy link
Member

zestrada commented Feb 9, 2024

As a result of #1399, it looks like libpanda moved to /usr/local/lib/panda and we moved away from using the -softmmu suffix.

We set the PANDA_PATH env var in our Dockerfile for dockerized builds, so it appears that those paths may need to be updated and I made an attempt to create the appropriate changes with commit 10f4e1a .

I kept running into issues with mod.rs in panda-re, so I attempted to make the approriate change there but I don't have commit access to that repository. Those changes are shown in the diff below:

diff --git a/panda-rs/src/plugins/mod.rs b/panda-rs/src/plugins/mod.rs
index f231049..5192700 100644
--- a/panda-rs/src/plugins/mod.rs
+++ b/panda-rs/src/plugins/mod.rs
@@ -389,28 +389,28 @@ pub struct Plugin {
 }

 #[cfg(feature = "x86_64")]
-const PLUGIN_DIR: &str = "x86_64-softmmu/panda/plugins";
+const PLUGIN_DIR: &str = "x86_64/panda/plugins";

 #[cfg(feature = "i386")]
-const PLUGIN_DIR: &str = "i386-softmmu/panda/plugins";
+const PLUGIN_DIR: &str = "i386/panda/plugins";

 #[cfg(feature = "arm")]
-const PLUGIN_DIR: &str = "arm-softmmu/panda/plugins";
+const PLUGIN_DIR: &str = "arm/panda/plugins";

 #[cfg(feature = "aarch64")]
-const PLUGIN_DIR: &str = "aarch64-softmmu/panda/plugins";
+const PLUGIN_DIR: &str = "aarch64/panda/plugins";

 #[cfg(feature = "mips")]
-const PLUGIN_DIR: &str = "mips-softmmu/panda/plugins";
+const PLUGIN_DIR: &str = "mips/panda/plugins";

 #[cfg(feature = "mipsel")]
-const PLUGIN_DIR: &str = "mipsel-softmmu/panda/plugins";
+const PLUGIN_DIR: &str = "mipsel/panda/plugins";

 #[cfg(feature = "mips64")]
-const PLUGIN_DIR: &str = "mips64-softmmu/panda/plugins";
+const PLUGIN_DIR: &str = "mips64/panda/plugins";

 #[cfg(feature = "ppc")]
-const PLUGIN_DIR: &str = "ppc-softmmu/panda/plugins";
+const PLUGIN_DIR: &str = "ppc/panda/plugins";

 impl Plugin {
     pub fn new(name: &str) -> Self {

I think there might be a simpler/more elegant fix than what I've been messing around with here.

@jamcleod
Copy link
Member

Surprised this wasn't brought to my attention. For those looking for a workaround or a fix compatible with older versions of PANDA, you can set the environment variable PANDA_PLUGIN_DIR to the absolute path to the directory containing all the panda_[plugin_name].so files. Alternatively this also supports being provided a path relative to PANDA_PATH.

As for the actual fix, still trying to figure out if I should have it attempt to support the old paths as a fallback (I'm inclined to, it's just kinda gross?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants