From owner-freebsd-ports@FreeBSD.ORG Mon Jul 12 03:01:15 2010 Return-Path: <owner-freebsd-ports@FreeBSD.ORG> Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B01E1065697; Mon, 12 Jul 2010 03:01:15 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id ADAF88FC14; Mon, 12 Jul 2010 03:01:12 +0000 (UTC) Received: by wyb34 with SMTP id 34so3577358wyb.13 for <multiple recipients>; Sun, 11 Jul 2010 20:01:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:reply-to :in-reply-to:references:date:message-id:subject:from:to:cc :content-type; bh=nRY6b/l1aFe2nYNVue7iRqNVRD81eLcLmNWhar80flc=; b=FvMPo+d1Wqg1Y+StKm95Yyqy7hAmOIZWjl5Q9eaWpZ+FOy/ViP23xqG6xrhChTs9lO 0rk54lZb7s6CyazJW1MxcSaqY9DE6J032D56zh8wtp1AxzEw2IAKetF/Z6tHa/lfIlUn wCVmBEc43VmiJUGWyAYcAywEYL7pmGQjWtETM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; b=scvRHRghvX7fVwmLUYoN4S+8cQPezRSunvbUSMU20GkgGV03xf0efP37p7XCluEGOI GzrOjuWEjLI3aWjuFXc1sWf3qDPKlMvIBKx9LUjiK0tVUzvGngF/q1fHhrU6MZ1VCTB7 WWdIVr1KE+340JhlA/mVNSGYjp6A5WWxHwvr4= MIME-Version: 1.0 Received: by 10.216.232.229 with SMTP id n79mr3573356weq.52.1278903671406; Sun, 11 Jul 2010 20:01:11 -0700 (PDT) Received: by 10.216.171.10 with HTTP; Sun, 11 Jul 2010 20:01:11 -0700 (PDT) In-Reply-To: <86eifanipd.fsf@gmail.com> References: <AANLkTimUd-yh-HFsYTDZxP0XsdIywu2Oks0LY6Pz1lYS@mail.gmail.com> <86eifanipd.fsf@gmail.com> Date: Mon, 12 Jul 2010 03:01:11 +0000 Message-ID: <AANLkTinqr_1Vj8koHh1vojterWJtri-izNVBZB_pEpkr@mail.gmail.com> From: "b. f." <bf1783@googlemail.com> To: Anonymous <swell.k@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Cc: Doug Barton <dougb@freebsd.org>, freebsd-ports@freebsd.org Subject: Re: graphics/png does not compile with gcc 4.5.1 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bf1783@gmail.com List-Id: Porting software to FreeBSD <freebsd-ports.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-ports>, <mailto:freebsd-ports-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-ports> List-Post: <mailto:freebsd-ports@freebsd.org> List-Help: <mailto:freebsd-ports-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-ports>, <mailto:freebsd-ports-request@freebsd.org?subject=subscribe> X-List-Received-Date: Mon, 12 Jul 2010 03:01:15 -0000 On 7/11/10, Anonymous <swell.k@gmail.com> wrote: > "b. f." <bf1783@googlemail.com> writes: ... > Did you miss ports/148196? ld(1) ignores libmap.conf and will try to I did miss it, but it doesn't really surprise me. I've only seen discussion of libmap.conf(5) with reference to rtld(1), and AFAIK ld(1) doesn't directly invoke rtld to find libraries during linking, but instead performs it's own search, that only partially mimics rtld (See comments in /usr/src/contrib/binutils/ld/emultempl/elf32.em). The ld search seems to have been adapted from the vanilla GNU binutils for FreeBSD in 1999, before libmap.conf was first added as an optional hack of rtld for testing different threading libraries on FreeBSD in 2003. I suppose it's arguable that ld(1) should respect libmap.conf. I haven't been troubled by this behavior because I don't rely on libmap.conf -- I renumbered my gcc4*-related libraries and I use -rpath directives. > link from libs in /usr/lib before $LOCALBASE/lib if it can unless you > alter linker hints. For any lib specified with `-l' I don't think even > hints are used. If they were, for anything other than the default base system search directories, we would not be adding so many LDFLAGS in ports. ... > I don't think any suid/sgid app invoke gcc/ld during build. Besides, > libmap.conf won't affect gcc/ld because they're statically linked. OTOH, > smth like COMPILER_PATH=$LOCALBASE/bin has more chance breaking build in > an obscure way. You are probably right about suid/sgid, but I prefer to sidestep the issue entirely. I wasn't speculating as to the mechanism by which remapping affected the build, only reporting that I had been shown results where someone claimed that this was the case, in an otherwise vanilla build. I cannot account for the differences -- perhaps that person had really made some other changes that he had overlooked. >> Also, when updating or reinstalling ports, I would first deinstall the >> old versions (including old versions of the shared libraries that may >> be in *compat*) before rebuilding the new versions, to avoid any >> linking problems. > > The order of paths in linker hints makes that unlikely. And direct > linking requires `-L' option anyway except for gcc specific libs. Yes, but indirect doesn't, and many such problems have occurred in the past, sometimes because of sloppy additions of -L. b.