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

building EchoXcode example #273

Closed
mark1010 opened this issue Jul 20, 2018 · 5 comments
Closed

building EchoXcode example #273

mark1010 opened this issue Jul 20, 2018 · 5 comments

Comments

@mark1010
Copy link

I'm trying to build EchoXcode following the steps in the doc, with the current head and Xcode Version 9.4.1 (9F2000).

The project seems to be missing dependencies on czlib, I apologise for the newbie question.

This is the process I've followed:

git clone https://github.com/grpc/grpc-swift
cd grpc-swift/

cd third_party
sh RUNME.sh

y (return), (return), all installs ok

cd ..
make && make project

All built ok, (An Echo target appears to have complied in this phase).

Open ./Examples/EchoXcode/Echo. xcodeprj in Xcode
Left Hand Nav (LHN) - right click Echo project Add Files, SwiftGRPC.xcodeproject, from parent folder.

Active Scheme is Echo (Echo project) > My Mac

Initial build fails, missing CgRPC.

LHN - click Echo project, General tab opens.

(Signing, Change Team).

Linked Frameworks and Libraries, 4x greyed out (unresolved) entries, only SwiftProtobuf.framework is
listed.

base on README.md and Echo.xcodeproj/project.pbxproj, PBXBuildFile section the missing frameworks are: BoringSSL.framework, Czlib.framework, CgRPC.framework, SwiftGRPC.framework.

  • button allows addition of: BoringSSL, CgRPC, Commander, SwiftGRPC, SwiftProtobufPluginLibrary, and is missing Czlib.

Add BoringSSL, SwiftGRPC, CgRPC.

Build with Command-B

Build fails, no changes, missing CgRPC.
screen shot 2018-07-20 at 13 51 24

Under Build Phases, Target Dependencies:
Add: BoringSSL, CgRPC, SwiftGRPC

no change to errors.

It's not clear to me whether I'm supposed to have provide Czlib, or is that part of the package management(?), and / or whether it's: Build Phases, Target Dependencies or Linked Frameworks / Libs that's causing the CgRPC issue, as CgRPC is there.

@MrMage
Copy link
Collaborator

MrMage commented Jul 20, 2018

Hi Mark, thanks for the report! I think Czlib is an old module that is no longer module. Could you please try simply removing the module from the Xcode project and see if building works then? If not, could you try adding "libz" instead to the target's dependencies? And if you get that to work, would you mind filing a PR with those changes so we can include them in the repo? :-)

@MrMage
Copy link
Collaborator

MrMage commented Aug 28, 2018

@mark1010 is this still affecting you?

@MrMage
Copy link
Collaborator

MrMage commented Aug 28, 2018

This might get fixed by #300.

@mark1010
Copy link
Author

mark1010 commented Sep 4, 2018

@MrMage Echo is now working for me thanks.

A few notes:

Echo
I didn't follow /grpc-swift/Examples/EchoXcode/README.md to the letter.

The process I followed was:

  1. make && make project
  2. Open Echo.xcodeproj
  3. Add files, SwiftGRPC.xcodeproj
  4. Add SwiftGRPC.framework under Linked Frameworks and Libraries
  5. Build / run

Step 4 is an addition to the README, and I didn't need gRPC, CgRPC, BoringSSL, and SwiftProtobuf to build / run.

SwiftGRPC.xcodeproj
I noticed that SwiftGRPC.xcodeproj has Bundle Identifier: Boring SSL

Examples
/grpc-swift/Examples/README.md refers to the 'third_party' folder / process, which I don't think you have now with the new build process.

Mark

MrMage added a commit that referenced this issue Sep 5, 2018
@MrMage
Copy link
Collaborator

MrMage commented Sep 5, 2018

Step 4 is an addition to the README, and I didn't need gRPC, CgRPC, BoringSSL, and SwiftProtobuf to build / run.

Weird, I'd have thought the other libraries would be necessary as well. Clarified the readme in #306 to mention "Linked Frameworks and Libraries " though.

SwiftGRPC.xcodeproj
I noticed that SwiftGRPC.xcodeproj has Bundle Identifier: Boring SSL

Could you elaborate?

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