slfan1989 opened a new issue, #961:
URL: https://github.com/apache/hudi-rs/issues/961
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Description of the bug
The C++ file-group example fails to link on macOS arm64, even after the Rust
hudi-cpp library builds successfully.
The linker reports undefined references to the destructor, type information
and vtable of rust::cxxbridge1::Error.
The example compiles the generated CXX bridge source, but does not link the
matching cxx C++ runtime. The failure occurs during linking, before any table
reads or cloud access.
### Steps To Reproduce
```bash
export SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX26.5.sdk
./build-wrapper.sh cargo build -p hudi-cpp
cmake -S demo/apps/hudi-file-group-api/cpp \
-B target/cpp-example-repro \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_OSX_SYSROOT="$SDKROOT" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=14.0
cmake --build target/cpp-example-repro --parallel 2
```
The final command fails while linking `file_group_api_cpp`
### Expected behavior
The C++ example should compile and link successfully using the provided
CMake configuration, including the CXX bridge and its matching C++ runtime.
### Screenshots / Logs
```
[100%] Linking CXX executable file_group_api_cpp
Undefined symbols for architecture arm64:
"rust::cxxbridge1::Error::~Error()", referenced from: ...
"typeinfo for rust::cxxbridge1::Error", referenced from: ...
"vtable for rust::cxxbridge1::Error", referenced from: ...
ld: symbol(s) not found for architecture arm64
c++: error: linker command failed with exit code 1
```
### Software information
- Operating system: macOS 26.6.2, arm64
- Rust version: rustc 1.94.1
- Project version: 0.6.0-dev
- CMake version: 3.31.6
- C++ compiler: AppleClang 21.0.0
- macOS SDK used for reproduction: 26.5
- Build type: Debug
### Additional context
I have prepared a local fix that resolves hudi-cpp's actual cxx dependency
through Cargo metadata and compiles its C++ runtime alongside the generated
bridge.
With this change, the example links successfully.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]