[cfe-dev] Linking error while building clang with Xcode

R Z via cfe-dev cfe-dev at lists.llvm.org
Wed Aug 26 09:26:04 PDT 2020


Hey there!
I'm using Xcode to build llvm, clang, clang-tools-extra, libcxx. I didn;t change anything in Xcode, so the selected scheme is "ALL_BUILDS".
The command I ran:
```
cmake -G Xcode -DLLVM_ENABLE_PROJECTS='clang;clang-tools-extra;libcxx;' -DCMAKE_INSTALL_PREFIX=/Users/me/Applications/llvm-project-master/bxinstall -DCMAKE_BUILD_TYPE=Release ../llvm
```
Here is the cmake log: https://pastebin.com/f9R72Xmd

Here's the error in xcode:
```
Ld /Users/me/Applications/llvm-project-master/buildx/Debug/lib/Debug/libc++.1.0.dylib normal x86_64
    cd /Users/me/Applications/llvm-project-master/llvm
    export MACOSX_DEPLOYMENT_TARGET=10.14
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -L/Users/me/Applications/llvm-project-master/buildx/Debug/lib/Debug -F/Users/me/Applications/llvm-project-master/buildx/Debug/lib/Debug -filelist /Users/me/Applications/llvm-project-master/buildx/projects/libcxx/src/LLVM.build/Debug/cxx_shared.build/Objects-normal/x86_64/c++.1.0.LinkFileList -install_name /libc++.1.0.dylib -Xlinker -rpath -Xlinker @loader_path/../lib -mmacosx-version-min=10.14 -Xlinker -object_path_lto -Xlinker /Users/me/Applications/llvm-project-master/buildx/projects/libcxx/src/LLVM.build/Debug/cxx_shared.build/Objects-normal/x86_64/c++.1.0_lto.o -Xlinker -no_deduplicate -dynamiclib -Wl,-headerpad_max_install_names -install_name @rpath/libc++.1.dylib -nodefaultlibs -lSystem -lc -lcxxabi_shared -Wl,-unexported_symbols_list,/Users/me/Applications/llvm-project-master/libcxx/src/../lib/libc++unexp.exp -Wl,-reexported_symbols_list,/Users/me/Applications/llvm-project-master/libcxx/src/../lib/libc++abi.v2.exp -Wl,-force_symbols_not_weak_list,/Users/me/Applications/llvm-project-master/libcxx/src/../lib/notweak.exp -Wl,-force_symbols_weak_list,/Users/me/Applications/llvm-project-master/libcxx/src/../lib/weak.exp -Wl,-reexported_symbols_list,/Users/me/Applications/llvm-project-master/libcxx/src/../lib/libc++abi-exceptions.exp -compatibility_version 1.0.0 -current_version 1.0.0 -Xlinker -dependency_info -Xlinker /Users/me/Applications/llvm-project-master/buildx/projects/libcxx/src/LLVM.build/Debug/cxx_shared.build/Objects-normal/x86_64/c++.1.0_dependency_info.dat -o /Users/me/Applications/llvm-project-master/buildx/Debug/lib/Debug/libc++.1.0.dylib

ld: library not found for -lcxxabi_shared
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```

Send help!
Thank you
RZ
Kindly choose reply-all while replying. I'm not subscribed to the mailing list.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200826/5c275a58/attachment.html>


More information about the cfe-dev mailing list