-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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 1.63.0 or newer on macOS fails. #36654
Comments
Thank you for this report. Can you clarify what targets were you trying to build? Please confirm if you obtained gRPC from our GitHub repository or from some other place. |
I guess this is all targets with cmake argsuments: I confirm the release tarball is from the official GitHub release. To be more specific, I build the package using PkgSrc where I've incorporated the patch: http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/net/grpc/?only_with_tag=MAIN |
Facing the same problem - building the shared library on macOS with all dependencies provided externally. Using protobuf 27 I can see homebrew's test bot is also experiencing this: |
This doesn't work (for shared builds) because it creates a cyclic dependence, as |
@veblush Does something need to change with respect to how we're vendoring upb? |
Does this work without providing the additional arguments? |
I removed all the "package" specs and things compile on osx now. I'm assuming that the vendored upb (v26.1 since 34a7e76, until the so-far-unreleased 62401f6 bumped to v27.0) refers to symbols in protobuf that don't exist anymore or have been renamed. That said, vendoring protobuf (much less all the other packages) is not an option for distribution, aside from the fact that the option One thing that surprises me, is that the failure is essentially the same no matter if the system-provided protobuf is older or newer than (or even the same as!) the vendored one:
I haven't diffed the Finally this problem only seems to appear on osx, definitely not on linux (not sure about windows yet, running into #35794 there). |
@yashykt building it as a static library appears to work - is only the shared variant on macOS - when built against an external protobuf. But that would still be a regression, I think it's quite common to use grpc as a shared library |
I suspect the missing symbols are in The symbols are not built nor referenced in the Reasons it doesn't fail in other scenarios:
So there is a bit of circular dependency here:
I suppose one could pass TL;DR - on macOS, add this somewhere in the CMakeLists.txt - and it works, and it should work the same as Linux, but it's unclear whether something else needs to be properly fixed upstream:
|
Yeah, there's a library layering problem there IMO. But good point about |
Update from @veblush: We don't have a good solution for this yet, but eventually this should go away once we are able to use CMake from upb instead of vendoring upb ourselves. |
Any progress on this issue? I am currently struggling source building the gRPC Conan package with clang 18.1.8 on macOS. |
What version of gRPC and what language are you using?
1.63.0 1.64.0
What operating system (Linux, Windows,...) and version?
macOS
What runtime / compiler are you using (e.g. python version or version of gcc)
clang
What did you do?
Try to build 1.63.0 or 1.64.0 (older versions are fine).
What did you expect to see?
Builds fine
What did you see instead?
Build fails with
Anything else we should know about your project / environment?
Fix:
The text was updated successfully, but these errors were encountered: