Should the build process check and warn about libs with missing deps?


#1

By doing something like find "$pkg_lib_dirs" -name "*.so" -exec ldd {}\; | grep "not found", the build process could show a warning (or be even more aggressive) that would be very helpful for catching runtime problems at build time


#2

I like this idea, I wonder if it might be a good thing to add into the default behavior of the do_check step or do_exit steps?


#3

While we’re at it, why not look for any ldd paths that aren’t covered in pkg_deps?

Something like this will find and check all executables:

  find "${pkg_prefix}" -type f -executable \
    -exec sh -c 'file -i "$1" | grep -q "x-executable; charset=binary"' _ {} \; \
    -print \
    -exec ldd {} \;

#4

do_default_strip is already looping through all the binaries in $pkg_prefix


#5

And there was already an issue about this: https://github.com/habitat-sh/habitat/issues/1470