[M3devel] rpath woes

John Marino adacore at marino.st
Fri Jun 5 00:28:36 CEST 2015


On 6/4/2015 20:10, John Marino wrote:
> On 6/4/2015 20:05, Jay K wrote:
>> My understanding:
>> The modula-3 libraries, e.g. m3core,
>> are found from the rpath I put in, like
> 
>> $ORIGIN:$ORIGIN/../lib
>> Other libraries like libc.so are found by full path, that is already
>> correct at build time?
>> Do users want to possibly have a private /usr/local/lib/libc.so?
>> I hadn't considered that.
>> Or build is "staged" and the full paths aren't correct at build time?
>> I think I hadn't considered that either.
>> You are on the right track, looking in this area.
>> Did you notice the "portable rpath" thingy that make-dist.py changes?
> 
> I believe make-dist.py is hard-coding portable rpath which means it's
> hardcoding $ORIGIN I think, but it's not working.
> 
> The origin flag is set, but $ORIGIN itself is not.  I think this is a bug.
> 
> We prefer to use hardcoded rpaths in ports, but I will settle for
> $ORIGIN if it works.  $ORIGIN works on FreeBSD and DragonFly, but not
> NetBSD (not sure about OpenBSD, I'd guess it does though).
> 
> The "-Wl,rpath," looks wrong to me, but sticking $ORIGIN here didn't
> work either.

Okay, I have this solved.
The problem is FREEBSD.common is obsolete (origin linker flags were
wrong)  I basically copied LINUX.common contents to it and now
everything works as expected.

I've updated the port here:
http://www.freshports.org/lang/modula3/

The patch for FREEBSD.common is here:
https://svnweb.freebsd.org/ports/head/lang/modula3/files/

I think all references to FREEBSD4 could be removed (as I did in the
patch).  FreeBSD4 was EOL in Jan 2007.

So I'm basically done until its time to change the port to use the C
backend (and/or bootstrap it to DragonFly)

John






More information about the M3devel mailing list