libio regressions, shared libs.

Donn Terry donn@interix.com
Mon Jun 28 09:57:00 GMT 1999


I'm in the situation where I'm compiling and regressing the
whole tool path using a freshly built (and thus not installed
in the usual places) set of shared libraries.  To get the compiler
to compile anything, LD_LIBRARY_PATH must be set to where the
new shared libraries live.  (The compiler is built shared using
the new shared libs.)

libio regressions (at least; libstdc++ probably, and other maybe) use
the dejagnu procedure unix_load to start the compiler.  (Specifically
gcc/xgcc).

unix_load appears to have two problems:

1)  It tests to see if ld_library_path (lowercase) exists as a 
    TCL variable, and if so sets LD_LIBRARY_PATH to that value.
    It then unsets LD_LIBRARY_PATH, with a comment indicating
    that fixing something (doesn't say what) by using LD_LIBRARY_PATH
    is wrong.

    ... in my situation, that's, of course, the wrong thing to do
    because xgcc won't run unless it can find the shared library
    it was built against.

2)  (This may be a tcl bug).  The test for existence of
    ld_library_path always comes back true if the
    "global ld_library_path" at the beginning of unix_load is
    present.  Thus it ALWAYS unsets LD_LIBRARY_PATH.
    (This is when libio/testsuite/libio.exp has its set and
    definition of ld_library_path commented out.)

    (Or... there's another definition of ld_library_path I haven't
    found yet.)

test_libio probably has a bug as well in this case: setting
ld_library_path to "".

Any comments from the DejaGnu experts out there on what the nature
of the fix to this should be?  (I can imagine several, but I'd rather
pick a direction that will be acceptable the first time.)

My initial inclination: rip out the unsetenv's in unix_load and
the explict nulling of ld_library_path in test_libio, but I suspect
that I've missed the point of these fixes to begin with.

Donn
-- 

===================================================
Donn Terry                  mailto:donn@interix.com
Softway Systems, Inc.        http://www.interix.com
2850 McClelland Dr, Ste. 1800   Ft.Collins CO 80525
Tel: +1-970-204-9900           Fax: +1-970-204-9951
===================================================


More information about the Gcc-bugs mailing list