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
{{ message }}
Repository navigation
[C++]: Work around bit_width not being available on MacOS's partially compatible C++20 build #49371
[ 4%] Building C object _deps/lz4-build/CMakeFiles/lz4_static.dir/__/lz4-src/lib/lz4frame.c.o
In file included from /Users/runner/work/crossbow/crossbow/arrow/cpp/src/arrow/array/array_base.cc:18:
In file included from /Users/runner/work/crossbow/crossbow/arrow/cpp/src/arrow/array/array_base.h:26:
In file included from /Users/runner/work/crossbow/crossbow/arrow/cpp/src/arrow/array/data.h:32:
/Users/runner/work/crossbow/crossbow/arrow/cpp/src/arrow/util/bit_util.h:141:15: error: no member named 'bit_width' in namespace 'std'
141 | return std::bit_width(x - 1);
| ~~~~~^
[ 4%] Building C object _deps/lz4-build/CMakeFiles/lz4_static.dir/__/lz4-src/lib/lz4hc.c.o
1 error generated.
make[2]: *** [src/arrow/CMakeFiles/arrow_array.dir/array/array_base.cc.o] Error 1
make[1]: *** [src/arrow/CMakeFiles/arrow_array.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 4%] Building C object _deps/lz4-build/CMakeFiles/lz4_static.dir/__/lz4-src/lib/xxhash.c.o
[ 4%] Linking C static library liblz4.a
[ 4%] Built target lz4_static
make: *** [all] Error 2
**** Complete build log may still be present at
We'll need to walk this back or work around it until CRAN fully supports C++20. cc @Anakin100100@pitrou
I feel like if the project is on C++ 20 let's make an effort to support this. There was a similar error for the Ruby build and it was fixed by updating one dependency. Are there other platforms which may have been missed when merging the initial pull request?
@github-actions crossbow submit *cran* will trigger a job that has the target we need to satisfy. That was run and returned clean (#49298 (comment)) but I suspect there were subsequent changes that are bonking us on that build.
I feel like if the project is on C++ 20 let's make an effort to support this
I understand, and I too wish we had a cleaner story around C++20 support, but for now, we have to compile on what's available on CRAN to stay on CRAN (which we as a project are committed to still). It won't be forever, they will upgrade their buildchain soon enough, but we have to be able to compile with what's there today.
edit: oops, I pressed the wrong button, sorry for the noise of close -> reopen.
Activity
pitrou commentedon Feb 22, 2026
We can use the dedicated clang builtin on that playtform.
Anakin100100 commentedon Feb 22, 2026
I feel like if the project is on C++ 20 let's make an effort to support this. There was a similar error for the Ruby build and it was fixed by updating one dependency. Are there other platforms which may have been missed when merging the initial pull request?
jonkeane commentedon Feb 22, 2026
@github-actions crossbow submit *cran*will trigger a job that has the target we need to satisfy. That was run and returned clean (#49298 (comment)) but I suspect there were subsequent changes that are bonking us on that build.I understand, and I too wish we had a cleaner story around C++20 support, but for now, we have to compile on what's available on CRAN to stay on CRAN (which we as a project are committed to still). It won't be forever, they will upgrade their buildchain soon enough, but we have to be able to compile with what's there today.
edit: oops, I pressed the wrong button, sorry for the noise of close -> reopen.
jonkeane commentedon Feb 28, 2026
Issue resolved by pull request 49405
#49405
apacheGH-49371: [C++] Work around bit_width not being available on Ma…
apacheGH-49371: [C++] Work around bit_width not being available on Ma…
apacheGH-49371: [C++] Work around bit_width not being available on Ma…