Skip to content

Instantly share code, notes, and snippets.

@jperkin
Created November 16, 2023 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jperkin/a9b7cb963a9649cc8b7371700b2692db to your computer and use it in GitHub Desktop.
Save jperkin/a9b7cb963a9649cc8b7371700b2692db to your computer and use it in GitHub Desktop.

Before:

$ bmake _check-shlibs                                                                                                         
=> Checking for missing run-time search paths in nodejs-21.2.0                                                                 
$

This is wrong. node is linked against gettext-lib and iconv, neither of which are deps, but are pulled in implicitly by others.

Fix:

--- a/mk/check/check-shlibs-elf.awk
+++ b/mk/check/check-shlibs-elf.awk
@@ -96,8 +96,8 @@ function check_pkg(DSO, pkg, found) {
        }
        if (found)
                print DSO ": " pkg " is not a runtime dependency"
-       # Not yet:
-       # print DSO ": " pkg " is not a dependency"
+       else
+               print DSO ": " pkg " is not a dependency"
        close(depends_file)
 }
 

After:

$ bmake _check-shlibs
=> Checking for missing run-time search paths in nodejs-21.2.0
ERROR: /opt/local/lib/libintl.so.8: gettext-lib-0.22.3 is not a dependency
ERROR: /opt/local/lib/libiconv.so.2: libiconv-1.17 is not a dependency
*** Error code 1

Stop.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment