-
Notifications
You must be signed in to change notification settings - Fork 69
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
Is there a way to bundle libcamera for distribution, e. g. inside AppImage? #86
Comments
IPA modules are a core design feature of libcamera. This is where the image processing algorithms are contained. For some vendors this is the "secret sauce" of how they provide good image quality and they can't/don't/won't provide an open source implementation. For this they can provide an externally loaded IPA which can not be statically linked. From the sound of it, you don't care about that, and you are packaging all this yourself so you have full control over what goes in. The paths are indeed over part that could be wrong, you can't just "move" libcamera. So to fix that you'd have to compile with the appropriate paths configured. You also need to make sure the IPA signature verification is successful, or that the IPA process separation can work in your image. I would suspect making sure you have the IPA verification support at runtime in your app image is likely the main issue. |
Thanks for replying! I understand in principle what IPA modules are, what I don't understand is why they are so difficult to load, and what I could possibly do about this. Yes, I haven't needed any vendor-specific ones, so far I only need the ones that are built from source. But never mind that. Here is the folder with the modules and the .sig files, why do they fail to load anyway? |
Are you building libcamera from source? |
A full compile log would help identify it, or a capture with LIBCAMERA_LOG_LEVELS=*:0 set to get the full runtime debug log |
Hi! I have an application made with libcamera and I want to distribute it in a way that would work across slightly different OS versions and configs. I usually use AppImage for such tasks, it's a great tool and works very well. But libcamera is giving me a lot of grief. Let me explain.
The way it works is I run
AppImageTool
on my executable, it transitively / recursively callsldd
on the executable and each reported library, and deploys them all in a folder. The original paths are preserved, but now it's./AppDir/usr/local/lib/aarch64-linux-gnu/libcamera/
instead of/usr/local/lib/aarch64-linux-gnu/libcamera
, and so on. At runtime this folder structure is mounted inside/tmp/
, and it either patches something, and/or uses a modified loader to actually load all the dependencies from this tmp path.Bundling libcamera.so is no problem,
ldd
shows it as a dependency of my executable, so it gets bundled, along with all of its direct dependencies (direct = shown byldd
). The problem is with IPAs. When I run this AppImage on a clean system, I get IPA load error and nothing works. For the obvious reason that IPAs are loaded at runtime, so not reported byldd
, and thus not bundled. Okay, no problem. I study the source code and find theLIBCAMERA_IPA_MODULE_PATH
environment variable which I can use to tell libcamera to find IPAs inside the correct/tmp/...
directory, and I deploy these libraries manually. But then doesn't work with the following errors:At this point I'm way above my head. Is there a way to get around this and deploy ALL of
libcamera
into my AppImage? I've already builtlibcamera
from source, is there a way to build it into fewer separate binaries? Is there a way to build it into static libraries so that the linker does the job of creating a self-contained executable?The text was updated successfully, but these errors were encountered: