I am trying to build from source, following instructions on Couchbase’s github page, and am not able to get past this error that crept on Beta 4 of Xcode (not an issue on Beta 3).
The following build commands failed:
Ld ~/Library/Developer/Xcode/DerivedData/CouchbaseLite-aachofjoorbscpenmeugkbmxbibu/Build/Intermediates.noindex/CouchbaseLite.build/Release-iphoneos/CBL\ Swift.build/Objects-normal/arm64/Binary/CouchbaseLiteSwift normal arm64
(1 failure)
Suggestions on getting past this, if you’ve tried Beta 4? I am not getting a build error with Xcode UI itself. Something in build_framework.sh could be triggering it?
The following commands produced analyzer issues:
AnalyzeShallow /~/SourceControl/CBLite/couchbase-lite-ios/vendor/couchbase-lite-core/C/c4Document.cc normal arm64
(1 command with analyzer issues)
The following build commands failed:
CompileC /~/Library/Developer/Xcode/DerivedData/CouchbaseLite-aachofjoorbscpenmeugkbmxbibu/Build/Intermediates.noindex/CouchbaseLite.build/Release-iphoneos/CBL\ Swift.build/Objects-normal/armv7/MYURLUtils.o /~/SourceControl/CBLite/couchbase-lite-ios/vendor/MYUtilities/MYURLUtils.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC /~/Library/Developer/Xcode/DerivedData/CouchbaseLite-aachofjoorbscpenmeugkbmxbibu/Build/Intermediates.noindex/CouchbaseLite.build/Release-iphoneos/CBL\ Swift.build/Objects-normal/armv7/MYLogging.o /~/SourceControl/CBLite/couchbase-lite-ios/vendor/MYUtilities/MYLogging.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC /~/Library/Developer/Xcode/DerivedData/CouchbaseLite-aachofjoorbscpenmeugkbmxbibu/Build/Intermediates.noindex/CouchbaseLite.build/Release-iphoneos/CBL\ Swift.build/Objects-normal/armv7/Test_Assertions.o /~/SourceControl/CBLite/couchbase-lite-ios/vendor/MYUtilities/Test_Assertions.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC /~/Library/Developer/Xcode/DerivedData/CouchbaseLite-aachofjoorbscpenmeugkbmxbibu/Build/Intermediates.noindex/CouchbaseLite.build/Release-iphoneos/CBL\ Swift.build/Objects-normal/armv7/MYErrorUtils.o /~/SourceControl/CBLite/couchbase-lite-ios/vendor/MYUtilities/MYErrorUtils.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(4 failures)
tl;dr: Please choose the Build/Clean Build Folder menu command and try the build again.
In general, when looking through a log to figure out what went wrong, you should find the first line that says “error” or “fatal error”. Here it’s:
fatal error: module file
‘/~/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/14VVTP6OGO0OT/Foundation-29B9L6YRR52B.pcm’
not found: module file not found
note: imported by
‘/~/Library/Developer/Xcode/DerivedData/CouchbaseLite-aachofjoorbscpenmeugkbmxbibu/Build/Intermediates.noindex/PrecompiledHeaders/SharedPrecompiledHeaders/10504388347954642879/CBLPrefix.h.gch’
The module file is an internal build artifact, and note that it’s being imported by a precompiled header.
This kind of error can occur when you first build with a new version of Xcode. The build system is supposed to delete obsolete internal build files, but sometimes it doesn’t, and then any changes in the file format or naming will mess up the build.
Thanks for your responsiveness on the issues with the new beta. I encountered a similar problem. Unfortunately cleaning the project did not help.
**** BUILD FAILED ****
The following commands produced analyzer issues:
AnalyzeShallow /Users/xxx/Projects/couchbase-lite-ios/vendor/couchbase-lite-core/C/c4Document.cc normal arm64
(1 command with analyzer issues)
The following build commands failed:
Ld /Users/xxx/Library/Developer/Xcode/DerivedData/CouchbaseLite-gybnakomgqwtozdffsxpzsiabljh/Build/Intermediates.noindex/CouchbaseLite.build/Release-iphoneos/CBL\ Swift.build/Objects-normal/arm64/Binary/CouchbaseLiteSwift normal arm64
(1 failure)
Before the AnalyzeShallow part, the following error occurs:
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I had tried that with the Xcode IDE. Built fine. But it was with the Couchbase script where the errors show up, even after doing Build > Clean Build Folder from the IDE UI on the same project. Maybe I am missing something obvious.
Guys, you have to look at the actual error messages. c4Document.cc has a minor issue (implicit cast) that’s caught by a new analyzer warning.
No offense, but I suggest you use a supported version of Xcode (10) to build Couchbase Lite, if you’re not prepared to deal with glitches like these. We’ll have support for Xcode 11 by the time it ships (September?)