From owner-freebsd-ports@freebsd.org Sun Feb 17 15:42:05 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 9DCC214F758B for ; Sun, 17 Feb 2019 15:42:05 +0000 (UTC) (envelope-from db@db.net) Received: from artemis.db.net (artemis.db.net [45.32.229.41]) by mx1.freebsd.org (Postfix) with ESMTP id F2F807289E for ; Sun, 17 Feb 2019 15:42:03 +0000 (UTC) (envelope-from db@db.net) Received: from night.db.net (artemis.db.net [45.32.229.41]) by artemis.db.net (Postfix) with ESMTP id 36F75101F5; Sun, 17 Feb 2019 15:42:02 +0000 (UTC) Received: by night.db.net (Postfix, from userid 1000) id CD2DA39874; Sun, 17 Feb 2019 10:41:59 -0500 (EST) Date: Sun, 17 Feb 2019 10:41:59 -0500 From: Diane Bruce To: Eugene Grosbein Cc: sgk@troutmask.apl.washington.edu, "Russell L. Carter" , FreeBSD Ports ML Subject: Re: FreeCAD 0.17 && /lib//libgcc_s.so.1 Message-ID: <20190217154159.GB96676@night.db.net> References: <20190217051109.GA91424@troutmask.apl.washington.edu> <692e3772-9b06-03fa-790b-73117f3c6ec8@grosbein.net> <20190217055655.GA91549@troutmask.apl.washington.edu> <532b1923-33b4-d0c7-3499-175900c98d9e@grosbein.net> <20190217061920.GB91668@troutmask.apl.washington.edu> <4afa5358-4190-6ff3-1b5d-1c4e324abf38@grosbein.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4afa5358-4190-6ff3-1b5d-1c4e324abf38@grosbein.net> User-Agent: Mutt/1.11.1 (2018-12-01) X-Rspamd-Queue-Id: F2F807289E X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [3.40 / 15.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.93)[0.930,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[db.net]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.89)[0.895,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: mx1-us2.ppe-hosted.com]; NEURAL_SPAM_LONG(0.43)[0.425,0]; R_SPF_NA(0.00)[]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:20473, ipnet:45.32.224.0/21, country:US]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(0.16)[asn: 20473(0.88), 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 15:42:05 -0000 On Sun, Feb 17, 2019 at 01:35:31PM +0700, Eugene Grosbein wrote: > 17.02.2019 13:19, Steve Kargl wrote: > > > For whatever reason, there are situations where the rpath > > isn't set in the library. Read the rtld manpage. You're > > hitting #5 in the list. > > Our package building system sets rpath for dependants of gcc8, > so Fortran libraries (and others) do have rpath for its runtime. > > Setting rpath for resulting binary should solve the problem. No no no no no. Not for an interpreter. The interpreter doesn't 'know' you are about to load a binary module that needs libgcc_s and until it loads something that uses gfortran it doesn't matter which libgcc_s so it picks the 'wrong' one. As my wiki page article says: We can rename our libgcc (Yes other complications but...) We can fix our system libgcc to have the missing functions/data that current libgcc has then bump our version We can use a specific port which PRELOADs the gfortran libgcc_s.so e.g. python2_gfortran8 or whatever. (What a mess and it's ugly but it would work) Individual python ports could be modified to do the PRELOAD with a tiny sh script e.g. opencad could envoke a small sh script that then starts the python interpreter. This would mean exposing the PATH from Mk/USES/fortan.mk e.g. we currently do this: FFLAGS+= -Wl,-rpath=${LOCALBASE}/lib/gcc${_GCC_VER} FCFLAGS+= -Wl,-rpath=${LOCALBASE}/lib/gcc${_GCC_VER} LDFLAGS+= -Wl,-rpath=${LOCALBASE}/lib/gcc${_GCC_VER} \ We'd need FRPATH=${LOCALBASE}/lib/gcc${_GCC_VER} exposed blah. I finally just looked at openscad it's a binary not a python script As Steve sez it's missing the -Wl,-rpath stuff then - Diane -- - db@FreeBSD.org db@db.net http://artemis.db.net/~db