dealii / candi

candi - (Compile & Install) - Downloads, configures, builds and installs deal.II
GNU Lesser General Public License v3.0
63 stars 61 forks source link

Ubuntu 23.10 issues? #376

Closed cmarcotte closed 7 months ago

cmarcotte commented 7 months ago

Hello, I am running into a persistent issue with building Trilinos on Ubunu 23.10 with gcc 13.2.0 on x86. I couldn't find anything quite similar in the existing issues. The output of the error (truncated to post-config) is:

Finished configuring Trilinos!

-- Configuring done (4.8s)
-- Generating done (0.7s)
-- Build files have been written to: /home/user/dealii-candi/tmp/build/trilinos-release-13-2-0
[  0%] Built target gtest
[  0%] Building CXX object packages/kokkos/core/src/CMakeFiles/kokkoscore.dir/impl/Kokkos_MemoryPool.cpp.o
/home/user/dealii-candi/tmp/unpack/Trilinos-trilinos-release-13-2-0/packages/kokkos/core/src/impl/Kokkos_MemoryPool.cpp:112:48: error: ‘uint32_t’ has not been declared
  112 | void _print_memory_pool_state(std::ostream& s, uint32_t const* sb_state_ptr,
      |                                                ^~~~~~~~
/home/user/dealii-candi/tmp/unpack/Trilinos-trilinos-release-13-2-0/packages/kokkos/core/src/impl/Kokkos_MemoryPool.cpp:113:49: error: ‘uint32_t’ has not been declared
  113 |                               int32_t sb_count, uint32_t sb_size_lg2,
      |                                                 ^~~~~~~~
/home/user/dealii-candi/tmp/unpack/Trilinos-trilinos-release-13-2-0/packages/kokkos/core/src/impl/Kokkos_MemoryPool.cpp:114:31: error: ‘uint32_t’ has not been declared
  114 |                               uint32_t sb_state_size, uint32_t state_shift,
      |                               ^~~~~~~~
/home/user/dealii-candi/tmp/unpack/Trilinos-trilinos-release-13-2-0/packages/kokkos/core/src/impl/Kokkos_MemoryPool.cpp:114:55: error: ‘uint32_t’ has not been declared
  114 |                               uint32_t sb_state_size, uint32_t state_shift,
      |                                                       ^~~~~~~~
/home/user/dealii-candi/tmp/unpack/Trilinos-trilinos-release-13-2-0/packages/kokkos/core/src/impl/Kokkos_MemoryPool.cpp:115:31: error: ‘uint32_t’ has not been declared
  115 |                               uint32_t state_used_mask) {
      |                               ^~~~~~~~
/home/user/dealii-candi/tmp/unpack/Trilinos-trilinos-release-13-2-0/packages/kokkos/core/src/impl/Kokkos_MemoryPool.cpp: In function ‘void Kokkos::Impl::_print_memory_pool_state(std::ostream&, const int*, int32_t, int, int, int, int)’:
/home/user/dealii-candi/tmp/unpack/Trilinos-trilinos-release-13-2-0/packages/kokkos/core/src/impl/Kokkos_MemoryPool.cpp:121:13: error: ‘uint32_t’ does not name a type
  121 |       const uint32_t block_count_lg2 = (*sb_state_ptr) >> state_shift;
      |             ^~~~~~~~
/home/user/dealii-candi/tmp/unpack/Trilinos-trilinos-release-13-2-0/packages/kokkos/core/src/impl/Kokkos_MemoryPool.cpp:49:1: note: ‘uint32_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
   48 | #include <sstream>
  +++ |+#include <cstdint>
   49 | 
/home/user/dealii-candi/tmp/unpack/Trilinos-trilinos-release-13-2-0/packages/kokkos/core/src/impl/Kokkos_MemoryPool.cpp:122:13: error: ‘uint32_t’ does not name a type
  122 |       const uint32_t block_size_lg2  = sb_size_lg2 - block_count_lg2;
      |             ^~~~~~~~
/home/user/dealii-candi/tmp/unpack/Trilinos-trilinos-release-13-2-0/packages/kokkos/core/src/impl/Kokkos_MemoryPool.cpp:122:13: note: ‘uint32_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/home/user/dealii-candi/tmp/unpack/Trilinos-trilinos-release-13-2-0/packages/kokkos/core/src/impl/Kokkos_MemoryPool.cpp:123:13: error: ‘uint32_t’ does not name a type
  123 |       const uint32_t block_count     = 1u << block_count_lg2;
      |             ^~~~~~~~
/home/user/dealii-candi/tmp/unpack/Trilinos-trilinos-release-13-2-0/packages/kokkos/core/src/impl/Kokkos_MemoryPool.cpp:123:13: note: ‘uint32_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/home/user/dealii-candi/tmp/unpack/Trilinos-trilinos-release-13-2-0/packages/kokkos/core/src/impl/Kokkos_MemoryPool.cpp:124:13: error: ‘uint32_t’ does not name a type
  124 |       const uint32_t block_used      = (*sb_state_ptr) & state_used_mask;
      |             ^~~~~~~~
/home/user/dealii-candi/tmp/unpack/Trilinos-trilinos-release-13-2-0/packages/kokkos/core/src/impl/Kokkos_MemoryPool.cpp:124:13: note: ‘uint32_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/home/user/dealii-candi/tmp/unpack/Trilinos-trilinos-release-13-2-0/packages/kokkos/core/src/impl/Kokkos_MemoryPool.cpp:127:36: error: ‘block_size_lg2’ was not declared in this scope; did you mean ‘sb_size_lg2’?
  127 |         << " block_size(" << (1 << block_size_lg2) << ")"
      |                                    ^~~~~~~~~~~~~~
      |                                    sb_size_lg2
/home/user/dealii-candi/tmp/unpack/Trilinos-trilinos-release-13-2-0/packages/kokkos/core/src/impl/Kokkos_MemoryPool.cpp:128:32: error: ‘block_used’ was not declared in this scope
  128 |         << " block_count( " << block_used << " / " << block_count << " )"
      |                                ^~~~~~~~~~
/home/user/dealii-candi/tmp/unpack/Trilinos-trilinos-release-13-2-0/packages/kokkos/core/src/impl/Kokkos_MemoryPool.cpp:128:55: error: ‘block_count’ was not declared in this scope
  128 |         << " block_count( " << block_used << " / " << block_count << " )"
      |                                                       ^~~~~~~~~~~
make[2]: *** [packages/kokkos/core/src/CMakeFiles/kokkoscore.dir/build.make:188: packages/kokkos/core/src/CMakeFiles/kokkoscore.dir/impl/Kokkos_MemoryPool.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:4266: packages/kokkos/core/src/CMakeFiles/kokkoscore.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
Failure with exit status: 2
Exit message: There was a problem building trilinos 13-2-0.

Skipping Trilinos in the config yields a similar error message during dealii build:

[  0%] Building CXX object bundled/tbb-2018_U2/src/CMakeFiles/obj_tbb_debug.dir/tbb/arena.cpp.o
In file included from /home/user/dealii-candi/tmp/unpack/deal.II-v9.4.2/bundled/tbb-2018_U2/src/tbb/scheduler_common.h:43,
                 from /home/user/dealii-candi/tmp/unpack/deal.II-v9.4.2/bundled/tbb-2018_U2/src/tbb/scheduler.h:24,
                 from /home/user/dealii-candi/tmp/unpack/deal.II-v9.4.2/bundled/tbb-2018_U2/src/tbb/arena.cpp:23:
/home/user/dealii-candi/tmp/unpack/deal.II-v9.4.2/bundled/tbb-2018_U2/include/tbb/task.h:266:20: error: declaration of ‘tbb::task& tbb::internal::task_prefix::task()’ changes meaning of ‘task’ [-Wchanges-meaning]
  266 |         tbb::task& task() {return *reinterpret_cast<tbb::task*>(this+1);}
      |                    ^~~~
/home/user/dealii-candi/tmp/unpack/deal.II-v9.4.2/bundled/tbb-2018_U2/include/tbb/task.h:225:9: note: used here to mean ‘class tbb::task’
  225 |         task* next_offloaded;
      |         ^~~~
/home/user/dealii-candi/tmp/unpack/deal.II-v9.4.2/bundled/tbb-2018_U2/include/tbb/task.h:33:7: note: declared here
   33 | class task;
      |       ^~~~
make[2]: *** [bundled/tbb-2018_U2/src/CMakeFiles/obj_tbb_debug.dir/build.make:90: bundled/tbb-2018_U2/src/CMakeFiles/obj_tbb_debug.dir/tbb/arena.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1798: bundled/tbb-2018_U2/src/CMakeFiles/obj_tbb_debug.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
Failure with exit status: 2
Exit message: There was a problem building dealii v9.4.2.

Is this a known issue, or something easily remedied?

bangerth commented 7 months ago

The underlying cause is that you are using a distribution with a compiler that is newer than the software you are trying to compile, and that is finding issue with those software packages that the authors of those packages can of course not fix retroactively.

Your only chance is to use versions of Trilinos and deal.II that were released after we have had time to test with these newer compilers. For Trilinos, this means one of the 14.x or 15.x releases. For deal.II, it means using 9.5.