You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Grpc >= 1.46.x build fails with gcc 9.3 & c++17 setup. After some investigation, I found that it is related to the newly introduced xds core module and a bug in std::variant gcc standard implementation when it has the same type more than once, which is fixed in gcc 9.4, gcc 10.2 and gcc 11.1.
Although this is from a bug from gcc and I respect your decision in the last issue, simply closing that. I still think there is room to reconsider.
gcc bug is not as a simple thing as bugs in any other third-party libraries, especially Some dev environments with old Linux distributions are not always allowed to upgrade (or apply a patch and rebuild tools) their dev tool sometimes, forced to stick to old versions. This impacts the users in these environments.
gcc 9.3, and other releases with this bug are still in your support range according to your official document.
Another aspect; although std/absl::variant is allowed to have the same type more than once, I think the drawbacks of holding the same type multiple times outweigh the benefits of it because it limits the usage of type-based accessors, like std/absl::visit and std/absl::holds_alternative.
Describe the solution you'd like
The one possible approach I can think now is using wrappers for two strings to distinguish them.
Not only it can be a workaround to the gcc bug mentioned above. This change can bring more simplicity and Intuitiveness to the related codebase. For example, with this change the below code can be updated to a simpler form, with the help of Overload pattern,
If you do not think this is the required change to be considerable, I think it is needed to be mentioned about the information of "unsupported environments" with c++17 standard, (gcc 9 < 9.4, gcc10 < 10.2 and gcc11 < 11.1 without a related patch), not just GCC 6.3+.
@jiminj Thanks for the detailed information. Although it's a buggy gcc issue, it's a bit concerning that fixed version of gcc isn't available on certain linux distributions such as CentOS 7. Would you share your environment and whether fixed gcc versions (such as gcc 9.4) are available?
@veblush My client uses CentOS 7, (7.4) which has gcc 4.8.5 as its embedded one. Since our solution is based on C++17 and built and tested with gcc9, we guided them to use gcc 9.3 using the package devtoolset-9-gcc-9.3.1, which is the latest gcc9 version available on the package manager. gcc9.4 is not a feasible option unless building them individually by our own, and we do not see it as an available option for our client.
They provide gcc-10.2 and gcc-11.2, which does not seem to have the issue (didn't test though). Updating environments will take many steps and time for us though.
Is your feature request related to a problem? Please describe.
(Please visit #30118 first)
Grpc >= 1.46.x build fails with gcc 9.3 & c++17 setup. After some investigation, I found that it is related to the newly introduced xds core module and a bug in
std::variant
gcc standard implementation when it has the same type more than once, which is fixed in gcc 9.4, gcc 10.2 and gcc 11.1.Although this is from a bug from gcc and I respect your decision in the last issue, simply closing that. I still think there is room to reconsider.
gcc bug is not as a simple thing as bugs in any other third-party libraries, especially Some dev environments with old Linux distributions are not always allowed to upgrade (or apply a patch and rebuild tools) their dev tool sometimes, forced to stick to old versions. This impacts the users in these environments.
gcc 9.3, and other releases with this bug are still in your support range according to your official document.
Another aspect; although
std/absl::variant
is allowed to have the same type more than once, I think the drawbacks of holding the same type multiple times outweigh the benefits of it because it limits the usage of type-based accessors, likestd/absl::visit
andstd/absl::holds_alternative
.Describe the solution you'd like
The one possible approach I can think now is using wrappers for two strings to distinguish them.
Not only it can be a workaround to the gcc bug mentioned above. This change can bring more simplicity and Intuitiveness to the related codebase. For example, with this change the below code can be updated to a simpler form, with the help of Overload pattern,
grpc/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc
Lines 478 to 516 in 85059e9
Describe alternatives you've considered
If you do not think this is the required change to be considerable, I think it is needed to be mentioned about the information of "unsupported environments" with c++17 standard, (gcc 9 < 9.4, gcc10 < 10.2 and gcc11 < 11.1 without a related patch), not just
GCC 6.3+
.Additional context
Issue #30118
The text was updated successfully, but these errors were encountered: