From owner-freebsd-ports@freebsd.org Sun Feb 17 05:57:00 2019 Return-Path: Delivered-To: freebsd-ports@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 1A11214E41DC for ; Sun, 17 Feb 2019 05:57:00 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A3DF387454 for ; Sun, 17 Feb 2019 05:56:58 +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 x1H5uu7V091576 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 16 Feb 2019 21:56:56 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id x1H5utnZ091575; Sat, 16 Feb 2019 21:56:55 -0800 (PST) (envelope-from sgk) Date: Sat, 16 Feb 2019 21:56:55 -0800 From: Steve Kargl To: Eugene Grosbein Cc: "Russell L. Carter" , FreeBSD Ports ML Subject: Re: FreeCAD 0.17 && /lib//libgcc_s.so.1 Message-ID: <20190217055655.GA91549@troutmask.apl.washington.edu> Reply-To: sgk@troutmask.apl.washington.edu References: <20190217051109.GA91424@troutmask.apl.washington.edu> <692e3772-9b06-03fa-790b-73117f3c6ec8@grosbein.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <692e3772-9b06-03fa-790b-73117f3c6ec8@grosbein.net> User-Agent: Mutt/1.11.2 (2019-01-07) X-Rspamd-Queue-Id: A3DF387454 X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [1.95 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[sgk@troutmask.apl.washington.edu]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_SPAM_SHORT(0.94)[0.944,0]; NEURAL_HAM_LONG(-0.34)[-0.337,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[washington.edu]; AUTH_NA(1.00)[]; REPLYTO_ADDR_EQ_FROM(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_MED(-0.20)[21.76.95.128.list.dnswl.org : 127.0.11.2]; MX_GOOD(-0.01)[cached: troutmask.apl.washington.edu]; NEURAL_SPAM_MEDIUM(0.57)[0.572,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:73, ipnet:128.95.0.0/16, country:US]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(0.08)[ip: (0.16), ipnet: 128.95.0.0/16(0.22), asn: 73(0.10), country: US(-0.07)] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2019 05:57:00 -0000 On Sun, Feb 17, 2019 at 12:37:36PM +0700, Eugene Grosbein wrote: > 17.02.2019 12:11, Steve Kargl wrot: > > > > > There is a problem with the order of libgcc_s.so.1 > > in the cache created by ldconfig. rtld will use > > the first one it finds. If it fails, it fails. It > > does not look to see if there is a second entry. > > If binary needs specific version of libgcc_s.so.1 installed > with gcc8 port/package, then building system must use specific > rpath, so rtld would not use "the first one it finds". This is a well-known problem with libgcc_s.so.1 and gfortran. You can state whatever you believe should happen, but it does not seem to work that. You have a few options: 1) Add -static to your options; 2) Use LD_LIBRARY_PATH, LD_RUN_PATH to point to /usr/local/lib/gcc8; 3) Add -Wl,-rpath=/usr/local/lib/gcc8 to FFLAGS in /etc/make.conf (check syntax for this one); 4) bump the major library version number for /lib/libgcc.so.1 to 2; 5) fix rtld to not fail on the first found library in the cache. Iterated over all entries and only fail if the library isn't found; 6) rename /lib/libgcc_s.so.1 to /lib/libllvm_s.so.1 and teach llvm/clang/rtld to not misappropriate a well-known GCC library name. -- Steve