From owner-freebsd-hackers@freebsd.org Thu May 10 22:09:52 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05D6FFD87DD for ; Thu, 10 May 2018 22:09:52 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 86A156DB07 for ; Thu, 10 May 2018 22:09:51 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.15.2/8.15.2) with ESMTPS id w4AM9nl2075802 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Thu, 10 May 2018 15:09:49 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id w4AM9nBR075801 for freebsd-hackers@freebsd.org; Thu, 10 May 2018 15:09:49 -0700 (PDT) (envelope-from sgk) Date: Thu, 10 May 2018 15:09:49 -0700 From: Steve Kargl To: freebsd-hackers@freebsd.org Subject: Re: Runtime loader issue Message-ID: <20180510220949.GA74424@troutmask.apl.washington.edu> Reply-To: sgk@troutmask.apl.washington.edu References: <20180509234551.GA39526@troutmask.apl.washington.edu> <20180510190549.GB14916@britannica.bec.de> <20180510194823.GA60567@troutmask.apl.washington.edu> <20180510202227.GA6592@britannica.bec.de> <20180510202536.GA74173@troutmask.apl.washington.edu> <20180510210157.GA17726@britannica.bec.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180510210157.GA17726@britannica.bec.de> User-Agent: Mutt/1.9.2 (2017-12-15) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 May 2018 22:09:52 -0000 On Thu, May 10, 2018 at 11:01:57PM +0200, Joerg Sonnenberger wrote: > On Thu, May 10, 2018 at 01:25:36PM -0700, Steve Kargl wrote: > > On Thu, May 10, 2018 at 10:22:27PM +0200, Joerg Sonnenberger wrote: > > > > > > Again, you are missing that the situation would happen just the same if > > > the base compiler is GCC 4.2.1 and not Clang. > > > > > > > FreeBSD could have stayed in-step with the times. > > FreeBSD or any other system could be updated the GCC version for every > release and there would still appear a newer GCC version that requires > an even newer libgcc_s.so in the release life time. Heck, the very same > problem happens in the other direction as well, i.e. if you are forced > to use an *older* GCC and pick up its libgcc_s.so. > If, as you assert, FreeBSD's runtime loader isn't meant to deal with name clashes, then why does ldconfig place conflicting names into the list of hints? % ldconfig -r | grep libgcc_s 6:-lgcc_s.1 => /lib/libgcc_s.so.1 716:-lgcc_s.1 => /usr/local/lib/gcc7/libgcc_s.so.1 Shouldn't ldconfig refuse to add 716 and complain bitterly to the user to fix the conflict? Shouldn't the documentation that comes with FreeBSD explain that conflicting names are disallowed. In looking at an objdump of lib/gcc7/libgfortran.so.4, one finds Dynamic Section: NEEDED libquadmath.so.0 NEEDED libm.so.5 NEEDED libgcc_s.so.1 NEEDED libc.so.7 SONAME libgfortran.so.4 RPATH /usr/local/lib/gcc7 Why isn't the runtime loader looking in RPATH for the libraries and then falling back to looking in the list of hints. I find your arguments to be somewhat diminished by the fact FreeBSD re-uses a filename from a well-known and (much) older software project, and somehow its the other project's fault for the problem with a name clash. -- Steve