From owner-freebsd-ports-bugs@freebsd.org Tue Oct 18 17:30:17 2016 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B3EBC174DC for ; Tue, 18 Oct 2016 17:30:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0FDC0B54 for ; Tue, 18 Oct 2016 17:30:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u9IHUGNn022197 for ; Tue, 18 Oct 2016 17:30:16 GMT (envelope-from bugzilla-noreply@freebsd.org) 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 Date: Tue, 18 Oct 2016 17:30:17 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Ports Framework X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: yuri@rawbw.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: portmgr@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2016 17:30:17 -0000 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.=