Subject: Re: build whacked from change?
To: None <>
From: Chuck McManis <>
List: current-users
Date: 04/25/2000 20:08:54
At 08:27 PM 4/25/00 -0500, John Darrow wrote:
>The problem is as follows:
>In 1.110 and before, the linker failed to get interlibrary
>dependencies right when using DESTDIR.

Fair enough.

>In 1.111 mycroft added '-R${DESTDIR}/usr/lib' to the link line.
>This fixed the interlibrary dependencies, but broke other things, since
>-R (passed to the linker) is also used for run-time shared library paths,
>and now at run-time the resulting programs looked for their shared libraries
>in ${DESTDIR}/usr/lib.  Sometimes this resulted in subtle failures during
>the next build process, when as soon as a new (and possibly incompatible)
>library went into place in DESTDIR, the build tools stopped working, due
>to running with that new library.
>In 1.112 mrg changed the -R to -rpath-link, which sets _only_
>the interlibrary depend path, but not the run-time linker path.  This fixed
>both problems on platforms.
>Unfortunately, the old gnu ld was never hacked to support -rpath-link (the
>way it was for -R/-rpath) and as a result, ports using the old linker fail
>during DESTDIR builds.  However, the only machines using said linker (in
>current) are arm32, ns32k, vax, and any i386, m68k, or sparc still running
>a.out, and as a result the breakage didn't show up until someone tried
>building using one of these platforms.

Sigh. I was wrong, it *IS* one of those stupid "we changed the toolchain 
and the build at the same time" kind of bugs. I realize I'm pissing in the 
wind asking for some kind of reasonable fix to this insanity of changing 
the build tools on a <relative> whim. So I'll not even go that far. How 
about this, if you have "commit" privileges to the CVS tree and you change 
something in the *BUILD* aspect (.mk files, egcs executables, etc) please 
send a message to current-users. The CVS source update file is too dense 
and the discussions of problems (like this one) and the changes to commit 
them, get lost if you don't send a "HEADS UP" type message.

Also note that FreeBSD doesn't have this kludgery in their ld system, has 
anyone checked to see why not? Maybe someone fixed the problem in a 
compatible way over there.

>I don't know whether or not a.out has the same interlibrary issues as the
>-rpath-link is meant to fix.  I have a feeling it doesn't or else there
>would have probably been complaints a long time ago.  In that case, it
>should be sufficient to modify gnusrc/gnu/ld/ld/ld.c to detect the
>-rpath-link option and just ignore it and its value:

No patch necessary per se. My fix of putting quotes around it at least gets 
it ignored by the current ld on VAX.

Your friendly curmudgeon,