This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Shared library runpath trouble in Solaris.


    From:  Ian Lance Taylor <ian@cygnus.com>
    Date:  Mon, 10 Nov 1997 11:42:33 -0500

    This is not a good idea, and, nothing personal, but I've explained why
    so many times that I weary of doing it again.  Perhaps we need a
    developers FAQ to answer this.  The short version is that if you
    always pass a -R option to the linker, then your programs become
    dependent on directories which may be NFS mounted, and programs may
    hang unnecessarily when an NFS server goes down.  SunOS effectively
    always passed a -R option for every -L option; this was a bad idea,
    and so it was removed for Solaris.  We should not recreate it.

This is not exactly same what SunOS does, here we add -R for each
compiler generated path, excluding relative ones (-B../ for example). 
I think this is part of the compiler infrastructure.  
Anyway, I agree that this creates unnecessary lookups.

The problem is mainly g++ problem.  If the compiler is installed over NFS,
stdc++ library has to be present anyway, and if multilibs are used,
just copying it into /usr/lib does not work.
    
    I agree that there is a problem here, and I agree that it would be
    nice to fix it, but I do not think that this is the fix.  This can be
    fixed in the linker, but I do not know how to fix it in the compiler.

I'd say it is essential to fix it.  And the linker can not be fixed
to undo NFS mounts, only to optimize unused directories away, as far
as I can see it.







Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]