[llvm-dev] Undefined symbols in llvm-objdump linkage on x86_64-apple-darwin15

Jack Howarth via llvm-dev llvm-dev at lists.llvm.org
Tue May 24 10:22:03 PDT 2016


On Tue, May 24, 2016 at 12:08 PM, Reid Kleckner <rnk at google.com> wrote:
> Kevin Enderby added those symbol uses in r270491. It has a cmake
> feature test, and all the uses of those symbols appear bracketed in
> HAVE_LIBXAR, so I don't know what went wrong for you.

The trigger for this build failure is the usage of
-DLLVM_BUILD_EXTERNAL_COMPILER_RT:BOOL=ON. If I drop that cmake
option, the linkage failure for llvm-objdump disappears.

>
> On Tue, May 24, 2016 at 8:07 AM, Jack Howarth via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
>> Is anyone else seeing a bootstrap failure on x86_64-apple-darwin15 in
>> current trunk?
>>
>> [ 95%] Linking CXX executable ../../bin/llvm-objdump
>> Undefined symbols for architecture x86_64:
>>   "_xar_serialize", referenced from:
>>       DumpBitcodeSection(llvm::object::MachOObjectFile*, char const*,
>> unsigned int, bool, bool, bool, std::__1::basic_string<char,
>> std::__1::char_traits<char>, std::__1::allocator<char> >) in
>> MachODump.cpp.o
>>   "_xar_file_first", referenced from:
>>       DumpBitcodeSection(llvm::object::MachOObjectFile*, char const*,
>> unsigned int, bool, bool, bool, std::__1::basic_string<char,
>> std::__1::char_traits<char>, std::__1::allocator<char> >) in
>> MachODump.cpp.o
>>   "_xar_iter_new", referenced from:
>>       DumpBitcodeSection(llvm::object::MachOObjectFile*, char const*,
>> unsigned int, bool, bool, bool, std::__1::basic_string<char,
>> std::__1::char_traits<char>, std::__1::allocator<char> >) in
>> MachODump.cpp.o
>>   "_xar_prop_first", referenced from:
>>       DumpBitcodeSection(llvm::object::MachOObjectFile*, char const*,
>> unsigned int, bool, bool, bool, std::__1::basic_string<char,
>> std::__1::char_traits<char>, std::__1::allocator<char> >) in
>> MachODump.cpp.o
>>   "_xar_extract_tobuffersz", referenced from:
>>       DumpBitcodeSection(llvm::object::MachOObjectFile*, char const*,
>> unsigned int, bool, bool, bool, std::__1::basic_string<char,
>> std::__1::char_traits<char>, std::__1::allocator<char> >) in
>> MachODump.cpp.o
>>   "_xar_open", referenced from:
>>       DumpBitcodeSection(llvm::object::MachOObjectFile*, char const*,
>> unsigned int, bool, bool, bool, std::__1::basic_string<char,
>> std::__1::char_traits<char>, std::__1::allocator<char> >) in
>> MachODump.cpp.o
>>   "_xar_prop_get", referenced from:
>>       DumpBitcodeSection(llvm::object::MachOObjectFile*, char const*,
>> unsigned int, bool, bool, bool, std::__1::basic_string<char,
>> std::__1::char_traits<char>, std::__1::allocator<char> >) in
>> MachODump.cpp.o
>>   "_xar_close", referenced from:
>>       DumpBitcodeSection(llvm::object::MachOObjectFile*, char const*,
>> unsigned int, bool, bool, bool, std::__1::basic_string<char,
>> std::__1::char_traits<char>, std::__1::allocator<char> >) in
>> MachODump.cpp.o
>>   "_xar_prop_next", referenced from:
>>       DumpBitcodeSection(llvm::object::MachOObjectFile*, char const*,
>> unsigned int, bool, bool, bool, std::__1::basic_string<char,
>> std::__1::char_traits<char>, std::__1::allocator<char> >) in
>> MachODump.cpp.o
>>   "_xar_iter_free", referenced from:
>>       DumpBitcodeSection(llvm::object::MachOObjectFile*, char const*,
>> unsigned int, bool, bool, bool, std::__1::basic_string<char,
>> std::__1::char_traits<char>, std::__1::allocator<char> >) in
>> MachODump.cpp.o
>>   "_xar_file_next", referenced from:
>>       DumpBitcodeSection(llvm::object::MachOObjectFile*, char const*,
>> unsigned int, bool, bool, bool, std::__1::basic_string<char,
>> std::__1::char_traits<char>, std::__1::allocator<char> >) in
>> MachODump.cpp.o
>> ld: symbol(s) not found for architecture x86_64
>> clang: error: linker command failed with exit code 1 (use -v to see invocation)
>> tools/llvm-objdump/CMakeFiles/llvm-objdump.dir/build.make:173: recipe
>> for target 'bin/llvm-objdump' failed
>> make[2]: *** [bin/llvm-objdump] Error 1
>> make[2]: Target 'tools/llvm-objdump/CMakeFiles/llvm-objdump.dir/build'
>> not remade because of errors.
>> CMakeFiles/Makefile2:21861: recipe for target
>> 'tools/llvm-objdump/CMakeFiles/llvm-objdump.dir/all' failed
>> make[1]: *** [tools/llvm-objdump/CMakeFiles/llvm-objdump.dir/all] Error 2
>> _______________________________________________
>> LLVM Developers mailing list
>> llvm-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


More information about the llvm-dev mailing list