Hi all,

I'm running into a strange problem on HPUX 11i with gcc-3.4.2 that I think 
is related to collect2. 

For anyone who isn't familiar with it, HPUX has some interesting 
peculiarities when working with 32 bit executables - they use SHLIB_PATH 
instead of LD_LIBRARY_PATH, and, to make things more interesting, the 
linking and loading system ignores SHLIB_PATH unless you pass the +s flag 
to the linker.  By default any shared libraries you create will only work 
if shared libraries they reference are in exactly the same path as they 
were when the shared library was created.    I've had to rebuild the 
libstdc++.sl with the -Wl,+s flag so that it can find libgcc_s.sl from the 
SHLIB_PATH.

The strange behaviour I'm seeing is that if I link my shared libraries 
with -Wl,+s, then some of them work fine and find all of their libraries 
based on the SHLIB_PATH settings.  However, some of my libraries find 
everything *except* libstdc++.sl from the SHLIB_PATH  - these libraries 
only load if I put libstdc++.sl in the exact same location it was in when 
I built the library in the first place. 

My suspicion is that when collect2 relinks things it's not using the +s 
flag, and that is causing the behaviour I'm seeing...

Has anyone seen anything like this before?   Any suggestions on how I 
might resolve it? 

Warren

Reply via email to