Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Feb 2019 10:41:59 -0500
From:      Diane Bruce <db@db.net>
To:        Eugene Grosbein <eugen@grosbein.net>
Cc:        sgk@troutmask.apl.washington.edu, "Russell L. Carter" <rcarter@pinyon.org>, FreeBSD Ports ML <freebsd-ports@freebsd.org>
Subject:   Re: FreeCAD 0.17 && /lib//libgcc_s.so.1
Message-ID:  <20190217154159.GB96676@night.db.net>
In-Reply-To: <4afa5358-4190-6ff3-1b5d-1c4e324abf38@grosbein.net>
References:  <a2102b4e-7d7a-7d5b-2ba1-b9a14f8574f6@pinyon.org> <f6a45ec9-7ae4-d9ba-f71c-f2ef8c235039@grosbein.net> <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>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190217154159.GB96676>