incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Travis Vitek" <Travis.Vi...@roguewave.com>
Subject RE: ABI problem on Darwin (was: Re: [VOTE] stdcxx 4.2.1 release)
Date Tue, 29 Apr 2008 20:56:04 GMT
 

>Eric Lemings wrote:
> 
>Well I see one small problem already for which there is 
>already a workaround.  The BUILDDIR variable is assigned a 
>value in makefile.in but it isn't set in the -install_name 
>option when linking the library for some odd reason.  In this 
>case, the 4.2.0 workaround -- already documented I believe -- 
>using DYDLD_LIBRARY_PATH is needed.
>
>Brad.

Yes, it looks like users will see failures because of the -install_name
linker option if things are left as-is. I did a clean build on OSX and I
get the following error message when trying to run any of the utilities,
tests or examples.

  $ ./vector
  dyld: Library not loaded: /lib/libstd12d.dylib
    Referenced from:
/private/tmp/vitek/stdcxx-4.2.1/build/tests/./vector
    Reason: image not found

  $ export DYLD_LIBRARY_PATH=/tmp/vitek/stdcxx-4.2.1/build/lib
  $ ./vector
  dyld: Library not loaded: /lib/libstd12d.dylib
    Referenced from:
/private/tmp/vitek/stdcxx-4.2.1/build/tests/./vector
    Reason: image not found

  $ export DYLD_LIBRARY_PATH=/tmp/vitek/stdcxx-4.2.1/build
  $ ./vector
  dyld: Library not loaded: /lib/libstd12d.dylib
    Referenced from:
/private/tmp/vitek/stdcxx-4.2.1/build/tests/./vector
    Reason: image not found

Since the absolute path /lib/libstd12d.dylib is hard-coded into the
libraries install_name, the dynamic linker won't load the
libstd12d.dylib that is found in the DYLD_LIBRARY_PATH. I modified
makefile.in to use '-install_name libstd12d.dylib' in hopes that it
would work, but I get the same result. The only way that I was able to
get something to work was to remove the -install_name flag from the
library link line and then use DYLD_LIBRARY_PATH so that the system
would find it.

I'm doing a rebuild now to make absolutely sure that everything is
working as expected.

Travis

Mime
View raw message