Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xcodebuild is failed #137

Open
soharang opened this issue Jan 4, 2022 · 3 comments
Open

xcodebuild is failed #137

soharang opened this issue Jan 4, 2022 · 3 comments

Comments

@soharang
Copy link

soharang commented Jan 4, 2022

Expected behavior

My framework project uses Hedera-Protobuf-Swift which uses grpc-swift and it has a dependencies with swift-nio libraries including swift-nio-transport-services.
I don't use NIOCore in my code and there is no problem.
It is ok when I build and run on xcode and it should be successful with xcodebuild command.

Actual behavior

xcodebuild command build fails with error log which ends with following lines.

...
swift-nio-transport-services.build/Release-iphoneos/NIOTransportServices.build/Objects-normal/armv7/TCPOptions+SocketChannelOption.bc
<unknown>:0: error: module map file '/Users/chris/Library/Developer/Xcode/DerivedData/myproject-exsbzxdqjxcopweabsmmudoygaip/SourcePackages/checkouts/swift-nio-transport-services/build/GeneratedModuleMaps-iphoneos/CNIODarwin.modulemap' not found
<unknown>:0: error: module map file '/Users/chris/Library/Developer/Xcode/DerivedData/myproject-exsbzxdqjxcopweabsmmudoygaip/SourcePackages/checkouts/swift-nio-transport-services/build/GeneratedModuleMaps-iphoneos/CNIOLinux.modulemap' not found
<unknown>:0: error: module map file '/Users/chris/Library/Developer/Xcode/DerivedData/myproject-exsbzxdqjxcopweabsmmudoygaip/SourcePackages/checkouts/swift-nio-transport-services/build/GeneratedModuleMaps-iphoneos/CNIOAtomics.modulemap' not found
/Users/chris/Library/Developer/Xcode/DerivedData/myproject-exsbzxdqjxcopweabsmmudoygaip/SourcePackages/checkouts/swift-nio-transport-services/Sources/NIOTransportServices/NIOFilterEmptyWritesHandler.swift:15:8: error: no such module 'NIOCore'
import NIOCore
       ^

** BUILD FAILED **


The following build commands failed:
	CompileSwift normal arm64 (in target 'NIOTransportServices' from project 'swift-nio-transport-services')
	CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'NIOTransportServices' from project 'swift-nio-transport-services')
	CompileSwift normal armv7 (in target 'NIOTransportServices' from project 'swift-nio-transport-services')
	CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler (in target 'NIOTransportServices' from project 'swift-nio-transport-services')
(4 failures)

Steps to reproduce

  1. My project uses Package Manager and it has hedera-protobuf-swift library which has a dependencies on grpc-swift and it seems that it uses swift-nio libraries.
  2. In the terminal, I run following command.
xcodebuild -target myproject BITCODE_GENERATION_MODE=bitcode OTHER_CFLAGS="-fembed-bitcode" ONLY_ACTIVE_ARCH=NO -configuration Release -sdk iphoneos BUILD_DIR=./build clean build

If possible, minimal yet complete reproducer code (or URL to code)

[anything to help us reproducing the issue]

SwiftNIO version/commit hash

grpc-swift 1.6.1
swift-nio 2.36.0
swift-nio-extras 1.10.2
swift-nio-http2 1.19.1
swift-nio-ssl 2.17.1
swift-nio-transport-services 1.11.3

[the SwiftNIO tag/commit hash]

Swift & OS version (output of swift --version && uname -a)

swift-driver version: 1.26.21 Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)
Target: x86_64-apple-macosx11.0
Darwin Chriss-MacBook-Pro.local 20.6.0 Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:21 PDT 2021; root:xnu-7195.141.6~3/RELEASE_X86_64 x86_64

XCode Version 13.2.1 (13C100)

@Lukasa
Copy link
Contributor

Lukasa commented Jan 4, 2022

Can you provide complete verbose output from the build command? swift-nio-transport-services does express a dependency on NIOCore, so it should be being appropriately built and available to import.

@soharang
Copy link
Author

soharang commented Jan 5, 2022

@Lukasa Thanks for your quick response.
I agree with you that swift-nio-transport-services has a dependency on its Package.swift.

After re-applying Hedera-Protobuf-Swift pacakge, similar error is occured in swift-nio-extras/Sources/NIOExtras/DebugInboundEventsHandler.swift and I don't think that previous problem from swift-nio-transport-services has been resolved.

...ingHelper.o -o /Users/chris/Library/Developer/Xcode/DerivedData/myproject-exsbzxdqjxcopweabsmmudoygaip/Build/Intermediates.noindex/swift-nio-extras.build/Release-iphonesimulator/NIOExtras.build/Objects-normal/x86_64/RequestResponseHandler.o -o /Users/chris/Library/Developer/Xcode/DerivedData/myproject-exsbzxdqjxcopweabsmmudoygaip/Build/Intermediates.noindex/swift-nio-extras.build/Release-iphonesimulator/NIOExtras.build/Objects-normal/x86_64/WritePCAPHandler.o
/Users/chris/Library/Developer/Xcode/DerivedData/myproject-exsbzxdqjxcopweabsmmudoygaip/SourcePackages/checkouts/swift-nio-extras/Sources/NIOExtras/DebugInboundEventsHandler.swift:20:8: error: no such module 'NIOCore'
import NIOCore
       ^
** BUILD FAILED **
The following build commands failed:
	CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'stellarsdk' from project 'stellarsdk')
	CompileSwiftSources normal i386 com.apple.xcode.tools.swift.compiler (in target 'stellarsdk' from project 'stellarsdk')
	CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'stellarsdk' from project 'stellarsdk')
	CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'NIOTLS' from project 'swift-nio')
	CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'NIOHTTP1' from project 'swift-nio')
	CompileSwiftSources normal i386 com.apple.xcode.tools.swift.compiler (in target 'NIOHTTP1' from project 'swift-nio')
	CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'NIOHTTP1' from project 'swift-nio')
	CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'NIOExtras' from project 'swift-nio-extras')
	CompileSwift normal x86_64 (in target 'NIOExtras' from project 'swift-nio-extras')
(9 failures)

Let me come back here if the problem is reproduced on swift-nio-transport-services.

@Lukasa
Copy link
Contributor

Lukasa commented Jan 5, 2022

This update strongly implies something is odd about the way you're building: it seems like this would affect SwiftPM in general. I don't think NIOCore is particularly unusual as a SwiftPM target.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants