I am linking with the Vapor library pulling in the package through Package Dependencies in xcode Project, and then in my Target I link Binary with Libraries I am linking with Vapor. Vapor itself pulls in a lot of Swift packages including AsyncHTTPClient which in turn uses SwiftNIO. Somewhere along the build process, I am getting linker error and it fails to build AsynchHTTPClient and then in turn fails to build Vapor. On further narrowing down I find this error only happens when I build for Testing, but not when I build for Running.
Any tips on how I might figure this out?
Ld /Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks/AsyncHTTPClient_-49CA00D6DAD1AA54_PackageProduct.framework/Versions/A/AsyncHTTPClient_-49CA00D6DAD1AA54_PackageProduct normal (in target 'AsyncHTTPClient' from project 'async-http-client')
cd /Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/SourcePackages/checkouts/async-http-client
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -Xlinker -reproducible -target x86_64-apple-macos10.13 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk -O0 -L/Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Intermediates.noindex/EagerLinkingTBDs/Debug -L/Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -F/Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Intermediates.noindex/EagerLinkingTBDs/Debug -F/Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks -F/Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks -F/Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks -F/Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks -F/Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks -F/Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks -F/Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks -F/Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks -F/Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks -F/Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks -F/Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks -F/Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks -F/Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks -F/Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks -F/Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks -F/Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks -F/Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks -F/Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks -F/Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks -F/Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks -F/Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks -F/Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks -F/Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks -F/Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks -F/Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks -F/Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks -F/Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks -F/Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks -F/Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks -F/Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks -F/Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -iframework /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -filelist /Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Intermediates.noindex/async-http-client.build/Debug/AsyncHTTPClient\ product.build/Objects-normal/x86_64/AsyncHTTPClient_-49CA00D6DAD1AA54_PackageProduct.LinkFileList -install_name @rpath/AsyncHTTPClient_-49CA00D6DAD1AA54_PackageProduct.framework/Versions/A/AsyncHTTPClient_-49CA00D6DAD1AA54_PackageProduct -Xlinker -rpath -Xlinker /usr/lib/swift -Xlinker -rpath -Xlinker /Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks -Xlinker -object_path_lto -Xlinker /Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Intermediates.noindex/async-http-client.build/Debug/AsyncHTTPClient\ product.build/Objects-normal/x86_64/AsyncHTTPClient_-49CA00D6DAD1AA54_PackageProduct_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -debug_variant -fobjc-link-runtime -fprofile-instr-generate -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx -L/usr/lib/swift -lc++ -lz /Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks/NIO.framework/Versions/A/NIO /Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks/CNIOAtomics.framework/Versions/A/CNIOAtomics /Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks/NIOConcurrencyHelpers.framework/Versions/A/NIOConcurrencyHelpers /Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks/_NIOBase64.framework/Versions/A/_NIOBase64 /Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks/CNIODarwin.framework/Versions/A/CNIODarwin /Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks/CNIOLinux.framework/Versions/A/CNIOLinux /Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks/CNIOWindows.framework/Versions/A/CNIOWindows /Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks/_NIODataStructures.framework/Versions/A/_NIODataStructures /Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks/DequeModule.framework/Versions/A/DequeModule /Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks/Atomics_301F3DE065572157_PackageProduct.framework/Versions/A/Atomics_301F3DE065572157_PackageProduct /Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks/NIOCore.framework/Versions/A/NIOCore /Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks/NIOEmbedded.framework/Versions/A/NIOEmbedded /Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks/NIOPosix.framework/Versions/A/NIOPosix /Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks/Atomics_301F3DE065572157_PackageProduct.framework/Versions/A/Atomics_301F3DE065572157_PackageProduct /Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks/Atomics_301F3DE065572157_PackageProduct.framework/Versions/A/Atomics_301F3DE065572157_PackageProduct /Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks/NIOHTTP1.framework/Versions/A/NIOHTTP1 /Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks/Atomics_301F3DE065572157_PackageProduct.framework/Versions/A/Atomics_301F3DE065572157_PackageProduct /Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks/CNIOLLHTTP.framework/Versions/A/CNIOLLHTTP /Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks/NIOHTTP2_-3E0E01799A9AE6A0_PackageProduct.framework/Versions/A/NIOHTTP2_-3E0E01799A9AE6A0_PackageProduct /Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks/NIOSSL_1A7227558E2D5E_PackageProduct.framework/Versions/A/NIOSSL_1A7227558E2D5E_PackageProduct /Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks/NIOHTTPCompression_-21EAEB8A2236BA36_PackageProduct.framework/Versions/A/NIOHTTPCompression_-21EAEB8A2236BA36_PackageProduct /Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks/NIOSOCKS_-3E0E01525182DF8F_PackageProduct.framework/Versions/A/NIOSOCKS_-3E0E01525182DF8F_PackageProduct /Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks/NIOTransportServices_-42398F84C6D923F5_PackageProduct.framework/Versions/A/NIOTransportServices_-42398F84C6D923F5_PackageProduct /Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks/Logging_35C93DA702091ECE_PackageProduct.framework/Versions/A/Logging_35C93DA702091ECE_PackageProduct /Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks/Atomics_301F3DE065572157_PackageProduct.framework/Versions/A/Atomics_301F3DE065572157_PackageProduct -Xlinker -dependency_info -Xlinker /Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Intermediates.noindex/async-http-client.build/Debug/AsyncHTTPClient\ product.build/Objects-normal/x86_64/AsyncHTTPClient_-49CA00D6DAD1AA54_PackageProduct_dependency_info.dat -o /Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Products/Debug/PackageFrameworks/AsyncHTTPClient_-49CA00D6DAD1AA54_PackageProduct.framework/Versions/A/AsyncHTTPClient_-49CA00D6DAD1AA54_PackageProduct -Xlinker -add_ast_path -Xlinker /Users/nishant/Library/Developer/Xcode/DerivedData/eipohub-apxkwtzpnwmidygvhoiftnlhxqvi/Build/Intermediates.noindex/async-http-client.build/Debug/AsyncHTTPClient.build/Objects-normal/x86_64/AsyncHTTPClient.swiftmodule
ld: Undefined symbols:
type metadata for NIOTLS.TLSUserEvent, referenced from:
AsyncHTTPClient.TLSEventsHandler.userInboundEventTriggered(context: NIOCore.ChannelHandlerContext, event: Any) -> () in AsyncHTTPClient.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This was due to missing import in the AsyncHTTPClient library. It will be resolved with a new pull request.