MacOS Build with `USE_SYSTEM_EIGEN3=ON` Error on `#include <Eigen/Core>` in `cpp/open3d/ml/impl/misc/VoxelPooling.h`
- Dominant language
- C++
- Stars
- 14k
- Forks
- 2.6k
- Avg merge
- 5d 18h
- Merged PRs (30d)
- 6
Description
### Checklist
- [x] I have searched for [similar issues](https://github.com/isl-org/Open3D/issues).
- [x] For Python issues, I have tested with the [latest development wheel](https://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [x] I have checked the [release documentation](https://www.open3d.org/docs/release/) and the [latest documentation](https://www.open3d.org/docs/latest/) (for `main` branch).
### Steps to reproduce the issue
I’ve submitted a MacPorts Portfile for Open3D at https://github.com/macports/macports-ports/pull/32787
When building with `USE_SYSTEM_EIGEN3=ON`, there’s a `clang++` signature error on `#include ` in `cpp/open3d/ml/impl/misc/VoxelPooling.h`
A fix is in this [patch](https://github.com/macports/macports-ports/pull/32787/changes#diff-0eb4bb682e594793aa27fbff5068a8f24e77b7238f49ca9367eee2454b6d7818) of `cpp/open3d/ml/impl/misc/VoxelPooling.h`, which specifies Substitution Failure Is Not An Error to the preprocessor:
```diff
--- ./cpp/open3d/ml/impl/misc/VoxelPooling.h 2026-05-19 09:34:55
+++ ./cpp/open3d/ml/impl/misc/VoxelPooling.h 2026-05-19 13:31:10
@@ -35,10 +35,14 @@
"CENTER is not allowed for feature vectors");
}
- template
+ // SFINAE to fix `#include `
+ template , Derived3>::value>::type>
inline void AddPoint(const Eigen::MatrixBase& pos,
const Eigen::MatrixBase& voxel_center,
- const Eigen::ArrayBase& feat) {
+ // const Eigen::ArrayBase& feat) {
+ const Derived3& feat) {
bool new_nearest_neighbor = false;
TReal sqr_d = 0;
if (POS_FN == NEAREST_NEIGHBOR || FEAT_FN == NEAREST_NEIGHBOR) {
```
### Error message
```shell
Signature error on #include in cpp/open3d/ml/impl/misc/VoxelPooling.h
```
### Open3D, Python and System information
```markdown
- Operating system: macOS 26
- Python version: Python 3.14`
- Open3D version: 0.19.0`
- System architecture: arm64
- Is this a remote workstation?: no
- How did you install Open3D?: build from source
- Compiler version (if built from source): clang
```
### Additional information
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.