Open Delicates opened 6 days ago
I cannot reproduce this issue with CUDA 12.5 on Ubuntu 22.04 (GCC 11.4.0) or 24.04 (GCC 13.2.0).
You're not using the latest CUDA version. Did you try to update to 12.5? Also, please note that not even the latest CUDA supports your GCC version (14.1.1). The latest officially supported GCC version is 13.2.
I would suggest to try to use a supported combination of CUDA and GCC.
I tried GCC 12,13 and 14 - same error on all of them. The error is generated by nvcc, not by gcc, and the overloaded function is defined in the CUDA include. I can't upgrade CUDA to 12.5 yet due to another blocker.
I can't reproduce the issue with the same CUDA 12.3.107 version either, using a clean Docker image. The error message doesn't make much sense to me anyway. My best guess is that there might be an issue with your CUDA installation.
Tried re-installing CUDA, didn't help.
My naive guess is that the compiler doesn't know which of these 2 include files to use for the max() function definition:
Is the issue that the build should be using one of these files, but something pulls in both? This is on Gentoo by the way.
cmake -C oidn-2.3.0/work/oidn-2.3.0_build/gentoo_common_config.cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DOIDN_APPS=no -DOIDN_DEVICE_CPU=yes -DOIDN_DEVICE_CUDA=yes -DOIDN_DEVICE_HIP=no -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_TOOLCHAIN_FILE=oidn-2.3.0/work/oidn-2.3.0_build/gentoo_toolchain.cmake oidn-2.3.0/work/oidn-2.3.0
loading initial cache file oidn-2.3.0/work/oidn-2.3.0_build/gentoo_common_config.cmake
-- The C compiler identification is GNU 12.4.0
-- The CXX compiler identification is GNU 12.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/x86_64-pc-linux-gnu-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/x86_64-pc-linux-gnu-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Python: oidn-2.3.0/temp/python3.13/bin/python3 (found version "3.13.0") found components: Interpreter
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found Intel SPMD Compiler (ISPC): /usr/bin/ispc
-- <<< Gentoo configuration >>>
Build type RelWithDebInfo
Install path /usr
Compiler flags:
C -w -march=native -O2 -pipe -Wall -Wno-unknown-pragmas -Wno-strict-overflow -fPIC -Wformat -Wformat-security -Wmissing-field-initializers
C++ -w -march=native -O2 -pipe -Wall -Wno-unknown-pragmas -Wno-strict-overflow -fPIC -Wformat -Wformat-security -Wmissing-field-initializers
Linker flags:
Executable -Wl,-O1,--as-needed -pie -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now
Module -Wl,-O1,--as-needed
Shared -Wl,-O1,--as-needed -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now
This is the only patch Gentoo applies: https://gitweb.gentoo.org/repo/gentoo.git/tree/media-libs/oidn/files/oidn-2.2.2-amdgpu-targets.patch
Gentoo may not apply any relevant patches but it does apply custom build options. Could you please try to build OIDN from the unmodified original source without using any CMake config/toolchain files?
oidn-2.2.* and oidn-2.3.0 fail to build with CUDA 12: