fix the compile error on mac m1
Why I'm doing:
when I compile the main branch, it occurs some errors.
What I'm doing:
Please review if the fix is reasonable.
Fixes #issue
What type of PR is this:
- [x] BugFix
- [ ] Feature
- [ ] Enhancement
- [ ] Refactor
- [ ] UT
- [ ] Doc
- [ ] Tool
Does this PR entail a change in behavior?
- [x] Yes, this PR will result in a change in behavior.
- [ ] No, this PR will not result in a change in behavior.
If yes, please specify the type of change:
- [ ] Interface/UI changes: syntax, type conversion, expression evaluation, display information
- [ ] Parameter changes: default values, similar parameters but with different default values
- [ ] Policy changes: use new policy to replace old one, functionality automatically enabled
- [ ] Feature removed
- [ ] Miscellaneous: upgrade & downgrade compatibility, etc.
Checklist:
- [ ] I have added test cases for my bug fix or my new feature
- [ ] This pr needs user documentation (for new or modified features or behaviors)
- [ ] I have added documentation for my new feature or new function
- [ ] This is a backport pr
Bugfix cherry-pick branch check:
- [ ] I have checked the version labels which the pr will be auto-backported to the target branch
- [ ] 4.0
- [ ] 3.5
- [ ] 3.4
- [ ] 3.3
[!NOTE] Fixes macOS ARM64 build by falling back to pre-generated thrift/protobuf sources when gensrc is missing and enforcing system binutils across third-party builds; also relaxes RawString ABI guard for libc++.
- Build (macOS)
- Fallback to checked-in generated sources when
${GENSRC_DIR}/gen_cpporAgentService_types.cppis missing inbe/src/gen_cpp/CMakeLists.txtandbuild-mac/CMakeLists.txt, with warnings and hard errors if still absent.- Add sentinel checks for thrift outputs and ensure generated dirs exist before proceeding.
- Third-party build script (
build-mac/build_thirdparty.sh)
- Force macOS system binutils (
/usr/bin/ar,ranlib,strip) via env andcmake_toolchain_args; pass these to all CMake-based builds (gflags, glog, brpc, rocksdb, velocypack, vectorscan, simdutf, fmt, roaring, etc.).- Patch Boost build to use a custom clang toolset and system binutils; adjust
b2invocation accordingly.- Use system binutils when injecting libc++
__hash_memoryshims into archives (protobuf, vectorscan, roaring).- C++ source tweaks
- Add
be/src/gen_cpp/common/env_config.h(generated config stub).- Update
be/src/util/raw_container.hto allowRawStringoptimization under libc++ by guarding only against legacy libstdc++ ABI.Written by Cursor Bugbot for commit ba5b8e5f8b1ea30a4930fb87266154ffd51241b8. This will update automatically on new commits. Configure here.
🧪 CI Insights
Here's what we observed from your CI run for ba5b8e5f.
🟢 All jobs passed!
But CI Insights is watching 👀
@cursor review