From owner-freebsd-ports@freebsd.org Sun Feb 17 15:15:14 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 8D61314F674A for ; Sun, 17 Feb 2019 15:15:14 +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 90AB071959 for ; Sun, 17 Feb 2019 15:15:13 +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 6E942FDCB; Sun, 17 Feb 2019 15:15:06 +0000 (UTC) Received: by night.db.net (Postfix, from userid 1000) id A6A6739874; Sun, 17 Feb 2019 10:15:01 -0500 (EST) Date: Sun, 17 Feb 2019 10:15:01 -0500 From: Diane Bruce To: Eugene Grosbein Cc: "Russell L. Carter" , FreeBSD Ports ML Subject: Re: FreeCAD 0.17 && /lib//libgcc_s.so.1 Message-ID: <20190217151501.GA68620@night.db.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.1 (2018-12-01) X-Rspamd-Queue-Id: 90AB071959 X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [3.42 / 15.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_SPAM_SHORT(0.86)[0.863,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[db.net]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.93)[0.926,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[mx1-us2.ppe-hosted.com,mx2-us2.ppe-hosted.com,mx1-us2.ppe-hosted.com,mx2-us2.ppe-hosted.com,mx1-us2.ppe-hosted.com,mx2-us2.ppe-hosted.com]; NEURAL_SPAM_LONG(0.48)[0.479,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.89), 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:15:14 -0000 On Sun, Feb 17, 2019 at 08:21:00AM +0700, Eugene Grosbein wrote: > 17.02.2019 8:02, Russell L. Carter wrote: > > > Greetings, > > > > Restarting the FreeCAD 0.17 discussion on a different tangent. > > ... > > /usr/local/lib/gcc8/libgfortran.so.5 not found > > > > This is probably fatal to practical use of FreeCAD on FreeBSD. I was > > able to open most of my previous models, created on debian-testing, > > but some were fail. > > > > 2 threads, no happy ending: > > > > https://lists.freebsd.org/pipermail/freebsd-ports/2018-May/113336.html > > https://lists.freebsd.org/pipermail/freebsd-python/2016-January/009672.html > > > > Question to experienced porters, how is this best practice solved? I've just updated my wiki entry. I think the old entry was way too long so the TLDR; solution I suggest comes first https://wiki.freebsd.org/libgcc%20problem#preview The problem is simple. Python code is not linked with libgcc_s so the system 'fake' libgcc_s is preferred over the one that Fortran prefers since python doesn't 'know' about gfortran at all no RPATH is ever seen in time. Hence if a python binary module is loaded that does use libgcc_s.so it's the system libgcc_s not the one that Fortran "needs". > > I've just did "pkg install gcc8" using my FreeBSD 11.2/amd64 system and got this: > > # ldd /usr/local/lib/gcc8/libgfortran.so.5 > /usr/local/lib/gcc8/libgfortran.so.5: > libquadmath.so.0 => /usr/local/lib/gcc8/libquadmath.so.0 (0x80146e000) > libz.so.6 => /lib/libz.so.6 (0x8016ad000) > libm.so.5 => /lib/libm.so.5 (0x8018c5000) > libgcc_s.so.1 => /usr/local/lib/gcc8/libgcc_s.so.1 (0x801af3000) > libc.so.7 => /lib/libc.so.7 (0x800823000) > > So, /usr/local/lib/gcc8/libgfortran.so.5 does not depend on /lib/libgcc_s.so.1 > but on /usr/local/lib/gcc8/libgcc_s.so.1 in normal case. > > I assume something is broken in your installation. Try removing gcc8 and reinstalling > it using package. No, it's as I outlined above. I have a possible longer term transparent workaround I've mentioned to @emaste but it will take some trivial port changes. Basically all we need is a pre-loader script for interpreters that run into this such as python. (I suspect there have to be other interpreters that run into this.) Perhaps something like python2_gfortran or the like, all it has to do is PRELOAD or modify the library path so we get the 'right' libgcc_s.so. - Diane -- - db@FreeBSD.org db@db.net http://artemis.db.net/~db