[Bug 213547] Mk/Scripts/qa.sh - hard-coded LD_LIBRARY_PATH causes false positives

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Oct 19 02:10:18 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213547

--- Comment #6 from John Hein <z7dr6ut7gs at snkmail.com> ---
(In reply to yuri from comment #5)

The actual library that is "chosen during the build" depends on -L, -rpath and
(as you mentioned) possibly libraries specified with an absolute path.

Since we're talking about dynamic linking, however, that's only half of the
"linking" picture.

At run time (or when you run ldd), the second part of the linking job is
finished off and the library file that is chosen can be influenced by a number
of things, such as:

 - whether a run time "hint" was supplied at build time (-rpath)

 - LD_PRELOAD & LD_LIBRARY_PATH (if not setuid binaries unless you're root)

 - the ldconfig system search path


With all the variables involved, there is more than one way to fool stage-qa so
that it doesn't necessarily find undocumented library dependencies.  Given the
default system configuration, removing LD_LIBRARY_PATH from qa.sh removes one
reasonably likely potential false positive source, and leaving it there doesn't
help find undeclared dependencies at all.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the freebsd-ports-bugs mailing list