[PATCH] D31272: Do not pass an explicit reexported symbol list when building libc++ dylib if also defining new/delete

Mehdi AMINI via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 27 22:49:21 PDT 2017


mehdi_amini added a comment.

In https://reviews.llvm.org/D31272#711877, @EricWF wrote:

> In https://reviews.llvm.org/D31272#711876, @mehdi_amini wrote:
>
> > Strange. So installing the command line tools is not enough. It has to be that CMAKE_OSX_SYSROOT is only defined on Apple internal install maybe?
>
>
> Are you sure you're starting with a clean CMake build directory?


Yes. But now that I think about it, I'm using an internal branch, the issue has to come from that. I'll look deeper tomorrow!

>> I have this error:
>> 
>>   ld: requested re-export symbol operator new(unsigned long) is not from a dylib, but from lib/CMakeFiles/cxx_objects.dir/__/src/new.cpp.o
>>    file 'lib/CMakeFiles/cxx_objects.dir/__/src/new.cpp.o' for architecture x86_64
> 
> Interesting. That seems to suggest that `libc++abi.dylib` doesn't provide the definition at all. Not necessarily that
>  the duplicate definitions are causing this.

I think it says that the list of reexport explicitly mentions a symbol that comes from an object (new.cpp.o) and not another dylib. This error will happens whether the symbol is also in libc++abi or not.


https://reviews.llvm.org/D31272





More information about the cfe-commits mailing list