Is it possible to tell OSHI to not even try to load udev on Linux? #2561
-
The reasons "why" are a bit silly, so I'm not sure I want to lead with that. Suffice it to say that in the environment I am working with attempting to load udev within the JVM I am using will cause the JVM to crash, and it's not easy for me to fix the root cause issue (glibc, musl libc mumble mumble). I don't actually need/use these udev-provided stats and am really only looking for things such as canonical operating system name and such. It's a bit overkill, but I like the consistency and API that OSHI gives, even though I am using a small subset of its functionality. Is there a way to tell OSHI or JNA not to even try loading |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
Aut inveniam viam aut faciam. I don't think we currently have such a hack, but it's as easy as submitting a PR and having me cut a release. We have similar "off switches" with our global config / properties file for:
Is it just udev or are there also libc issues? |
Beta Was this translation helpful? Give feedback.
-
JNA has the ability to have a per-path specification for any given library so in theory you could point it to an empty directory (thus avoiding the real udev) and causing an unsatisfied link error. I think. This question probably belongs on the jna-users mailing list. |
Beta Was this translation helpful? Give feedback.
Definitely open to a PR. We already have a HAS_UDEV boolean... jsut throw a conditional around that code to return false if it's disabled in the properties.