-
Notifications
You must be signed in to change notification settings - Fork 420
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
Unable to build grpc-swfit with xcode proj file. #1408
Comments
|
Yes. I can not move to SPM yet.
On Tue, May 17, 2022 at 11:40 PM Cory Benfield ***@***.***> wrote:
swift package generate-xcodeproj is no longer supported by Swift, so it's
highly likely that build failures occur when you do this. Is there any
reason you can't simply depend on the Swift package directly?
—
Reply to this email directly, view it on GitHub
<#1408 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALEVB6P3BHEC2MICYVY7OLVKSGHNANCNFSM5WGWZG4Q>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Thanks,
Yash Desai
|
I think the "allow non-modular includes" setting should work so long as you apply it to all targets. |
Interesting. This dose not work for NIOSSL |
@Lukasa would you be able to help here ? |
@yashdesai7 Like @Lukasa said sadly the For me all of the clean build succeeded on both MacOS and iOS. Do you have a more complex setup by any chance? |
did you build the grpc-swift-Package or GRPC target from this repo? I don’t have a complex setup. I just checked out the repo and tried to build but I was building a GRPC target as I will need a GRPC framework. I also tried building grpc-swift-Package, GRPC, with xcodeproj and seeing the same error. I suspect you build the swift-nio-Package and I believe |
@yashdesai7 Sorry I misspoke earlier. I build the So I can sadly not reproduce the build error you are seeing. Could you provide some more infos:
|
|
@yashdesai7 I was finally able to reproduce the build errors. I dug a bit into the errors and what Xcode is doing here. Sadly, how Furthermore, it doesn't look like we can easily fix this from the NIO/gRPC side. Maybe you can explain your restriction around why you can't use SPM right now and how/where you want to integrate gRPC a bit and I might be able to suggest alternative solutions. |
Moving to SPM requires larger efforts across teams and I dont think it's going to happen anytime soon. |
@FranzBusch you also mentioned |
@yashdesai7 that was just my brain getting things mixed up. There are some variations of grpc-Lite floating around but nothing in Swift. I am currently trying to think of different solutions how you could still integrate grpc-swift without relying on the generated project. How are you using/planning to use the xcproj? Are you just building a framework and then integrate it manually or is the project part of an xcworkspace in the end? |
Are you just building a framework and then integrate it manually ?
is the project part of an xcworkspace in the end?
|
Sadly, I don't think there is much we can do for you here. SPM is the official integration method and using the generated The only thing that I would try is to build an xcframework from In the end, I can only recommend you to push the migration to SPM since the ecosystem is moving more and more into that direction. |
Interesting, It is not working for NIOSSL
On Tue, May 17, 2022 at 11:49 PM Cory Benfield ***@***.***> wrote:
I think the "allow non-modular includes" setting should work so long as
you apply it to all targets.
—
Reply to this email directly, view it on GitHub
<#1408 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALEVB3YP7NEJW3NQO6GAULVKSHIVANCNFSM5WGWZG4Q>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Thanks,
Yash Desai
Contact: +1 607 644 5866
|
Following up on this, it still doesn't work now that Xcode supports building frameworks from packages. Reference here. I'm trying this:
|
What are you trying to achieve?
Trying to build the
GRPC
target using xcodeproj file.What have you tried so far?
swift package generate-xcodeproj
CNIOBoringSSLShims
with errorInclude of non-modular header inside framework module 'CNIOBoringSSL.CNIOBoringSSL_bn': '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/clang/include/inttypes.h'
Allow non modular includes in Framework modules
to YESNIOSSL
with errorAllow non modular includes in Framework modules
to YES does not help here.could not build Objective-C module 'CNIOBoringSSL'
CNIOBoringSSL
andNIOSSL
already hasOther Swift Flags
build setting with-fmodule-map-file=$(SRCROOT)/.build/checkouts/swift-nio/Sources/CNIOWindows/include/module.modulemap
so I updated this module map with custom path for 'CNIOBoringSSL' that helped fixing thecould not build Objective-C module
but I started getting symbol not found in the scope for below enum althoughCNIOBoringSSL_ssl.h
is part ofCNIOBoringSSL.h
which is part of my custom module map which looks likeThe text was updated successfully, but these errors were encountered: