arrayfire icon indicating copy to clipboard operation
arrayfire copied to clipboard

Build fails with "more than one instance of overloaded function "std::to_chars" matches the argument list" [Build]

Open anates opened this issue 2 years ago • 0 comments

Description

Build fails during compilation with error "more than one instance of overloaded function "std::to_chars" matches the argument list". Full output is given below. CMakeError.log and CMakeOutput.log are both attached.

Error Log

[  0%] Built target af_glad_obj_lib
[  0%] Built target af_glad
[  0%] Built target bin2cpp
[  0%] Built target cpu_sort_by_key_uchar
[  1%] Built target spdlog
[  1%] Built target cpu_sort_by_key_float
[  1%] Built target cpu_sort_by_key_double
[  1%] Built target cpu_sort_by_key_int
[  1%] Built target cpu_sort_by_key_uint
[  2%] Built target cpu_sort_by_key_intl
[  2%] Built target cpu_sort_by_key_uintl
[  2%] Built target cpu_sort_by_key_short
[  2%] Built target cpu_sort_by_key_ushort
[  2%] Built target cpu_sort_by_key_char
Consolidate compiler generated dependencies of target afcpu
[  2%] Building CXX object src/backend/cpu/CMakeFiles/afcpu.dir/__/common/util.cpp.o
icpc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is deprecated and will be removed from product release in the second half of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended compiler moving forward. Please transition to use this compiler. Use '-diag-disable=10441' to disable this message.
~/Downloads/git-files/arrayfire/src/backend/common/util.cpp(254): error: more than one instance of overloaded function "std::to_chars" matches the argument list:
            function "std::to_chars(char *, char *, char, int)" (declared at line 365 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, signed char, int)" (declared at line 366 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, unsigned char, int)" (declared at line 367 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, signed short, int)" (declared at line 368 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, unsigned short, int)" (declared at line 369 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, signed int, int)" (declared at line 370 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, unsigned int, int)" (declared at line 371 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, signed long, int)" (declared at line 372 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, unsigned long, int)" (declared at line 373 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, signed long long, int)" (declared at line 374 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, unsigned long long, int)" (declared at line 375 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, signed __int128_t, int)" (declared at line 377 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, __uint128_t, int)" (declared at line 378 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, bool, int)" (declared at line 396 of "/usr/include/c++/11/charconv")
            argument types are: (char *, char *, float)
      if (auto [ptr, ec] = std::to_chars(out.data(), out.data() + 128, value);
                           ^
          detected during instantiation of "std::string arrayfire::common::toString(T) [with T=float]" at line 278

~/Downloads/git-files/arrayfire/src/backend/common/util.cpp(254): error: more than one instance of overloaded function "std::to_chars" matches the argument list:
            function "std::to_chars(char *, char *, char, int)" (declared at line 365 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, signed char, int)" (declared at line 366 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, unsigned char, int)" (declared at line 367 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, signed short, int)" (declared at line 368 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, unsigned short, int)" (declared at line 369 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, signed int, int)" (declared at line 370 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, unsigned int, int)" (declared at line 371 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, signed long, int)" (declared at line 372 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, unsigned long, int)" (declared at line 373 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, signed long long, int)" (declared at line 374 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, unsigned long long, int)" (declared at line 375 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, signed __int128_t, int)" (declared at line 377 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, __uint128_t, int)" (declared at line 378 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, bool, int)" (declared at line 396 of "/usr/include/c++/11/charconv")
            argument types are: (char *, char *, double)
      if (auto [ptr, ec] = std::to_chars(out.data(), out.data() + 128, value);
                           ^
          detected during instantiation of "std::string arrayfire::common::toString(T) [with T=double]" at line 279

~/Downloads/git-files/arrayfire/src/backend/common/util.cpp(254): error: more than one instance of overloaded function "std::to_chars" matches the argument list:
            function "std::to_chars(char *, char *, char, int)" (declared at line 365 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, signed char, int)" (declared at line 366 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, unsigned char, int)" (declared at line 367 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, signed short, int)" (declared at line 368 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, unsigned short, int)" (declared at line 369 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, signed int, int)" (declared at line 370 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, unsigned int, int)" (declared at line 371 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, signed long, int)" (declared at line 372 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, unsigned long, int)" (declared at line 373 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, signed long long, int)" (declared at line 374 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, unsigned long long, int)" (declared at line 375 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, signed __int128_t, int)" (declared at line 377 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, __uint128_t, int)" (declared at line 378 of "/usr/include/c++/11/charconv")
            function "std::to_chars(char *, char *, bool, int)" (declared at line 396 of "/usr/include/c++/11/charconv")
            argument types are: (char *, char *, long double)
      if (auto [ptr, ec] = std::to_chars(out.data(), out.data() + 128, value);
                           ^
          detected during instantiation of "std::string arrayfire::common::toString(T) [with T=long double]" at line 280

compilation aborted for ~/Downloads/git-files/arrayfire/src/backend/common/util.cpp (code 2)
make[2]: *** [src/backend/cpu/CMakeFiles/afcpu.dir/build.make:4136: src/backend/cpu/CMakeFiles/afcpu.dir/__/common/util.cpp.o] Error 2
make[1]: *** [CMakeFiles/Makefile2:2927: src/backend/cpu/CMakeFiles/afcpu.dir/all] Error 2
make: *** [Makefile:166: all] Error 2

Build Environment

Compiler version: icc version 2021.9.0 (gcc version 11.3.0 compatibility) Operating system: Ubuntu 22.04 LTS CMake variables:

AF_BUILD_CPU:BOOL=ON
AF_BUILD_CUDA:BOOL=ON
AF_BUILD_DOCS:BOOL=ON
AF_BUILD_EXAMPLES:BOOL=ON
AF_BUILD_FORGE:BOOL=OFF
AF_BUILD_ONEAPI:BOOL=OFF
AF_BUILD_OPENCL:BOOL=ON
AF_BUILD_UNIFIED:BOOL=ON
AF_COMPUTE_LIBRARY:STRING=Intel-MKL
AF_CTEST_SEPARATED:BOOL=OFF
AF_STACKTRACE_TYPE:STRING=Basic
AF_WITH_CUDNN:BOOL=OFF
AF_WITH_EXTERNAL_PACKAGES_ONLY:BOOL=OFF
AF_WITH_FAST_MATH:BOOL=OFF
AF_WITH_FMT_HEADER_ONLY:BOOL=OFF
AF_WITH_SPDLOG_HEADER_ONLY:BOOL=OFF
AF_WITH_STATIC_CUDA_NUMERIC_LIBS:BOOL=OFF
BUILD_TESTING:BOOL=ON
Boost_DEBUG:BOOL=ON
Boost_DETAILED_FAILURE_MSG:BOOL=ON
CLBlast_DIR:PATH=CLBlast_DIR-NOTFOUND
CMAKE_BUILD_TYPE:STRING=Release
CMAKE_Fortran_COMPILER:FILEPATH=/opt/intel/oneapi/mpi/latest/bin/mpiifort
CMAKE_INSTALL_PREFIX:PATH=/media/storage/local_opt/arrayfire
ENABLE_BLACS:BOOL=OFF
ENABLE_BLAS95:BOOL=OFF
ENABLE_CDFT:BOOL=OFF
ENABLE_CPARDISO:BOOL=ON
ENABLE_LAPACK95:BOOL=OFF
ENABLE_OMP_OFFLOAD:BOOL=OFF
ENABLE_SCALAPACK:BOOL=ON
FETCHCONTENT_UPDATES_DISCONNECTED_SPAN-LITE:BOOL=OFF
GTest_DIR:PATH=GTest_DIR-NOTFOUND
MKL_ARCH:STRING=intel64
MKL_DIR:PATH=/opt/intel/oneapi/mkl/2023.1.0/lib/cmake/mkl
MKL_H:PATH=/opt/intel/oneapi/mkl/2023.1.0/include
MKL_LINK:STRING=dynamic
MKL_MPI:STRING=intelmpi
MKL_THREAD_LAYER:STRING=Intel OpenMP
MKL_mkl_avx2_LINK_LIBRARY:FILEPATH=MKL_mkl_avx2_LINK_LIBRARY-NOTFOUND
MKL_mkl_avx512_LINK_LIBRARY:FILEPATH=MKL_mkl_avx512_LINK_LIBRARY-NOTFOUND
MKL_mkl_avx_LINK_LIBRARY:FILEPATH=MKL_mkl_avx_LINK_LIBRARY-NOTFOUND
MKL_mkl_def_LINK_LIBRARY:FILEPATH=MKL_mkl_def_LINK_LIBRARY-NOTFOUND
MKL_mkl_mc3_LINK_LIBRARY:FILEPATH=MKL_mkl_mc3_LINK_LIBRARY-NOTFOUND
MKL_mkl_mc_LINK_LIBRARY:FILEPATH=MKL_mkl_mc_LINK_LIBRARY-NOTFOUND
NVPRUNE:FILEPATH=/usr/local/cuda-11.7/bin/nvprune
OMP_LIBRARY:FILEPATH=/opt/intel/oneapi/compiler/latest/linux/compiler/lib/intel64/libiomp5.so
cl2hpp_header_file_path:PATH=cl2hpp_header_file_path-NOTFOUND
cl2hpp_var:PATH=/home/riro/Downloads/git-files/arrayfire/build/extern/ocl_cl2hpp-src/include
mkl_blacs_intelmpi_lp64_file:FILEPATH=/opt/intel/oneapi/mkl/2023.1.0/lib/intel64/libmkl_blacs_intelmpi_lp64.so
mkl_core_file:FILEPATH=/opt/intel/oneapi/mkl/2023.1.0/lib/intel64/libmkl_core.so
mkl_intel_lp64_file:FILEPATH=/opt/intel/oneapi/mkl/2023.1.0/lib/intel64/libmkl_intel_lp64.so
mkl_intel_thread_file:FILEPATH=/opt/intel/oneapi/mkl/2023.1.0/lib/intel64/libmkl_intel_thread.so
mkl_scalapack_lp64_file:FILEPATH=/opt/intel/oneapi/mkl/2023.1.0/lib/intel64/libmkl_scalapack_lp64.so

CMakeError.log

CMakeOutput.log

anates avatar May 16 '23 10:05 anates