isl-org / isl-org/Open3D

MacOS `clang` Build With 3rdparty `possionrecon` Fails at `build/poisson/src/ext_poisson/PoissonRecon/Src/SparseMatrix.inl`

Open
#7,500 1 comment 0 reactions 0 assignees View on GitHub
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

The `clang` build fails when compiling `possionrecon` at `build/poisson/src/ext_poisson/PoissonRecon/Src/SparseMatrix.inl ` with error:
> ```
> build/poisson/src/ext_poisson/PoissonRecon/Src/SparseMatrix.inl:466:24: error: reference to non-static member function must be called
> 466 | for( size_t i=0 ; i | ~~^~~~
> ```

A hack fix is in this [patch](https://github.com/macports/macports-ports/pull/32787/changes#diff-9b8836182edb05a981ad0add60e7ade59293219a81f60034bbc968d2bfc969f3) of `cpp/open3d/ml/impl/misc/VoxelPooling.h`, which hacks into the `cmake` build a patch of `${CMAKE_BINARY_DIR}/poisson/src/ext_poisson/PoissonRecon/Src/SparseMatrix.inl` that edits `A.rows ` into `A.rows() ` at lines 466 and 499:
```diff
--- ./3rdparty/possionrecon/possionrecon.cmake 2026-05-15 12:38:49
+++ ./3rdparty/possionrecon/possionrecon.cmake 2026-05-16 00:42:33
@@ -1,5 +1,27 @@
include(ExternalProject)

+# Fix https://github.com/isl-org/Open3D/issues/7390
+# A.rows() rather than A.rows
+set(PATCH_SCRIPT_NAME "fix_issue_7390.sh")
+set(PATCH_SCRIPT_PATH "${CMAKE_SOURCE_DIR}/3rdparty/possionrecon/${PATCH_SCRIPT_NAME}")
+if(NOT EXISTS "${PATCH_SCRIPT_PATH}")
+ file(GENERATE
+ OUTPUT "${PATCH_SCRIPT_PATH}"
+ CONTENT "#!/bin/bash -x
+
+if [ -f ${CMAKE_BINARY_DIR}/poisson/src/ext_poisson/PoissonRecon/Src/SparseMatrix.inl ] $ then
+ for lineno in 466 499 $ do
+ sed -E -i '' \"\$\{lineno\}s|(A\\.rows)([[:space:]]+)|\\1()\\2|\" \\
+ ${CMAKE_BINARY_DIR}/poisson/src/ext_poisson/PoissonRecon/Src/SparseMatrix.inl \\
+ && echo 'sed -E SUCCESSFUL' || echo 'sed -E FAILED' $
+ done $
+else
+ echo \"File '${CMAKE_BINARY_DIR}/poisson/src/ext_poisson/PoissonRecon/Src/SparseMatrix.inl' NOT FOUND!\" $
+fi"
+ FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+ )
+endif()
+
ExternalProject_Add(
ext_poisson
PREFIX poisson
@@ -10,7 +32,13 @@
UPDATE_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
- INSTALL_COMMAND ""

+ # INSTALL_COMMAND ""
+
+ INSTALL_COMMAND bash -x -c "if [ -x ${PATCH_SCRIPT_PATH} ] $ then \
+ ${PATCH_SCRIPT_PATH} $ \
+ else \
+ echo '${PATCH_SCRIPT_PATH} NOT FOUND!' $ \
+ fi"
)

ExternalProject_Get_Property(ext_poisson SOURCE_DIR)
```

### Additional information

Related: #7390

### Error message

```shell
build/poisson/src/ext_poisson/PoissonRecon/Src/SparseMatrix.inl:466:24: error: reference to non-static member function must be called
466 | for( size_t i=0 ; i

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.