-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Enable C++ standard library #19918
Enable C++ standard library #19918
Conversation
f625b39
to
501d2f7
Compare
5904aca
to
fc50e46
Compare
6a5a6c9
to
a5d7fa3
Compare
"This PR will be merged temporarily to pass thorough all-tests including tests only available for master branch" sounds pretty dirty. For the artifacts - packages - distribtest, you can actually start and adhoc run. I triggered an adhoc run here: |
Test link
There is one failed test:
|
one platform where we should verify this is Alpine linux (there's some interesting differences between alpine and other distros) - I'm not sure if we have any alpine distribtests at this point though. |
Another test with new commit "Add libc++/libstdc++ to PHP"
Distribtests are all green now. |
From the test list, we only have alpine linux test for python 3.7, "python_dev_linux_x64_alpine3.7". |
4cea09f
to
d0cda8e
Compare
@jtattermusch Can you approve this PR to merge this? I want to see all tests passing this and prepare the next release based on this. |
Bazel RBE windows build might be broken: Not sure about node linux tests The Node MacOS failure is probably pre-existing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even though I'm not thrilled about the general idea of adding a new dependency, I think this mostly looks ok, but we still need this:
- we confirm that the test failures are preexisting
- there needs to be an announcement to grpc-io group once we cut the release branch and push the prerelease packages to warn users about the new dependency and explain what to do if they experience issues.
One additional question:
when building the artifacts for various languages (
def targets(): |
Looks like most pre-compiled C-core binaries are built using this image:
https://github.com/grpc/grpc/blob/master/tools/dockerfile/grpc_artifact_linux_x64/Dockerfile
For tests, I'm pretty confident it doesn't cause any test failure on any of PR tests because I've been tracking this PR for many weeks. For sure, I'll rebase this on master and see which test failures come up comparing to the HEAD test result. For the announcement, the doc is in review and I just sent a review request to you as well :) For the trap ensuring old enough libstdc++.so dependency, I installed the trap on python and I'll install the trap on ruby as well. Because all wrapped languages shared almost the same grpc library, two would be enough, I guess. If more coverage is required, however, I can do it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, let's try this.
This PR is quite a sensitive matter, so despite all the testing it could happen that we find out that something stopped working on one of the platforms and we'd need to revert, so let's stay alert.
Thanks! Sure I'll keep my eye on this for coming weeks and also I'll reach out to the language owners. Also I'm a release manager on the upcoming version of gRPC for this PR. :) |
I checked and debian:jessie |
Potential problem - the C# nugets seems to be much larger than before |
Jessie would be fine. The version of installed libstdc++.so doesn't necessary mean required version of built artifact. For C# nuget packages, can you let me know the size different between the twos? Linux and Windows show the same tendency? |
Looks like this has broken the linux distribtests on master: the diff: |
C# nuget size difference: Grpc.Core nugets has grown from 73MB to 141MB, which is unacceptable. |
Can you explain why exactly that's not a problem? This is a problem we had with libstdc (C, not C++) in the past (having a too new library available were made us depend on symbols that weren't available in older versions of the library). For C# nuget packages, can you let me know the size different between the twos? Linux and Windows show the same tendency? Posted some initial findings, you'll need to investigate in detail. |
The previous problem that we had with node.js was because it used GCC 6 without proper macro and it made gRPC depend on many new symbols introduced with GCC 5. In this case, Debian:Jessie uses GCC 4.9 so basically it's safer than using Debian:Stretch bundled with GCC 6.3. Most C++ symbols were already introduced by early version of GCC 4 and the trap I installed on Python builder will catch the symbols not available in |
I'm now on the issue of nuget. Initial investigation shows that this is because the size of ios libgrpc.a is bloated from 99.7MB to 256.9MB. Probably this doesn't affect the artifacts of iOS because most of symbols are stripped away when linking. But I'm looking into this. Also this doesn't apply to other languages and platforms because only Windows uses static linking so artifacts for Windows should get slightly bigger size and all Windows artifacts in nugets get a bit bigger but not so much. (4.4MB -> 4.5MB) |
Dramatic iOS artifact size increase is actually caused by #20113. You can see the difference between after and before. This can be verified by reading objfiles from both static libraries. One of example is Before (size: 27360)
After (size: 67728)
The increased size (40368) is mainly from |
This is a test CL to try out using C++ standard library. This is mainly trying to following things:
Distribution tests are done manually.