Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Compilation: compiler finds both std::to_address and cuda::std::to_address #596

Open
BenjaminKrummenacher opened this issue Jun 11, 2024 · 3 comments

Comments

@BenjaminKrummenacher
Copy link

BenjaminKrummenacher commented Jun 11, 2024

Describe the bug
I'm trying to build the Nvidia Minkowski Engine.
However, I get this error:

error: more than one instance of overloaded function "std::__to_address" matches the argument list:
            function template "_Tp *cuda::std::__4::__to_address(_Tp *) noexcept" (declared at line 277 of /usr/local/cuda-12.4/targets/x86_64-linux/include/cuda/std/detail/libcxx/include/__memory/pointer_traits.h)
            function template "_Tp *std::__to_address(_Tp *) noexcept" (declared at line 156 of /usr/include/c++/9/bits/ptr_traits.h)

To Reproduce

git clone 
https://github.com/NVIDIA/MinkowskiEngine.git
cd MinkowskiEngine
python setup.py install

Desktop (please complete the following information):

  • OS: Ubuntu 20.04
  • Python version: 3.8.10
  • Pytorch version: 2.2.1
  • CUDA version: 12.4
  • NVIDIA Driver version: 525.147.05
  • Minkowski Engine version 0.5.4
==========System==========
Linux-5.4.0-182-generic-x86_64-with-glibc2.29
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.6 LTS"
3.8.10 (default, Nov 22 2023, 10:22:35) 
[GCC 9.4.0]
==========Pytorch==========
2.2.1+cu121
torch.cuda.is_available(): True
==========NVIDIA-SMI==========
/usr/bin/nvidia-smi
Driver Version 525.147.05
CUDA Version 12.0
VBIOS Version 94.06.2F.00.46
Image Version G001.0000.03.03
GSP Firmware Version N/A
==========NVCC==========
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Tue_Feb_27_16:19:38_PST_2024
Cuda compilation tools, release 12.4, V12.4.99
Build cuda_12.4.r12.4/compiler.33961263_0
==========CC==========
/usr/bin/c++
c++ (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

==========MinkowskiEngine==========
MinkowskiEngine not installed
@Yanbo-23
Copy link

you can solve it by modify the code in /usr/include/c++/9/bits/ptr_traits.h from ''auto __raw = __to_address(__r.get())" to ''auto __raw = std::__to_address(__r.get())"

@guker
Copy link

guker commented Nov 13, 2024

you can solve it by modify the code in /usr/include/c++/9/bits/ptr_traits.h from ''auto __raw = __to_address(__r.get())" to ''auto __raw = std::__to_address(__r.get())"

you should modify shared_ptr_base.h from ''auto __raw = __to_address(__r.get())" to ''auto __raw = std::__to_address(__r.get())"

@Bojack-BJ
Copy link

you can solve it by modify the code in /usr/include/c++/9/bits/ptr_traits.h from ''auto __raw = __to_address(__r.get())" to ''auto __raw = std::__to_address(__r.get())"

you should modify shared_ptr_base.h from ''auto __raw = __to_address(__r.get())" to ''auto __raw = std::__to_address(__r.get())"

Magically worked for me! I'm using ubuntu 20.04 with cuda 12.4

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants