You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "jonkeane (via GitHub)" <gi...@apache.org> on 2026/01/24 21:48:57 UTC

[PR] GH-48973: [R][C++] Fix RE2 compilation errors under C++20 [arrow]

jonkeane opened a new pull request, #48976:
URL: https://github.com/apache/arrow/pull/48976

   ### Rationale for this change
   Fix a building RE2 with C++20
   
   ### What changes are included in this PR?
   The fix, a test
   
   ### Are these changes tested?
   Yes
   
   ### Are there any user-facing changes?
   No
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-48973: [R][C++] Fix RE2 compilation errors under C++20 [arrow]

Posted by "jonkeane (via GitHub)" <gi...@apache.org>.
jonkeane commented on PR #48976:
URL: https://github.com/apache/arrow/pull/48976#issuecomment-3795679809

   @github-actions crossbow submit test-r-fedora-clang
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-48973: [R][C++] Fix RE2 compilation errors under C++20 [arrow]

Posted by "jonkeane (via GitHub)" <gi...@apache.org>.
jonkeane commented on PR #48976:
URL: https://github.com/apache/arrow/pull/48976#issuecomment-3795609228

   @github-actions crossbow submit test-r-fedora-clang


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-48973: [R][C++] Fix RE2 compilation errors under C++20 [arrow]

Posted by "jonkeane (via GitHub)" <gi...@apache.org>.
jonkeane commented on PR #48976:
URL: https://github.com/apache/arrow/pull/48976#issuecomment-3795599041

   @github crossbow submit test-r-fedora-clang


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-48973: [R][C++] Fix RE2 compilation errors under C++20 [arrow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #48976:
URL: https://github.com/apache/arrow/pull/48976#issuecomment-3795681389

   Revision: 654937bab1f1d156c1eb7e95384bb70ff0164cbe
   
   Submitted crossbow builds: [ursacomputing/crossbow @ actions-6b659d9faf](https://github.com/ursacomputing/crossbow/branches/all?query=actions-6b659d9faf)
   
   |Task|Status|
   |----|------|
   |test-r-fedora-clang|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-6b659d9faf-github-test-r-fedora-clang)](https://github.com/ursacomputing/crossbow/actions/runs/21323108512/job/61375830322)|


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-48973: [R][C++] Fix RE2 compilation errors under C++20 [arrow]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #48976:
URL: https://github.com/apache/arrow/pull/48976#discussion_r2725081840


##########
cpp/cmake_modules/ThirdpartyToolchain.cmake:
##########
@@ -2867,6 +2867,15 @@ function(build_re2)
 
   fetchcontent_makeavailable(re2)
 
+  # Suppress -Wnested-anon-types warnings from RE2's use of anonymous types
+  # in anonymous unions (a compiler extension).
+  # See: https://github.com/apache/arrow/issues/48973
+  if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+    if(TARGET re2)

Review Comment:
   We don't need this check.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-48973: [R][C++] Fix RE2 compilation errors under C++20 [arrow]

Posted by "jonkeane (via GitHub)" <gi...@apache.org>.
jonkeane commented on code in PR #48976:
URL: https://github.com/apache/arrow/pull/48976#discussion_r2725508957


##########
cpp/cmake_modules/ThirdpartyToolchain.cmake:
##########
@@ -2867,6 +2867,15 @@ function(build_re2)
 
   fetchcontent_makeavailable(re2)
 
+  # Suppress -Wnested-anon-types warnings from RE2's use of anonymous types
+  # in anonymous unions (a compiler extension).
+  # See: https://github.com/apache/arrow/issues/48973
+  if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+    if(TARGET re2)

Review Comment:
   Ah, yes of course it already targets re2. I will fix that. Thanks



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-48973: [R][C++] Fix RE2 compilation errors under C++20 [arrow]

Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #48976:
URL: https://github.com/apache/arrow/pull/48976#issuecomment-3797231024

   After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 64ce4bdc41bae1c7a3461b1a86977cf44287cd6d.
   
   There were no benchmark performance regressions. 🎉
   
   The [full Conbench report](https://github.com/apache/arrow/runs/61416552092) has more details. It also includes information about 4 possible false positives for unstable benchmarks that are known to sometimes produce them.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-48973: [R][C++] Fix RE2 compilation errors under C++20 [arrow]

Posted by "jonkeane (via GitHub)" <gi...@apache.org>.
jonkeane commented on PR #48976:
URL: https://github.com/apache/arrow/pull/48976#issuecomment-3795780085

   This resolves the warning in this environment (and we now have a test for Fedora+clang with libc++. AFAICT there's no current pre-built fedora clang R image these days.)
   
   The warning seems harmless, `anonymous types declared in an anonymous union are an extension` but curious if anyone thinks this is something we should upstream a change to re2 for (cc @kou @pitrou)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-48973: [R][C++] Fix RE2 compilation errors under C++20 [arrow]

Posted by "jonkeane (via GitHub)" <gi...@apache.org>.
jonkeane commented on PR #48976:
URL: https://github.com/apache/arrow/pull/48976#issuecomment-3796849599

   The failure is on main + being worked on separately: #48961


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-48973: [R][C++] Fix RE2 compilation errors under C++20 [arrow]

Posted by "jonkeane (via GitHub)" <gi...@apache.org>.
jonkeane merged PR #48976:
URL: https://github.com/apache/arrow/pull/48976


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-48973: [R][C++] Fix RE2 compilation errors under C++20 [arrow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #48976:
URL: https://github.com/apache/arrow/pull/48976#issuecomment-3795612440

   Revision: 16cd49b2244e0d7b4e9e011d82d73cf0eca8e7f0
   
   Submitted crossbow builds: [ursacomputing/crossbow @ actions-d22016819b](https://github.com/ursacomputing/crossbow/branches/all?query=actions-d22016819b)
   
   |Task|Status|
   |----|------|
   |test-r-fedora-clang|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-d22016819b-github-test-r-fedora-clang)](https://github.com/ursacomputing/crossbow/actions/runs/21322217070/job/61373706110)|


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-48973: [R][C++] Fix RE2 compilation errors under C++20 [arrow]

Posted by "jonkeane (via GitHub)" <gi...@apache.org>.
jonkeane commented on code in PR #48976:
URL: https://github.com/apache/arrow/pull/48976#discussion_r2725510430


##########
cpp/cmake_modules/ThirdpartyToolchain.cmake:
##########
@@ -2867,6 +2867,15 @@ function(build_re2)
 
   fetchcontent_makeavailable(re2)
 
+  # Suppress -Wnested-anon-types warnings from RE2's use of anonymous types
+  # in anonymous unions (a compiler extension).
+  # See: https://github.com/apache/arrow/issues/48973
+  if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+    if(TARGET re2)
+      target_compile_options(re2 PRIVATE -Wno-nested-anon-types)
+    endif()

Review Comment:
   ```suggestion
       target_compile_options(re2 PRIVATE -Wno-nested-anon-types)
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org