error: invalid conversion from ‘EmptyKernelPtr’ {aka ‘void (*)()’} to ‘const void*’
- 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](http://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](http://www.open3d.org/docs/release/) and the [latest documentation](http://www.open3d.org/docs/latest/) (for `master` branch).
### Steps to reproduce the issue
#### I first cloned Open3D by:
```
git clone https://github.com/isl-org/Open3D.git
cd Open3D
```
#### Then, I build Open3D (on Ubuntu 20.04, with CUDA 11.5) with:
```
mkdir build
cd build
cmake -DBUILD_SHARED_LIBS=OFF -DBUILD_CUDA_MODULE=OFF -DUSE_BLAS=ON -DBUILD_WEBRTC=OFF ..
make -j$(nproc)
```
### Error message
```shell
[ 60%] Building CXX object src/stdgpu/CMakeFiles/stdgpu.dir/impl/iterator.cpp.o
In file included from /usr/local/cuda/include/nv/detail/__target_macros:13,
from /usr/local/cuda/include/nv/target:199,
from /usr/local/cuda/include/cub/detail/device_synchronize.cuh:23,
from /usr/local/cuda/include/thrust/system/cuda/detail/util.h:36,
from /usr/local/cuda/include/thrust/system/cuda/detail/malloc_and_free.h:26,
from /usr/local/cuda/include/thrust/system/detail/adl/malloc_and_free.h:42,
from /usr/local/cuda/include/thrust/system/detail/generic/memory.inl:22,
from /usr/local/cuda/include/thrust/system/detail/generic/memory.h:69,
from /usr/local/cuda/include/thrust/detail/reference.h:28,
from ....../Open3D/build/stdgpu/src/ext_stdgpu/src/stdgpu/../stdgpu/iterator.h:30,
from ....../Open3D/build/stdgpu/src/ext_stdgpu/src/stdgpu/../stdgpu/impl/memory_detail.h:25,
from ....../Open3D/build/stdgpu/src/ext_stdgpu/src/stdgpu/../stdgpu/memory.h:879,
from ....../Open3D/build/stdgpu/src/ext_stdgpu/src/stdgpu/../stdgpu/cuda/memory.h:21,
from ....../Open3D/build/stdgpu/src/ext_stdgpu/src/stdgpu/cuda/impl/memory.cpp:16:
/usr/local/cuda/include/cub/util_device.cuh: In function ‘cudaError_t cub::PtxVersionUncached(int&)’:
/usr/local/cuda/include/cub/util_device.cuh:368:15: error: invalid conversion from ‘EmptyKernelPtr’ {aka ‘void (*)()’} to ‘const void*’ [-fpermissive]
368 | if (CubDebug(result = cudaFuncGetAttributes(&empty_kernel_attrs,
| ^~~~~~~~
| |
| EmptyKernelPtr {aka void (*)()}
In file included from /usr/local/cuda/include/thrust/system/cuda/detail/guarded_cuda_runtime_api.h:38,
from /usr/local/cuda/include/thrust/system/cuda/detail/malloc_and_free.h:19,
from /usr/local/cuda/include/thrust/system/detail/adl/malloc_and_free.h:42,
from /usr/local/cuda/include/thrust/system/detail/generic/memory.inl:22,
from /usr/local/cuda/include/thrust/system/detail/generic/memory.h:69,
from /usr/local/cuda/include/thrust/detail/reference.h:28,
from ....../Open3D/build/stdgpu/src/ext_stdgpu/src/stdgpu/../stdgpu/iterator.h:30,
from ....../Open3D/build/stdgpu/src/ext_stdgpu/src/stdgpu/../stdgpu/impl/memory_detail.h:25,
from ....../Open3D/build/stdgpu/src/ext_stdgpu/src/stdgpu/../stdgpu/memory.h:879,
from ....../Open3D/build/stdgpu/src/ext_stdgpu/src/stdgpu/../stdgpu/cuda/memory.h:21,
from ....../Open3D/build/stdgpu/src/ext_stdgpu/src/stdgpu/cuda/impl/memory.cpp:16:
/usr/local/cuda/include/cuda_runtime_api.h:4337:125: note: initializing argument 2 of ‘cudaError_t cudaFuncGetAttributes(cudaFuncAttributes*, const void*)’
4337 | extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaFuncGetAttributes(struct cudaFuncAttributes *attr, const void *func);
| ~~~~~~~~~~~~^~~~
make[5]: *** [src/stdgpu/CMakeFiles/stdgpu.dir/build.make:118: src/stdgpu/CMakeFiles/stdgpu.dir/cuda/impl/memory.cpp.o] Error 1
make[5]: *** Waiting for unfinished jobs....
In file included from /usr/local/cuda/include/nv/detail/__target_macros:13,
from /usr/local/cuda/include/nv/target:199,
from /usr/local/cuda/include/cub/detail/device_synchronize.cuh:23,
from /usr/local/cuda/include/thrust/system/cuda/detail/util.h:36,
from /usr/local/cuda/include/thrust/system/cuda/detail/malloc_and_free.h:26,
from /usr/local/cuda/include/thrust/system/detail/adl/malloc_and_free.h:42,
from /usr/local/cuda/include/thrust/system/detail/generic/memory.inl:22,
from /usr/local/cuda/include/thrust/system/detail/generic/memory.h:69,
from /usr/local/cuda/include/thrust/detail/reference.h:28,
from ....../Open3D/build/stdgpu/src/ext_stdgpu/src/stdgpu/../stdgpu/iterator.h:30,
from ....../Open3D/build/stdgpu/src/ext_stdgpu/src/stdgpu/impl/iterator.cpp:16:
/usr/local/cuda/include/cub/util_device.cuh: In function ‘cudaError_t cub::PtxVersionUncached(int&)’:
/usr/local/cuda/include/cub/util_device.cuh:368:15: error: invalid conversion from ‘EmptyKernelPtr’ {aka ‘void (*)()’} to ‘const void*’ [-fpermissive]
368 | if (CubDebug(result = cudaFuncGetAttributes(&empty_kernel_attrs,
| ^~~~~~~~
| |
| EmptyKernelPtr {aka void (*)()}
In file included from /usr/local/cuda/include/thrust/system/cuda/detail/guarded_cuda_runtime_api.h:38,
from /usr/local/cuda/include/thrust/system/cuda/detail/malloc_and_free.h:19,
from /usr/local/cuda/include/thrust/system/detail/adl/malloc_and_free.h:42,
from /usr/local/cuda/include/thrust/system/detail/generic/memory.inl:22,
from /usr/local/cuda/include/thrust/system/detail/generic/memory.h:69,
from /usr/local/cuda/include/thrust/detail/reference.h:28,
from ....../Open3D/build/stdgpu/src/ext_stdgpu/src/stdgpu/../stdgpu/iterator.h:30,
from ....../Open3D/build/stdgpu/src/ext_stdgpu/src/stdgpu/impl/iterator.cpp:16:
/usr/local/cuda/include/cuda_runtime_api.h:4337:125: note: initializing argument 2 of ‘cudaError_t cudaFuncGetAttributes(cudaFuncAttributes*, const void*)’
4337 | extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaFuncGetAttributes(struct cudaFuncAttributes *attr, const void *func);
| ~~~~~~~~~~~~^~~~
make[5]: *** [src/stdgpu/CMakeFiles/stdgpu.dir/build.make:76: src/stdgpu/CMakeFiles/stdgpu.dir/impl/iterator.cpp.o] Error 1
In file included from /usr/local/cuda/include/nv/detail/__target_macros:13,
from /usr/local/cuda/include/nv/target:199,
from /usr/local/cuda/include/cub/detail/device_synchronize.cuh:23,
from /usr/local/cuda/include/thrust/system/cuda/detail/util.h:36,
from /usr/local/cuda/include/thrust/system/cuda/detail/malloc_and_free.h:26,
from /usr/local/cuda/include/thrust/system/detail/adl/malloc_and_free.h:42,
from /usr/local/cuda/include/thrust/system/detail/generic/memory.inl:22,
from /usr/local/cuda/include/thrust/system/detail/generic/memory.h:69,
from /usr/local/cuda/include/thrust/detail/reference.h:28,
from ....../Open3D/build/stdgpu/src/ext_stdgpu/src/stdgpu/../stdgpu/iterator.h:30,
from ....../Open3D/build/stdgpu/src/ext_stdgpu/src/stdgpu/../stdgpu/impl/memory_detail.h:25,
from ....../Open3D/build/stdgpu/src/ext_stdgpu/src/stdgpu/../stdgpu/memory.h:879,
from ....../Open3D/build/stdgpu/src/ext_stdgpu/src/stdgpu/impl/memory.cpp:16:
/usr/local/cuda/include/cub/util_device.cuh: In function ‘cudaError_t cub::PtxVersionUncached(int&)’:
/usr/local/cuda/include/cub/util_device.cuh:368:15: error: invalid conversion from ‘EmptyKernelPtr’ {aka ‘void (*)()’} to ‘const void*’ [-fpermissive]
368 | if (CubDebug(result = cudaFuncGetAttributes(&empty_kernel_attrs,
| ^~~~~~~~
| |
| EmptyKernelPtr {aka void (*)()}
In file included from /usr/local/cuda/include/thrust/system/cuda/detail/guarded_cuda_runtime_api.h:38,
from /usr/local/cuda/include/thrust/system/cuda/detail/malloc_and_free.h:19,
from /usr/local/cuda/include/thrust/system/detail/adl/malloc_and_free.h:42,
from /usr/local/cuda/include/thrust/system/detail/generic/memory.inl:22,
from /usr/local/cuda/include/thrust/system/detail/generic/memory.h:69,
from /usr/local/cuda/include/thrust/detail/reference.h:28,
from ....../Open3D/build/stdgpu/src/ext_stdgpu/src/stdgpu/../stdgpu/iterator.h:30,
from ....../Open3D/build/stdgpu/src/ext_stdgpu/src/stdgpu/../stdgpu/impl/memory_detail.h:25,
from ....../Open3D/build/stdgpu/src/ext_stdgpu/src/stdgpu/../stdgpu/memory.h:879,
from ....../Open3D/build/stdgpu/src/ext_stdgpu/src/stdgpu/impl/memory.cpp:16:
/usr/local/cuda/include/cuda_runtime_api.h:4337:125: note: initializing argument 2 of ‘cudaError_t cudaFuncGetAttributes(cudaFuncAttributes*, const void*)’
4337 | extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaFuncGetAttributes(struct cudaFuncAttributes *attr, const void *func);
| ~~~~~~~~~~~~^~~~
make[5]: *** [src/stdgpu/CMakeFiles/stdgpu.dir/build.make:90: src/stdgpu/CMakeFiles/stdgpu.dir/impl/memory.cpp.o] Error 1
make[5]: Leaving directory '....../Open3D/build/stdgpu/src/ext_stdgpu-build'
make[4]: *** [CMakeFiles/Makefile2:175: src/stdgpu/CMakeFiles/stdgpu.dir/all] Error 2
make[4]: Leaving directory '....../Open3D/build/stdgpu/src/ext_stdgpu-build'
make[3]: *** [Makefile:136: all] Error 2
make[3]: Leaving directory '....../Open3D/build/stdgpu/src/ext_stdgpu-build'
make[2]: *** [CMakeFiles/ext_stdgpu.dir/build.make:89: stdgpu/src/ext_stdgpu-stamp/ext_stdgpu-build] Error 2
make[2]: Leaving directory '....../Open3D/build'
make[1]: *** [CMakeFiles/Makefile2:1308: CMakeFiles/ext_stdgpu.dir/all] Error 2
make[1]: Leaving directory '....../Open3D/build'
make: *** [Makefile:159: all] Error 2
```
### Open3D, Python and System information
```markdown
- Operating system: Ubuntu 22.04
- Python version: Python 3.10.4
- Open3D version: master branch of the day 2022-06-13
- System architecture: x86
- Is this a remote workstation?: no
- How did you install Open3D?: build from source
- Compiler version (if built from source): gcc 11.2 / clang 14.0
```
### Additional information
As long as I enable this **BUILD_CUDA_MODULE**, I got the above **ERROR** message...
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.