mpi icon indicating copy to clipboard operation
mpi copied to clipboard

Compilation failure with Clang: non-type template argument is not a constant expression

Open m13253 opened this issue 1 year ago • 0 comments

Hello,

I am having trouble compiling this project using Clang. Can you help me troubleshoot what has gone wrong?

Thank you very much!

(P.S.: Then I tried to compile using GCC and got another error #8.)

$ clang --version
clang version 17.0.6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

$ mpiexec --version
mpiexec (Open MPI) 5.0.2

$ git clone -b 4.1.1 https://github.com/acdemiralp/mpi.git acdemiralp_mpi

$ cd acdemiralp_mpi

$ cmake -B build -S . -D CMAKE_C_COMPILER=clang -D CMAKE_CXX_COMPILER=clang++ -D MPI_BUILD_TESTS=ON -G Ninja
-- The C compiler identification is Clang 17.0.6
-- The CXX compiler identification is Clang 17.0.6
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/clang - 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/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found MPI_C: /usr/lib64/libmpi.so (found version "3.1")
-- Found MPI: TRUE (found version "3.1") found components: C
-- Configuring done (1.3s)
-- Generating done (0.0s)
-- Build files have been written to: /home/user/acdemiralp_mpi/build

$ ninja -C build
ninja: Entering directory `build'
[3/14] Building CXX object CMakeFiles/c_interface_test.dir/tests/c_interface_test.cpp.o
FAILED: CMakeFiles/c_interface_test.dir/tests/c_interface_test.cpp.o
/usr/bin/clang++  -I/home/user/acdemiralp_mpi/include -std=gnu++20 -MD -MT CMakeFiles/c_interface_test.dir/tests/c_interface_test.cpp.o -MF CMakeFiles/c_interface_test.dir/tests/c_interface_test.cpp.o.d -o CMakeFiles/c_interface_test.dir/tests/c_interface_test.cpp.o -c /home/user/acdemiralp_mpi/tests/c_interface_test.cpp
In file included from /home/user/acdemiralp_mpi/tests/c_interface_test.cpp:5:
In file included from /home/user/acdemiralp_mpi/include/mpi/all.hpp:39:
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:14:37: error: non-type template argument is not a constant expression
   14 | template <> struct data_type_traits<MPI_CHAR                   > { using type = char                     ; };
      |                                     ^~~~~~~~
/usr/include/mpi.h:1242:18: note: expanded from macro 'MPI_CHAR'
 1242 | #define MPI_CHAR OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_char)
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/mpi.h:423:46: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:14:37: note: cast from 'void *' is not allowed in a constant expression in C++ standards before C++2c
/usr/include/mpi.h:1242:18: note: expanded from macro 'MPI_CHAR'
 1242 | #define MPI_CHAR OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_char)
      |                  ^
/usr/include/mpi.h:423:47: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                               ^
In file included from /home/user/acdemiralp_mpi/tests/c_interface_test.cpp:5:
In file included from /home/user/acdemiralp_mpi/include/mpi/all.hpp:39:
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:15:37: error: non-type template argument is not a constant expression
   15 | template <> struct data_type_traits<MPI_SHORT                  > { using type = short                    ; };
      |                                     ^~~~~~~~~
/usr/include/mpi.h:1243:19: note: expanded from macro 'MPI_SHORT'
 1243 | #define MPI_SHORT OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_short)
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/mpi.h:423:46: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:15:37: note: cast from 'void *' is not allowed in a constant expression in C++ standards before C++2c
/usr/include/mpi.h:1243:19: note: expanded from macro 'MPI_SHORT'
 1243 | #define MPI_SHORT OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_short)
      |                   ^
/usr/include/mpi.h:423:47: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                               ^
In file included from /home/user/acdemiralp_mpi/tests/c_interface_test.cpp:5:
In file included from /home/user/acdemiralp_mpi/include/mpi/all.hpp:39:
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:16:37: error: non-type template argument is not a constant expression
   16 | template <> struct data_type_traits<MPI_INT                    > { using type = int                      ; };
      |                                     ^~~~~~~
/usr/include/mpi.h:1244:17: note: expanded from macro 'MPI_INT'
 1244 | #define MPI_INT OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_int)
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/mpi.h:423:46: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:16:37: note: cast from 'void *' is not allowed in a constant expression in C++ standards before C++2c
/usr/include/mpi.h:1244:17: note: expanded from macro 'MPI_INT'
 1244 | #define MPI_INT OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_int)
      |                 ^
/usr/include/mpi.h:423:47: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                               ^
In file included from /home/user/acdemiralp_mpi/tests/c_interface_test.cpp:5:
In file included from /home/user/acdemiralp_mpi/include/mpi/all.hpp:39:
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:17:37: error: non-type template argument is not a constant expression
   17 | template <> struct data_type_traits<MPI_LONG                   > { using type = long                     ; };
      |                                     ^~~~~~~~
/usr/include/mpi.h:1245:18: note: expanded from macro 'MPI_LONG'
 1245 | #define MPI_LONG OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_long)
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/mpi.h:423:46: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:17:37: note: cast from 'void *' is not allowed in a constant expression in C++ standards before C++2c
/usr/include/mpi.h:1245:18: note: expanded from macro 'MPI_LONG'
 1245 | #define MPI_LONG OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_long)
      |                  ^
/usr/include/mpi.h:423:47: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                               ^
In file included from /home/user/acdemiralp_mpi/tests/c_interface_test.cpp:5:
In file included from /home/user/acdemiralp_mpi/include/mpi/all.hpp:39:
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:18:37: error: non-type template argument is not a constant expression
   18 | template <> struct data_type_traits<MPI_LONG_LONG              > { using type = long long                ; };
      |                                     ^~~~~~~~~~~~~
/usr/include/mpi.h:1264:23: note: expanded from macro 'MPI_LONG_LONG'
 1264 | #define MPI_LONG_LONG OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_long_long_int)
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/mpi.h:423:46: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:18:37: note: cast from 'void *' is not allowed in a constant expression in C++ standards before C++2c
/usr/include/mpi.h:1264:23: note: expanded from macro 'MPI_LONG_LONG'
 1264 | #define MPI_LONG_LONG OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_long_long_int)
      |                       ^
/usr/include/mpi.h:423:47: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                               ^
In file included from /home/user/acdemiralp_mpi/tests/c_interface_test.cpp:5:
In file included from /home/user/acdemiralp_mpi/include/mpi/all.hpp:39:
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:19:37: error: non-type template argument is not a constant expression
   19 | template <> struct data_type_traits<MPI_SIGNED_CHAR            > { using type = signed char              ; };
      |                                     ^~~~~~~~~~~~~~~
/usr/include/mpi.h:1250:25: note: expanded from macro 'MPI_SIGNED_CHAR'
 1250 | #define MPI_SIGNED_CHAR OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_signed_char)
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/mpi.h:423:46: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:19:37: note: cast from 'void *' is not allowed in a constant expression in C++ standards before C++2c
/usr/include/mpi.h:1250:25: note: expanded from macro 'MPI_SIGNED_CHAR'
 1250 | #define MPI_SIGNED_CHAR OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_signed_char)
      |                         ^
/usr/include/mpi.h:423:47: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                               ^
In file included from /home/user/acdemiralp_mpi/tests/c_interface_test.cpp:5:
In file included from /home/user/acdemiralp_mpi/include/mpi/all.hpp:39:
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:20:37: error: non-type template argument is not a constant expression
   20 | template <> struct data_type_traits<MPI_UNSIGNED_CHAR          > { using type = unsigned char            ; };
      |                                     ^~~~~~~~~~~~~~~~~
/usr/include/mpi.h:1249:27: note: expanded from macro 'MPI_UNSIGNED_CHAR'
 1249 | #define MPI_UNSIGNED_CHAR OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_unsigned_char)
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/mpi.h:423:46: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:20:37: note: cast from 'void *' is not allowed in a constant expression in C++ standards before C++2c
/usr/include/mpi.h:1249:27: note: expanded from macro 'MPI_UNSIGNED_CHAR'
 1249 | #define MPI_UNSIGNED_CHAR OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_unsigned_char)
      |                           ^
/usr/include/mpi.h:423:47: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                               ^
In file included from /home/user/acdemiralp_mpi/tests/c_interface_test.cpp:5:
In file included from /home/user/acdemiralp_mpi/include/mpi/all.hpp:39:
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:21:37: error: non-type template argument is not a constant expression
   21 | template <> struct data_type_traits<MPI_UNSIGNED_SHORT         > { using type = unsigned short           ; };
      |                                     ^~~~~~~~~~~~~~~~~~
/usr/include/mpi.h:1251:28: note: expanded from macro 'MPI_UNSIGNED_SHORT'
 1251 | #define MPI_UNSIGNED_SHORT OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_unsigned_short)
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/mpi.h:423:46: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:21:37: note: cast from 'void *' is not allowed in a constant expression in C++ standards before C++2c
/usr/include/mpi.h:1251:28: note: expanded from macro 'MPI_UNSIGNED_SHORT'
 1251 | #define MPI_UNSIGNED_SHORT OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_unsigned_short)
      |                            ^
/usr/include/mpi.h:423:47: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                               ^
In file included from /home/user/acdemiralp_mpi/tests/c_interface_test.cpp:5:
In file included from /home/user/acdemiralp_mpi/include/mpi/all.hpp:39:
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:22:37: error: non-type template argument is not a constant expression
   22 | template <> struct data_type_traits<MPI_UNSIGNED               > { using type = unsigned                 ; };
      |                                     ^~~~~~~~~~~~
/usr/include/mpi.h:1253:22: note: expanded from macro 'MPI_UNSIGNED'
 1253 | #define MPI_UNSIGNED OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_unsigned)
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/mpi.h:423:46: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:22:37: note: cast from 'void *' is not allowed in a constant expression in C++ standards before C++2c
/usr/include/mpi.h:1253:22: note: expanded from macro 'MPI_UNSIGNED'
 1253 | #define MPI_UNSIGNED OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_unsigned)
      |                      ^
/usr/include/mpi.h:423:47: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                               ^
In file included from /home/user/acdemiralp_mpi/tests/c_interface_test.cpp:5:
In file included from /home/user/acdemiralp_mpi/include/mpi/all.hpp:39:
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:23:37: error: non-type template argument is not a constant expression
   23 | template <> struct data_type_traits<MPI_UNSIGNED_LONG          > { using type = unsigned long            ; };
      |                                     ^~~~~~~~~~~~~~~~~
/usr/include/mpi.h:1252:27: note: expanded from macro 'MPI_UNSIGNED_LONG'
 1252 | #define MPI_UNSIGNED_LONG OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_unsigned_long)
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/mpi.h:423:46: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:23:37: note: cast from 'void *' is not allowed in a constant expression in C++ standards before C++2c
/usr/include/mpi.h:1252:27: note: expanded from macro 'MPI_UNSIGNED_LONG'
 1252 | #define MPI_UNSIGNED_LONG OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_unsigned_long)
      |                           ^
/usr/include/mpi.h:423:47: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                               ^
In file included from /home/user/acdemiralp_mpi/tests/c_interface_test.cpp:5:
In file included from /home/user/acdemiralp_mpi/include/mpi/all.hpp:39:
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:24:37: error: non-type template argument is not a constant expression
   24 | template <> struct data_type_traits<MPI_UNSIGNED_LONG_LONG     > { using type = unsigned long long       ; };
      |                                     ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/mpi.h:1265:32: note: expanded from macro 'MPI_UNSIGNED_LONG_LONG'
 1265 | #define MPI_UNSIGNED_LONG_LONG OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_unsigned_long_long)
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/mpi.h:423:46: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:24:37: note: cast from 'void *' is not allowed in a constant expression in C++ standards before C++2c
/usr/include/mpi.h:1265:32: note: expanded from macro 'MPI_UNSIGNED_LONG_LONG'
 1265 | #define MPI_UNSIGNED_LONG_LONG OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_unsigned_long_long)
      |                                ^
/usr/include/mpi.h:423:47: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                               ^
In file included from /home/user/acdemiralp_mpi/tests/c_interface_test.cpp:5:
In file included from /home/user/acdemiralp_mpi/include/mpi/all.hpp:39:
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:25:37: error: non-type template argument is not a constant expression
   25 | template <> struct data_type_traits<MPI_FLOAT                  > { using type = float                    ; };
      |                                     ^~~~~~~~~
/usr/include/mpi.h:1246:19: note: expanded from macro 'MPI_FLOAT'
 1246 | #define MPI_FLOAT OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_float)
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/mpi.h:423:46: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:25:37: note: cast from 'void *' is not allowed in a constant expression in C++ standards before C++2c
/usr/include/mpi.h:1246:19: note: expanded from macro 'MPI_FLOAT'
 1246 | #define MPI_FLOAT OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_float)
      |                   ^
/usr/include/mpi.h:423:47: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                               ^
In file included from /home/user/acdemiralp_mpi/tests/c_interface_test.cpp:5:
In file included from /home/user/acdemiralp_mpi/include/mpi/all.hpp:39:
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:26:37: error: non-type template argument is not a constant expression
   26 | template <> struct data_type_traits<MPI_DOUBLE                 > { using type = double                   ; };
      |                                     ^~~~~~~~~~
/usr/include/mpi.h:1247:20: note: expanded from macro 'MPI_DOUBLE'
 1247 | #define MPI_DOUBLE OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_double)
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/mpi.h:423:46: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:26:37: note: cast from 'void *' is not allowed in a constant expression in C++ standards before C++2c
/usr/include/mpi.h:1247:20: note: expanded from macro 'MPI_DOUBLE'
 1247 | #define MPI_DOUBLE OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_double)
      |                    ^
/usr/include/mpi.h:423:47: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                               ^
In file included from /home/user/acdemiralp_mpi/tests/c_interface_test.cpp:5:
In file included from /home/user/acdemiralp_mpi/include/mpi/all.hpp:39:
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:27:37: error: non-type template argument is not a constant expression
   27 | template <> struct data_type_traits<MPI_LONG_DOUBLE            > { using type = long double              ; };
      |                                     ^~~~~~~~~~~~~~~
/usr/include/mpi.h:1248:25: note: expanded from macro 'MPI_LONG_DOUBLE'
 1248 | #define MPI_LONG_DOUBLE OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_long_double)
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/mpi.h:423:46: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:27:37: note: cast from 'void *' is not allowed in a constant expression in C++ standards before C++2c
/usr/include/mpi.h:1248:25: note: expanded from macro 'MPI_LONG_DOUBLE'
 1248 | #define MPI_LONG_DOUBLE OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_long_double)
      |                         ^
/usr/include/mpi.h:423:47: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                               ^
In file included from /home/user/acdemiralp_mpi/tests/c_interface_test.cpp:5:
In file included from /home/user/acdemiralp_mpi/include/mpi/all.hpp:39:
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:28:37: error: non-type template argument is not a constant expression
   28 | template <> struct data_type_traits<MPI_WCHAR                  > { using type = wchar_t                  ; };
      |                                     ^~~~~~~~~
/usr/include/mpi.h:1261:19: note: expanded from macro 'MPI_WCHAR'
 1261 | #define MPI_WCHAR OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_wchar)
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/mpi.h:423:46: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:28:37: note: cast from 'void *' is not allowed in a constant expression in C++ standards before C++2c
/usr/include/mpi.h:1261:19: note: expanded from macro 'MPI_WCHAR'
 1261 | #define MPI_WCHAR OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_wchar)
      |                   ^
/usr/include/mpi.h:423:47: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                               ^
In file included from /home/user/acdemiralp_mpi/tests/c_interface_test.cpp:5:
In file included from /home/user/acdemiralp_mpi/include/mpi/all.hpp:39:
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:29:37: error: non-type template argument is not a constant expression
   29 | template <> struct data_type_traits<MPI_INT8_T                 > { using type = std::int8_t              ; };
      |                                     ^~~~~~~~~~
/usr/include/mpi.h:1334:35: note: expanded from macro 'MPI_INT8_T'
 1334 | #define MPI_INT8_T                OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_int8_t)
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/mpi.h:423:46: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:29:37: note: cast from 'void *' is not allowed in a constant expression in C++ standards before C++2c
/usr/include/mpi.h:1334:35: note: expanded from macro 'MPI_INT8_T'
 1334 | #define MPI_INT8_T                OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_int8_t)
      |                                   ^
/usr/include/mpi.h:423:47: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                               ^
In file included from /home/user/acdemiralp_mpi/tests/c_interface_test.cpp:5:
In file included from /home/user/acdemiralp_mpi/include/mpi/all.hpp:39:
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:30:37: error: non-type template argument is not a constant expression
   30 | template <> struct data_type_traits<MPI_INT16_T                > { using type = std::int16_t             ; };
      |                                     ^~~~~~~~~~~
/usr/include/mpi.h:1336:35: note: expanded from macro 'MPI_INT16_T'
 1336 | #define MPI_INT16_T               OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_int16_t)
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/mpi.h:423:46: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:30:37: note: cast from 'void *' is not allowed in a constant expression in C++ standards before C++2c
/usr/include/mpi.h:1336:35: note: expanded from macro 'MPI_INT16_T'
 1336 | #define MPI_INT16_T               OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_int16_t)
      |                                   ^
/usr/include/mpi.h:423:47: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                               ^
In file included from /home/user/acdemiralp_mpi/tests/c_interface_test.cpp:5:
In file included from /home/user/acdemiralp_mpi/include/mpi/all.hpp:39:
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:31:37: error: non-type template argument is not a constant expression
   31 | template <> struct data_type_traits<MPI_INT32_T                > { using type = std::int32_t             ; };
      |                                     ^~~~~~~~~~~
/usr/include/mpi.h:1338:35: note: expanded from macro 'MPI_INT32_T'
 1338 | #define MPI_INT32_T               OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_int32_t)
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/mpi.h:423:46: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:31:37: note: cast from 'void *' is not allowed in a constant expression in C++ standards before C++2c
/usr/include/mpi.h:1338:35: note: expanded from macro 'MPI_INT32_T'
 1338 | #define MPI_INT32_T               OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_int32_t)
      |                                   ^
/usr/include/mpi.h:423:47: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                               ^
In file included from /home/user/acdemiralp_mpi/tests/c_interface_test.cpp:5:
In file included from /home/user/acdemiralp_mpi/include/mpi/all.hpp:39:
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:32:37: error: non-type template argument is not a constant expression
   32 | template <> struct data_type_traits<MPI_INT64_T                > { using type = std::int64_t             ; };
      |                                     ^~~~~~~~~~~
/usr/include/mpi.h:1340:35: note: expanded from macro 'MPI_INT64_T'
 1340 | #define MPI_INT64_T               OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_int64_t)
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/mpi.h:423:46: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/acdemiralp_mpi/include/mpi/core/type/data_type_traits.hpp:32:37: note: cast from 'void *' is not allowed in a constant expression in C++ standards before C++2c
/usr/include/mpi.h:1340:35: note: expanded from macro 'MPI_INT64_T'
 1340 | #define MPI_INT64_T               OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_int64_t)
      |                                   ^
/usr/include/mpi.h:423:47: note: expanded from macro 'OMPI_PREDEFINED_GLOBAL'
  423 | #define OMPI_PREDEFINED_GLOBAL(type, global) (static_cast<type> (static_cast<void *> (&(global))))
      |                                               ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
ninja: build stopped: subcommand failed.

m13253 avatar Mar 20 '24 05:03 m13253