stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <>
Subject Re: ABI problem on Darwin
Date Wed, 30 Apr 2008 16:43:04 GMT
Eric Lemings wrote:
>> 1) In a program compiled and linked with 4.2.0 the user
>>     replaces libstd.dylib.4.2.0 with libstd.dylib.4.2.1.
>> 2) In a program compiled and linked with 4.2.1 the user
>>     replaces libstd.dylib.4.2.1 with libstd.dylib.4.2.0.
>> In both of these, the library is NOT in BUILDDIR/lib but
>> rather under PREFIX/lib (e.g., /usr/local/lib).
> In this situation, the user would have to set the DYLD_LIBRARY_PATH
> as they would have to set LD_LIBRARY_PATH on other Unix platforms.

I assume "this situation" refers to case (2) above. On most
platforms setting LD_LIBRARY_PATH can be avoided by installing
the lib in one of the usual locations that the dynamic linker
searches by default (e.g., /usr/lib or /usr/local/lib). Does
hardcoding BUILDDIR have any impact on this? (I can't tell
from the Mac OS X ld man page:

> In the first case, the user would encounter incompatible version
> error since 4.2.1 specifies version numbers in the library but
> 4.2.0 does not (i.e. it defaults to 0.0.0).  The 4.2.0 library
> would have to be linked with the corresponding flags or the 4.2.1
> library would have to be linked without these flags.

So 4.2.1 isn't forward compatible unless it's linked without
the flags added in STDCXX-488? I suppose we could live with


> In the second case, everything should work correctly, assuming
> the DYLD_LIBRARY_PATH variable is set.
> Brad.

View raw message