xcode build failure: linker command failed with exit code 1

Hi there,

I am getting this error below when I try to build my Swift Project in Xcode (Version 12.3 (12C33)).

I picked these options below when I created my project in Xcode:
  1. Interface: SwiftUI

  2. Life Cycle: UIKit App Delegate

  3. Language: Swift

Here's the error below:


Can't write output file: /Users/mwf053/Library/Developer/Xcode/DerivedData/od-mobile-ios-main-fdjkdxbnpuigonfmvrmgwqswiuih/Build/Products/Debug-iphonesimulator/KeychainSwift/KeychainSwift.framework/KeychainSwift for architecture x86_64


Any thoughts on this on how to resolve this issue?

Thanks a lot for your help in advance !!
Have you tried quitting Xcode and deleting the DerivedData folder? (make a backup before you try just in case you have project data there)
Thanks so much ! I am new to Swift and Xcode.

I quit Xcode, deleted the DerivedData folder, cleaned the project and re-ran the project.
The build was successful, but the run aborted.

It says: "Thread 1 --> 0 _abort with payload"

Here's the console log message I see in Xcode:

dyld: Library not loaded: @rpath/KeychainSwift.framework/KeychainSwift
 Referenced from: /Library/Developer/CoreSimulator/Devices/D6BB9207-2509-45D1-9747-CEB0994F5843/data/Containers/Bundle/Application/16658618-D0F7-4AFD-99DA-67519DB2A4C4/od-mobile-ios.app/od-mobile-ios
 Reason: no suitable image found. Did find:
/Library/Developer/CoreSimulator/Devices/D6BB9207-2509-45D1-9747-CEB0994F5843/data/Containers/Bundle/Application/16658618-D0F7-4AFD-99DA-67519DB2A4C4/od-mobile-ios.app/Frameworks/KeychainSwift.framework/KeychainSwift: mmap() errno=5 at address=0x1081E1000, size=0x0000C000 segment=
TEXT in Segment::map() mapping /Library/Developer/CoreSimulator/Devices/D6BB9207-2509-45D1-9747-CEB0994F5843/data/Containers/Bundle/Application/16658618-D0F7-4AFD-99DA-67519DB2A4C4/od-mobile-ios.app/Frameworks/KeychainSwift.framework/KeychainSwift
/Library/Developer/CoreSimulator/Devices/D6BB9207-2509-45D1-9747-CEB0994F5843/data/Containers/Bundle/Application/16658618-D0F7-4AFD-99DA-67519DB2A4C4/od-mobile-ios.app/Frameworks/KeychainSwift.framework/KeychainSwift: mmap() errno=5 at address=0x108209000, size=0x0000C000 segment=
TEXT in Segment::map() mapping /Library/Developer/CoreSimulator/Devices/D6BB9207-2509-45D1-9747-CEB0994F5843/data/Containers/Bundle/Application/16658618-D0F7-4AFD-99DA-67519DB2A4C4/od-mobile-ios.app/Frameworks/KeychainSwift.framework/KeychainSwift
/Library/Developer/CoreSimulator/Devices/D6BB9207-2509-45D1-9747-CEB0994F5843/data/Containers/Bundle/Application/16658618-D0F7-4AFD-99DA-67519DB2A4C4/od-mobile-ios.app/Frameworks/KeychainSwift.framework/KeychainSwift: stat() failed with errno=5
/Library/Developer/CoreSimulator/Devices/D6BB9207-2509-45D1-9747-CEB0994F5843/data/Containers/Bundle/Application/16658618-D0F7-4AFD-99DA-67519DB2A4C4/od-mobile-ios.app/Frameworks/KeychainSwift.framework/KeychainSwift: mmap() errno=5 at address=0x108231000, size=0x0000C000 segment=
TEXT in Segment::map() mapping /Library/Developer/CoreSimulator/Devices/D6BB9207-2509-45D1-9747-CEB0994F5843/data/Containers/Bundle/Application/16658618-D0F7-4AFD-99DA-67519DB2A4C4/od-mobile-ios.app/Frameworks/KeychainSwift.framework/KeychainSwift
/Library/Developer/CoreSimulator/Devices/D6BB9207-2509-45D1-9747-CEB0994F5843/data/Containers/Bundle/Application/16658618-D0F7-4AFD-99DA-67519DB2A4C4/od-mobile-ios.app/Frameworks/KeychainSwift.framework/KeychainSwift: stat() failed with errno=5
dyld: launch, loading dependent libraries
DYLD
SHAREDCACHEDIR=/Library/Developer/CoreSimulator/Caches/dyld/19H114/com.apple.CoreSimulator.SimRuntime.iOS-14-3.18C61
DYLDROOTPATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot
DYLDLIBRARYPATH=/Library/Developer/Xcode/DerivedData/od-mobile-ios-haflmdscxliwpfclxlpeqzhgfmlk/Build/Products/Debug-iphonesimulator:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/introspection
DYLDINSERTLIBRARIES=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libBacktraceRecording.dylib:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/Core


Thanks again for your help !!
Ok, it looks like the original error came back again:
Any other thoughts on this?

Showing Recent Issues
Can't open file, errno=13 file '/Library/Developer/Xcode/DerivedData/od-mobile-ios-haflmdscxliwpfclxlpeqzhgfmlk/Build/Products/Debug-iphonesimulator/KeychainSwift/KeychainSwift.framework/KeychainSwift' for architecture x86_64


Thanks !!
xcode build failure: linker command failed with exit code 1
 
 
Q