From owner-freebsd-ports-bugs@freebsd.org Tue Oct 18 21:11:13 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 3DBD8C17594 for ; Tue, 18 Oct 2016 21:11:13 +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 2490C390 for ; Tue, 18 Oct 2016 21:11:13 +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 u9ILBD6t069717 for ; Tue, 18 Oct 2016 21:11:13 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 21:11:13 +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: z7dr6ut7gs@snkmail.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: 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 21:11:13 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D213547 --- Comment #3 from John Hein --- (In reply to yuri from comment #2) Thanks for providing the background for why LD_LIBRARY_PATH was added. By the way, here's the difference (you should get the same if the libc++ po= rt is installed): % ldd /usr/local/lib/libjsoncpp.so > /tmp/base ; env LD_LIBRARY_PATH=3D/usr/local/lib ldd /usr/local/lib/libjsoncpp.so > /tmp/po= rts ; diff -u /tmp/base /tmp/ports > --- /tmp/base 2016-10-18 14:50:37.247449000 -0600 > +++ /tmp/ports 2016-10-18 14:50:37.263341000 -0600 > @@ -1,7 +1,8 @@ > /usr/local/lib/libjsoncpp.so: > 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.1 =3D> /usr/local/lib/libc++.so.1 (0x80185d000) > + libcxxrt.so.1 =3D> /lib/libcxxrt.so.1 (0x801b1d000) > + libm.so.5 =3D> /lib/libm.so.5 (0x801d3a000) > + libgcc_s.so.1 =3D> /lib/libgcc_s.so.1 (0x801f63000) > libc.so.7 =3D> /lib/libc.so.7 (0x800822000) > + librt.so.1 =3D> /usr/lib/librt.so.1 (0x802171000) Pretty straightforward... the path specified in LD_LIBRARY_PATH is searched first causing it to find /usr/local/lib/libc++.so.1 (and its dependencies) before /usr/lib/libc++.so.1 If we remove LD_LIBRARY_PATH from qa.sh, we'll just use the normal system search path... which is the right thing for stage-qa to do. Since you said= it was added just to get ldd to look in /usr/local/lib, then it's definitely n= ot needed. The system looks there by default already (try 'ldconfig -r | grep search'). rpath and setuid-ness can change the lib search behavior a bit, = but neither of those are involved in this case. This same problem can happen whether you build with poudriere or not. It m= ay be that if you build jsoncpp using poudriere, devel/libc++ might not be installed in your jail. In that case, of course you won't see the problem.= I believe you could try doing a bulk poudriere build with devel/libc++ and devel/jsoncpp if you really want to see the problem in poudriere. In any case, inside or outside the jail, I believe it's safe (and correct) = to remove the LD_LIBRARY_PATH. --=20 You are receiving this mail because: You are on the CC list for the bug.=