VoxelEngine-Cpp icon indicating copy to clipboard operation
VoxelEngine-Cpp copied to clipboard

Docker сборка не работает

Open InfiniteCoder01 opened this issue 8 months ago • 0 comments

Опишите ошибку Docker сборка ломается, вероятно не тот компилятор

Для воспроизведения Шаги для воспроизведения поведения:

  1. Добавить pkg-config в Dockerfile, там его не хватает
  2. docker build -t voxel-engine .
  3. docker run --rm -it -v$(pwd):/project voxel-engine bash -c "cmake -DCMAKE_BUILD_TYPE=Release -Bbuild && cmake --build build"
  4. См. ошибку

Ожидаемое поведение Сборка без ошибок

Скриншоты

/project/src/files/WorldRegions.cpp: In constructor 'WorldRegions::WorldRegions(const std::filesystem::__cxx11::path&)':
/project/src/files/WorldRegions.cpp:90:76: error: use of deleted function 'RegionsLayer::RegionsLayer(RegionsLayer&&)'
   90 | WorldRegions::WorldRegions(const fs::path& directory) : directory(directory) {
      |                                                                            ^
In file included from /project/src/files/WorldRegions.cpp:1:
/project/src/files/WorldRegions.hpp:73:8: note: 'RegionsLayer::RegionsLayer(RegionsLayer&&)' is implicitly deleted because the default definition would be ill-formed:
   73 | struct RegionsLayer {
      |        ^~~~~~~~~~~~
/project/src/files/WorldRegions.hpp:73:8: error: use of deleted function 'std::mutex::mutex(const std::mutex&)'
In file included from /usr/include/c++/10/mutex:43,
                 from /project/src/files/../util/BufferPool.hpp:7,
                 from /project/src/files/WorldRegions.hpp:6,
                 from /project/src/files/WorldRegions.cpp:1:
/usr/include/c++/10/bits/std_mutex.h:94:5: note: declared here
   94 |     mutex(const mutex&) = delete;
      |     ^~~~~
make[2]: *** [CMakeFiles/VoxelEngine.dir/build.make:511: CMakeFiles/VoxelEngine.dir/src/files/WorldRegions.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:95: CMakeFiles/VoxelEngine.dir/all] Error 2
make: *** [Makefile:103: all] Error 2

Техническая информация (заполните следующую информацию):

  • ОС: NixOS 24.05.20240504.d325602 (Uakari) x86_64
  • Версия: https://github.com/MihailRis/VoxelEngine-Cpp/commit/166c340098682194e36a1a74b340f71932dc06f4

Дополнительный контекст Версия gcc/g++ в контейнере:

user@InfiniteCoders-System:/project$ gcc --version
gcc (Debian 10.2.1-6) 10.2.1 20210110
Copyright (C) 2020 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.

user@InfiniteCoders-System:/project$ g++ --version
g++ (Debian 10.2.1-6) 10.2.1 20210110
Copyright (C) 2020 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.

user@InfiniteCoders-System:/project$ c++ --version
c++ (Debian 10.2.1-6) 10.2.1 20210110
Copyright (C) 2020 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.

На хосте собирается (но не работает, скорее всего потому, что NixOS), версия gcc/g++ там:

➜  ~ gcc --version
gcc (GCC) 13.2.0
Copyright (C) 2023 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.

➜  ~ g++ --version
g++ (GCC) 13.2.0
Copyright (C) 2023 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.

➜  ~ c++ --version
g++ (GCC) 13.2.0
Copyright (C) 2023 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.

InfiniteCoder01 avatar Jun 08 '24 17:06 InfiniteCoder01