Date: Tue, 18 Oct 2016 17:30:17 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 213547] Mk/Scripts/qa.sh - hard-coded LD_LIBRARY_PATH causes false positives Message-ID: <bug-213547-13-q77RS4mfhb@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-213547-13@https.bugs.freebsd.org/bugzilla/> References: <bug-213547-13@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D213547 yuri@rawbw.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |yuri@rawbw.com --- Comment #2 from yuri@rawbw.com --- The original procedure in question was: > lst_immediate_deps() { > LD_LIBRARY_PATH=3D${LOCALBASE}/lib ldd -a "$1" | \ > awk 'BEGIN {section=3D0}; /^\// {section++} /^[^\/]/ {if(section<= =3D1) print}' | \ > sed -e 's/.*=3D> //' -e 's/ .*//' >} The current lines (after Mathieu modification): > $(LD_LIBRARY_PATH=3D${LOCALBASE}/lib ldd -a "${STAGEDIR}${file}" | \ > awk '\ > BEGIN {section=3D0}\ > /^\// {section++}\ > !/^\// && section<=3D1 && ($3 ~ "^'${PREFIX}'" || $3 ~ "^'${LOCALBA= SE}'") {print $3}') lst_immediate_deps() finds all immediate dependencies of the given elf. LD_LIBRARY_PATH=3D${LOCALBASE}/lib was added to merely ensure ldd looks the= re. So if it looks there by default it shouldn't make any difference at all. Calli= ng code was selecting only the libraries that are under ${LOCALBASE}. So, agai= n, LD_LIBRARY_PATH shouldn't matter if ldd looks there by default. How does the output of ldd command differ on your system with and without LD_LIBRARY_PATH=3D${LOCALBASE}/lib? Or does it differ? On my system /usr/local/lib/libjsoncpp.so.1.7.7 only depends on the base sh= ared libraries: > $ ldd /usr/local/lib/libjsoncpp.so.1.7.7 > /usr/local/lib/libjsoncpp.so.1.7.7: > libthr.so.3 =3D> /lib/libthr.so.3 (0x801639000) > libc++.so.1 =3D> /usr/lib/libc++.so.1 (0x80185d000) > libcxxrt.so.1 =3D> /lib/libcxxrt.so.1 (0x801b1c000) > libm.so.5 =3D> /lib/libm.so.5 (0x801d39000) > libgcc_s.so.1 =3D> /lib/libgcc_s.so.1 (0x801f62000) > libc.so.7 =3D> /lib/libc.so.7 (0x800822000) I believe the difference is caused by being built locally (portupgrade) vs.= in poudriere. Environment, the presence of preinstalled packages, impacts this. I think it prints this warning properly for you: > Warning: you need LIB_DEPENDS+=3Dlibc++.so:devel/libc++ The real problem is the volatility of dependency being base vs. localbase triggered by local vs. poudriere build. I am not sure what the solution of = this problem couldbe, b ut it has nothing to do with LD_LIBRARY_PATH here. --=20 You are receiving this mail because: You are on the CC list for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-213547-13-q77RS4mfhb>