-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
GH-44898: [C++] Fix compilation error on GCC 8 #44899
Conversation
The `span` implementation featured a complicated SFINAE construct to enable the `span(range...)` constructor, which failed on compiling on gcc 8. Replace this complicated SFINAE with a much simpler one that avoids the recursive `span` template dependency while keeping the intended semantics.
@github-actions crossbow submit -g cpp -g r |
|
Revision: 02ca3b5 Submitted crossbow builds: ursacomputing/crossbow @ actions-f791cb99c4 |
@github-actions crossbow submit wheelcp312* |
Revision: 02ca3b5 Submitted crossbow builds: ursacomputing/crossbow @ actions-8100cd399e |
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.
Very nice simplification, thanks for the quick fix!
The r failures seem unrelated and are also failing in nightlies |
Hi @pitrou , could you elaborate a bit more on why GCC 8 complains about the original code and how this change fixes it? |
Well, I'm not sure. I didn't manage to make sense of the error messages, so instead I opted to trying to remove complexity from the existing constructs until it fixed the issue :) |
I guess this kind of compiler version specific error can be hard to interpret (I tried to decode it too but no avail). So I'm good as long as the compiler doesn't complain. |
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.
I don't have a nvcc setup ready, but @vyasr might want to take a look indeed. |
After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 9907f37. There were 132 benchmark results with an error:
There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 5 possible false positives for unstable benchmarks that are known to sometimes produce them. |
@pitrou @zanmato1984 I ran the exact same test from #40252 with both the commit right after this PR merged and the latest main, and both compiled under nvcc so I think we're fine. I do still see a number of compiler warnings (including the ones from #40252 but those aren't blockers. |
Thanks for the feedback @vyasr ! |
Rationale for this change
The
span
implementation featured a complicated SFINAE construct to enable thespan(range...)
constructor, which failed compiling on gcc 8.x.What changes are included in this PR?
Replace this complicated SFINAE with a much simpler one that avoids the recursive
span
template dependency while keeping the intended semantics.Are these changes tested?
Yes, by existing tests.
Are there any user-facing changes?
No.