[cfe-dev] Trouble building libc++

Chris Lattner clattner at apple.com
Tue May 11 18:59:20 PDT 2010


On May 11, 2010, at 6:56 PM, David Leimbach wrote:
> I modified the buildit file to remove ppc and 386 -arch from my build targets, but made no other change and found that I'm missing a file:
> 
> + g++ -dynamiclib -nodefaultlibs -arch x86_64 -current_version 1 -compatibility_version 1 -o libc++.1.dylib algorithm.o bind.o chrono.o condition_variable.o hash.o ios.o iostream.o locale.o memory.o mutex.o new.o random.o stdexcept.o strstream.o system_error.o thread.o utility.o valarray.o -install_name /usr/lib/libc++.dylib -Wl,-reexport_library,/usr/lib/libc++abi.dylib /usr/lib/libSystem.B.dylib
> ld: file not found: /usr/lib/libc++abi.dylib
> collect2: ld returned 1 exit status
> 
> Is libc++abi.dylib part of another project?   

Ah, this is a pretty big current gotcha with libc++.  libc++ only implements the C++ standard library, but does not (yet) implement all of the C++ ABI routines specified by the itanium C++ ABI.  Internally, we have factored that code out of libstdc++ (this is largely code that lives in "libsup++") into a library currently called libc++abi.dylib.

For purposes of bringup, I think it should be enough to link to libstdc++ instead of libc++abi.

-Chris



More information about the cfe-dev mailing list