-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Description
Arrow currently bundles RE2 version 2022-06-01, which fails to build on musl libc systems (Alpine Linux) with the error:
error: 'int32_t' does not name a type
/arrow/cpp/re2_ep-prefix/src/re2_ep/util/pcre.h:503:11
This affects:
- R package installation from source on Alpine ([R] Install from sources on Alpine Linux (error: 'int32_t' does not name a type) #46769)
- C++ builds on Alpine Linux ([C++] Build fails in util/pcre.h due to missing #include <cstdint> #43350, [C++] Error building Dockerfile with Apache Arrow and re2 on Alpine Linux #41619)
- CRAN extended checks on musl (https://raw.githubusercontent.com/bastistician/Rcheck/refs/heads/results/musl/issues/arrow.out)
Root cause
RE2's util/pcre.h used int32_t without including <cstdint>. This was fixed upstream in RE2 on January 30, 2023 (commit changed from int32_t to plain int type).
Proposed solution
Update Arrow's bundled RE2 from 2022-06-01 to 2023-03-01:
- This version includes the fix (any version >= 2023-02-01 would work)
- 2023-03-01 is the newest version that doesn't require Abseil (dependency added in 2023-06-01)
- Avoids adding Abseil as a new dependency for R package builds
- Gets ~9 months of bug fixes over 2022-06-01
References
- [C++] Build fails in util/pcre.h due to missing #include <cstdint> #43350 - Original bug report with suggested patch
- [R] Install from sources on Alpine Linux (error: 'int32_t' does not name a type) #46769 - R package build failure on Alpine
- [C++] Error building Dockerfile with Apache Arrow and re2 on Alpine Linux #41619 - Docker build failure with RE2 on Alpine
- RE2 commit fixing the issue: https://github.com/google/re2/commits/main/util/pcre.h (Jan 30, 2023)
- CRAN extended musl check: Arrow 22.0.0 currently failing
Component(s)
C++