ldd is your friend, as you've found. Mostly, though, just look at the libfoo-dev packages you had to install to compile the thing, and remove the '-dev' bit as a decent start.I've successfully compiled a qt6 program (which was somewhat of a marathon in itself, getting all the right pieces in place) and want to run it on a "clean" Pi Bookworm setup. This requires installation of some extra libraries, although nowhere near as many as I have on the development machine.
I've found "ldd" (and a few other methods) to determine the complete list of libraries which my program uses; however rather than manually going everything:
a) Is there a method to determine which of the required libraries are not currently installed on the target machine?
In generalb) Is there a way to backtrack a library to determine which package it comes from?
Code:
dpkg -S /path/to/foo
Also, initramfs-tools has a very interesting script to copy a binary and its library dependencies into the initramfs, without the need to manually specify anything. You might want to look at what that does, especially if you've built libraries as part of the package you've built that aren't installed by the system.
Statistics: Posted by dickon — Sun Oct 27, 2024 9:50 am