| | |
|------------------|-----------------|…
|Previous ID | SR-9292 |
|Radar | rdar://problem/69073152 |
|Original Reporter | @ainopara |
|Type | Bug |
<details>
<summary>Environment</summary>
swift version: DEVELOPMENT-SNAPSHOT-2018-11-01-a
swift pm version: DEVELOPMENT-SNAPSHOT-2018-11-01-a
Xcode: Version 10.1 (10B61)
Xcode Toolchain: Swift Development Snapshot 2018-11-01 (a)
</details>
<details>
<summary>Additional Detail from JIRA</summary>
| | |
|------------------|-----------------|
|Votes | 0 |
|Component/s | Package Manager |
|Labels | Bug, Screened |
|Assignee | None |
|Priority | Medium |
md5: 960dea92de539801c320fe8e5d36f09f
</details>
**Issue Description:**
After switching SwiftPM dependency version to \`.branch("master")\`, sourcekit-lsp now having llbuild as dependency which contains a target named \`llvmSupport\`
After executing
``` sh
swift package generate-xcodeproj --xcconfig-overrides overrides.xcconfig
```
Open the generated \`SourceKitLSP.xcodeproj\` trying to build it. First I found a error related to SR-8018 .
Due to generated xcodeproj do not add \`SWIFT_PACKAGE\` macro to \`GCC_PREPROCESSOR_DEFINITIONS\`, the workaround in COFF.h
``` c
#ifdef SWIFT_PACKAGE
#undef DEBUG
#endif
```
will not be triggered.
This issue can be fixed by manually adding \`SWIFT_PACKAGE=1\` to \`GCC_PREPROCESSOR_DEFINITIONS\` in project build settings.
Then I found build failed with error message:
``` none
Ld /Users/ainopara/Library/Developer/Xcode/DerivedData/SourceKitLSP-fnjsratimrzzuhcgogbpmfzxmawj/Build/Products/Debug/llvmSupport.framework/Versions/A/llvmSupport normal x86_64 (in target: llvmSupport)
cd /Users/ainopara/Documents/Projects/sourcekit-lsp
export MACOSX_DEPLOYMENT_TARGET=10.10
/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/ainopara/Library/Developer/Xcode/DerivedData/SourceKitLSP-fnjsratimrzzuhcgogbpmfzxmawj/Build/Products/Debug -F/Users/ainopara/Library/Developer/Xcode/DerivedData/SourceKitLSP-fnjsratimrzzuhcgogbpmfzxmawj/Build/Products/Debug -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -filelist /Users/ainopara/Library/Developer/Xcode/DerivedData/SourceKitLSP-fnjsratimrzzuhcgogbpmfzxmawj/Build/Intermediates.noindex/SourceKitLSP.build/Debug/llvmSupport.build/Objects-normal/x86_64/llvmSupport.LinkFileList -install_name @rpath/llvmSupport.framework/Versions/A/llvmSupport -Xlinker -rpath -Xlinker /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2018-11-01-a.xctoolchain/usr/lib/swift/macosx -mmacosx-version-min=10.10 -Xlinker -object_path_lto -Xlinker /Users/ainopara/Library/Developer/Xcode/DerivedData/SourceKitLSP-fnjsratimrzzuhcgogbpmfzxmawj/Build/Intermediates.noindex/SourceKitLSP.build/Debug/llvmSupport.build/Objects-normal/x86_64/llvmSupport_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -framework CoreServices -Xlinker -dependency_info -Xlinker /Users/ainopara/Library/Developer/Xcode/DerivedData/SourceKitLSP-fnjsratimrzzuhcgogbpmfzxmawj/Build/Intermediates.noindex/SourceKitLSP.build/Debug/llvmSupport.build/Objects-normal/x86_64/llvmSupport_dependency_info.dat -o /Users/ainopara/Library/Developer/Xcode/DerivedData/SourceKitLSP-fnjsratimrzzuhcgogbpmfzxmawj/Build/Products/Debug/llvmSupport.framework/Versions/A/llvmSupport
Undefined symbols for architecture x86_64:
"_AnnotateHappensAfter", referenced from:
llvm::ManagedStatic<std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >::operator->() in Debug.o
llvm::ManagedStatic<std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >::operator*() in Debug.o
llvm::ManagedStatic<llvm::sys::SmartMutex<false> >::operator*() in ErrorHandling.o
llvm::ManagedStatic<llvm::sys::SmartMutex<false> >::operator*() in Process.o
llvm::ManagedStatic<llvm::sys::SmartMutex<true> >::operator*() in Signals.o
llvm::ManagedStatic<std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >::operator*() in Signals.o
llvm::ManagedStatic<std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >::operator->() in Signals.o
...
"_AnnotateHappensBefore", referenced from:
llvm::ManagedStaticBase::RegisterManagedStatic(void* (*)(), void (*)(void*)) const in ManagedStatic.o
"_AnnotateIgnoreWritesBegin", referenced from:
llvm::ManagedStaticBase::RegisterManagedStatic(void* (*)(), void (*)(void*)) const in ManagedStatic.o
"_AnnotateIgnoreWritesEnd", referenced from:
llvm::ManagedStaticBase::RegisterManagedStatic(void* (*)(), void (*)(void*)) const in ManagedStatic.o
"llvm::raw_ostream::anchor()", referenced from:
vtable for llvm::circular_raw_ostream in circular_raw_ostream.o
"llvm::raw_ostream::operator<<(llvm::formatv_object_base const&)", referenced from:
llvm::json::ParseError::log(llvm::raw_ostream&) const in JSON.o
"llvm::isLegalUTF8String(unsigned char const**, unsigned char const*)", referenced from:
llvm::json::isUTF8(llvm::StringRef, unsigned long*) in JSON.o
"llvm::ConvertUTF32toUTF8(unsigned int const**, unsigned int const*, unsigned char**, unsigned char*, llvm::ConversionFlags)", referenced from:
toUTF8(unsigned int, llvm::MutableArrayRef<unsigned char>) in DJB.o
llvm::json::fixUTF8(llvm::StringRef) in JSON.o
"llvm::ConvertUTF8toUTF32(unsigned char const**, unsigned char const*, unsigned int**, unsigned int*, llvm::ConversionFlags)", referenced from:
chopOneUTF32(llvm::StringRef&) in DJB.o
llvm::json::fixUTF8(llvm::StringRef) in JSON.o
"llvm::SmallPtrSetImplBase::insert_imp_big(void const*)", referenced from:
llvm::SmallPtrSetImplBase::insert_imp(void const*) in CommandLine.o
"llvm::consumeUnsignedInteger(llvm::StringRef&, unsigned int, unsigned long long&)", referenced from:
std::__1::enable_if<!(std::numeric_limits<unsigned long>::is_signed), bool>::type llvm::StringRef::consumeInteger<unsigned long>(unsigned int, unsigned long&) in FormatVariadic.o
std::__1::enable_if<!(std::numeric_limits<unsigned long>::is_signed), bool>::type llvm::StringRef::consumeInteger<unsigned long>(unsigned int, unsigned long&) in JSON.o
"llvm::report_bad_alloc_error(char const*, bool)", referenced from:
llvm::safe_malloc(unsigned long) in CommandLine.o
llvm::safe_calloc(unsigned long, unsigned long) in FoldingSet.o
llvm::safe_malloc(unsigned long) in FoldingSet.o
llvm::safe_malloc(unsigned long) in StringSaver.o
llvm::safe_malloc(unsigned long) in Timer.o
llvm::SmallVectorTemplateBase<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, false>::grow(unsigned long) in YAMLTraits.o
llvm::safe_malloc(unsigned long) in YAMLTraits.o
...
"llvm::sys::path::is_relative(llvm::Twine const&, llvm::sys::path::Style)", referenced from:
ExpandResponseFile(llvm::StringRef, llvm::StringSaver&, void (*)(llvm::StringRef, llvm::StringSaver&, llvm::SmallVectorImpl<char const*>&, bool), llvm::SmallVectorImpl<char const*>&, bool, bool) in CommandLine.o
"llvm::sys::path::parent_path(llvm::StringRef, llvm::sys::path::Style)", referenced from:
ExpandResponseFile(llvm::StringRef, llvm::StringSaver&, void (*)(llvm::StringRef, llvm::StringSaver&, llvm::SmallVectorImpl<char const*>&, bool), llvm::SmallVectorImpl<char const*>&, bool, bool) in CommandLine.o
"llvm::sys::path::filename(llvm::StringRef, llvm::sys::path::Style)", referenced from:
(anonymous namespace)::CommandLineParser::ParseCommandLineOptions(int, char const* const*, llvm::StringRef, llvm::raw_ostream*) in CommandLine.o
"llvm::sys::Process::GetTimeUsage(std::__1::chrono::time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >&, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> >&, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> >&)", referenced from:
llvm::TimeRecord::getCurrentTime(bool) in Timer.o
"llvm::yaml::Stream::Stream(llvm::MemoryBufferRef, llvm::SourceMgr&, bool, std::__1::error_code*)", referenced from:
llvm::yaml::Input::Input(llvm::MemoryBufferRef, void*, void (*)(llvm::SMDiagnostic const&, void*), void*) in YAMLTraits.o
"llvm::yaml::Stream::Stream(llvm::StringRef, llvm::SourceMgr&, bool, std::__1::error_code*)", referenced from:
llvm::yaml::Input::Input(llvm::StringRef, void*, void (*)(llvm::SMDiagnostic const&, void*), void*) in YAMLTraits.o
"llvm::yaml::escape(llvm::StringRef, bool)", referenced from:
llvm::yaml::Output::scalarString(llvm::StringRef&, llvm::yaml::QuotingType) in YAMLTraits.o
"llvm::StringRef::split(llvm::SmallVectorImpl<llvm::StringRef>&, char, int, bool) const", referenced from:
llvm::Triple::Triple(llvm::Twine const&) in Triple.o
llvm::Triple::normalize(llvm::StringRef) in Triple.o
"vtable for llvm::raw_pwrite_stream", referenced from:
llvm::raw_pwrite_stream::raw_pwrite_stream(bool) in MD5.o
llvm::raw_pwrite_stream::raw_pwrite_stream(bool) in NativeFormatting.o
llvm::raw_pwrite_stream::raw_pwrite_stream(bool) in PrettyStackTrace.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"_del_curterm", referenced from:
terminalHasColors(int) in Process.o
"_set_curterm", referenced from:
terminalHasColors(int) in Process.o
"_setupterm", referenced from:
terminalHasColors(int) in Process.o
"_tigetnum", referenced from:
terminalHasColors(int) in Process.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```
At the same time, building sourcekit-lsp with
``` sh
swift build
```
will succeed.
The difference is that \`swift build\` will not generate a LLVMSupport.framework, in fact all the .o file generated with \`LLVMSupport\` target will only be linked when sourcekit-lsp generated and in this case swiftc is used to generate the binary rather than clang++.
Related fragment in \`.build/debug.yaml\`:
``` yaml
"C.sourcekit-lsp-debug.exe":
tool: shell
description: "Linking ./.build/x86_64-apple-macosx10.10/debug/sourcekit-lsp"
inputs: ["/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/Csourcekitd.build/sourcekitd.c.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/IndexStoreDB.build/IndexStoreDB.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/IndexStoreDB_CIndexStoreDB.build/CIndexStoreDB.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/IndexStoreDB_Core.build/Symbol.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/IndexStoreDB_Database.build/Database.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/IndexStoreDB_Database.build/DatabaseError.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/IndexStoreDB_Database.build/ImportTransaction.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/IndexStoreDB_Database.build/ReadTransaction.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/IndexStoreDB_Database.build/lmdb/mdb.c.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/IndexStoreDB_Database.build/lmdb/midl.c.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/IndexStoreDB_Index.build/FilePathIndex.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/IndexStoreDB_Index.build/FileVisibilityChecker.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/IndexStoreDB_Index.build/IndexDatastore.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/IndexStoreDB_Index.build/IndexStoreLibraryProvider.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/IndexStoreDB_Index.build/IndexSystem.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/IndexStoreDB_Index.build/StoreSymbolRecord.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/IndexStoreDB_Index.build/SymbolIndex.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/IndexStoreDB_Support.build/Concurrency-Mac.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/IndexStoreDB_Support.build/FilePathWatcher.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/IndexStoreDB_Support.build/Logging-Mac.mm.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/IndexStoreDB_Support.build/Logging-NonMac.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/IndexStoreDB_Support.build/Logging.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/IndexStoreDB_Support.build/Path.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/IndexStoreDB_Support.build/PatternMatching.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/APFloat.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/APInt.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/APSInt.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/Allocator.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/Atomic.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/Chrono.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/CommandLine.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/ConvertUTF.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/ConvertUTFWrapper.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/DJB.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/Debug.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/Errno.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/Error.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/ErrorHandling.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/FileUtilities.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/FoldingSet.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/FormatVariadic.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/Hashing.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/JSON.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/LineIterator.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/Locale.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/MD5.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/ManagedStatic.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/MathExtras.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/Memory.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/MemoryBuffer.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/Mutex.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/NativeFormatting.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/Options.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/Path.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/PrettyStackTrace.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/Process.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/Program.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/Signals.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/SmallPtrSet.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/SmallVector.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/SourceMgr.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/Statistic.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/StringExtras.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/StringMap.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/StringRef.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/StringSaver.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/TargetParser.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/Threading.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/TimeValue.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/Timer.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/ToolOutputFile.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/Triple.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/Twine.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/Unicode.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/UnicodeCaseFold.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/Valgrind.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/Watchdog.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/WithColor.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/YAMLParser.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/YAMLTraits.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/circular_raw_ostream.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LLVMSupport.build/Support/raw_ostream.cpp.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LanguageServerProtocol.build/ClientCapabilities.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LanguageServerProtocol.build/CodeActionKind.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LanguageServerProtocol.build/CompletionItem.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LanguageServerProtocol.build/CompletionItemKind.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LanguageServerProtocol.build/Connection.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LanguageServerProtocol.build/Diagnostic.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LanguageServerProtocol.build/DocumentHighlight.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LanguageServerProtocol.build/Error.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LanguageServerProtocol.build/InitializationOptions.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LanguageServerProtocol.build/Language.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LanguageServerProtocol.build/LanguageServer.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LanguageServerProtocol.build/Location.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LanguageServerProtocol.build/MarkupContent.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LanguageServerProtocol.build/Message.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LanguageServerProtocol.build/MessageRegistry.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LanguageServerProtocol.build/Messages.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LanguageServerProtocol.build/Position.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LanguageServerProtocol.build/PositionRange.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LanguageServerProtocol.build/Request.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LanguageServerProtocol.build/RequestID.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LanguageServerProtocol.build/ServerCapabilities.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LanguageServerProtocol.build/SymbolKind.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LanguageServerProtocol.build/TextDocumentContentChangeEvent.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LanguageServerProtocol.build/TextDocumentEdit.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LanguageServerProtocol.build/TextDocumentIdentifier.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LanguageServerProtocol.build/TextDocumentItem.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LanguageServerProtocol.build/TextDocumentSaveReason.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LanguageServerProtocol.build/TextEdit.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LanguageServerProtocol.build/VersionedTextDocumentIdentifier.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LanguageServerProtocol.build/WindowMessageType.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LanguageServerProtocol.build/WorkspaceFolder.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LanguageServerProtocol.build/WorkspaceSettings.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LanguageServerProtocolJSONRPC.build/JSONRPCConnection.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LanguageServerProtocolJSONRPC.build/MessageCoding.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/LanguageServerProtocolJSONRPC.build/MessageSplitting.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/SKCore.build/BuildSettingsProviderList.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/SKCore.build/BuildSystem.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/SKCore.build/CompilationDatabase.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/SKCore.build/CompilationDatabaseBuildSystem.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/SKCore.build/ExternalWorkspace.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/SKCore.build/FallbackBuildSettingsProvider.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/SKCore.build/Toolchain.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/SKCore.build/ToolchainRegistry.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/SKSupport.build/ByteString.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/SKSupport.build/Cancellation.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/SKSupport.build/Collection.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/SKSupport.build/FileSystem.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/SKSupport.build/Int.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/SKSupport.build/LineTable.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/SKSupport.build/Logging.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/SKSupport.build/Random.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/SKSupport.build/Result.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/SKSupport.build/dlopen.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/SKSwiftPMWorkspace.build/SwiftPMWorkspace.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/SourceKit.build/DocumentManager.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/SourceKit.build/SourceKitServer.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/SourceKit.build/Workspace.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/SourceKit.build/clangd/ClangLanguageServer.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/SourceKit.build/sourcekitd/CommentXML.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/SourceKit.build/sourcekitd/SwiftLanguageServer.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/SourceKit.build/sourcekitd/SwiftSourceKitFramework.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/sourcekit_lsp.build/main.swift.o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/libSwiftPM.dylib"]
outputs: ["/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/sourcekit-lsp"]
args: ["/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2018-11-01-a.xctoolchain/usr/bin/swiftc","-target","x86_64-apple-macosx10.10","-sdk","/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk","-F","/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks","-lc++","-g","-L","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug","-o","/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/sourcekit-lsp","-module-name","sourcekit_lsp","-lSwiftPM","-emit-executable","@/Users/ainopara/Documents/Projects/sourcekit-lsp/.build/x86_64-apple-macosx10.10/debug/sourcekit-lsp.product/Objects.LinkFileList"]
```
~~Is there anything I can do to workaround this issue too?~~
~~It seems the fact that both \`IndexStoreDB\` and \`llbuild\` has the target \`LLVMSupport\` may be the source of this issue. The target in \`llbuild\` named \`llvmSupport\` seems not identical to \`LLVMSupport\`, but the APFS on my mac is case insensitive file system.~~
~~The issue can be reproduced by build swift-package-manager project alone with generated xcodeproj.~~
Finally I got sourcekit-lsp build with generated xcodeproj by applying following modifications:
1. Add \`SWIFT_PACKAGE=1\` to \`GCC_PREPROCESSOR_DEFINITIONS\` in build settings of project \`SourceKitLSP\`.
2. Add \`-lsqlite3 -lncurses\` to \`OTHER_LDFLAGS\` in build settings of project \`SourceKitLSP\`. As hinted from <https://github.com/apple/swift-llbuild/blob/40c302a0b2ac12e99d1355986e4f16590d1fb03e/Package.swift#L9>
3. Rename LLVMSupport to LLVMSupport1 in \`Package.swift\` of IndexStoreDB.
``` swift
// Support code that is generally useful to the C++ implementation.
.target(
name: "IndexStoreDB_Support",
dependencies: ["LLVMSupport1"],
path: "lib/Support"),
// Copy of a subset of llvm's ADT and Support libraries.
.target(
name: "LLVMSupport1",
dependencies: [],
path: "lib/LLVMSupport"),
```
The naming conflect actually is a source of this issue, though not the only source.