# cmake error while building ourCraft

**URL:** https://discourse.cmake.org/t/cmake-error-while-building-ourcraft/11132
**Category:** Usage
**Created:** [June 29, 2024, 7:14pm UTC](https://discourse.cmake.org/t/cmake-error-while-building-ourcraft/11132 "2024-06-29T19:14:42Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Philipbox](https://discourse.cmake.org/user_avatar/discourse.cmake.org/philipbox/32/4708_2.png) [@Philipbox](https://discourse.cmake.org/u/Philipbox)
#### Post date: [June 29, 2024, 7:14pm UTC](https://discourse.cmake.org/t/cmake-error-while-building-ourcraft/11132/1 "2024-06-29T19:14:42Z")

</div>

[64%] Building CXX object CMakeFiles/ourCraft.dir/src/gameLayer/chunkSystem.cpp.o  
In file included from /run/media/philip//Downloads/ourCraft-master/thirdparty/gl2d/include/gl2d/gl2d.h:60,  
from /run/media/philip//Downloads/ourCraft-master/include/gameLayer/gamePlayLogic.h:2,  
from /run/media/philip/Downloads/ourCraft-master/include/gameLayer/multyPlayer/packet.h:8,  
from /run/media/philip//Downloads/ourCraft-master/include/gameLayer/multyPlayer/undoQueue.h:2,  
from /run/media/philip//Downloads/ourCraft-master/include/gameLayer/chunkSystem.h:9,  
from /run/media/philip//Downloads/ourCraft-master/src/gameLayer/chunkSystem.cpp:1:  
/run/media/philip//Downloads/ourCraft-master/thirdparty/stb\_image/include/stb\_image/stb\_image.h: In function ‘void\* STBIMAGE\_CUSTOM\_REALOC(void\*, size\_t, size\_t)’:  
/run/media/philip/Downloads/ourCraft-master/thirdparty/stb\_image/include/stb\_image/stb\_image.h:348:18: warning: deleting ‘void\*’ is undefined [-Wdelete-incomplete]  
348 | delete p;  
| ^  
In file included from /run/media/philip//Downloads/ourCraft-master/include/gameLayer/gamePlayLogic.h:5:  
/run/media/philip//Downloads/ourCraft-master/include/gameLayer/rendering/renderer.h: In function ‘constexpr int mergeShorts(short int, short int)’:  
/run/media/philip//Downloads/ourCraft-master/include/gameLayer/rendering/renderer.h:348:10: warning: ‘reinterpret\_cast’ is not a constant expression [-Winvalid-constexpr]  
348 | ((short\*)&rez)[1] = b;  
| ~^ ~~~~~~~~~~~~  
In file included from /run/media/philip//Downloads/ourCraft-master/include/gameLayer/gameplay/pig.h:4,  
from /run/media/philip//Downloads/ourCraft-master/include/gameLayer/multyPlayer/packet.h:13:  
/run/media/philip/Downloads/ourCraft-master/include/gameLayer/gameplay/ai.h: In member function ‘void AnimalBehaviour\<E, SETTINGS\>::updateAnimalBehaviour(float, ChunkData\* (\*)(glm::ivec2), ServerChunkStorer&, std::minstd\_rand&)’:  
/run/media/philip//Downloads/ourCraft-master/include/gameLayer/gameplay/ai.h:118:29: error: there are no arguments to ‘getChunkNeighboursOffsets’ that depend on a template parameter, so a declaration of ‘getChunkNeighboursOffsets’ must be available [-fpermissive]  
118 | for (auto offset : \*getChunkNeighboursOffsets())  
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~  
/run/media/philip//Downloads/ourCraft-master/include/gameLayer/gameplay/ai.h:118:29: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)  
/run/media/philip//Downloads/ourCraft-master/include/gameLayer/gameplay/ai.h:121:26: warning: invalid use of incomplete type ‘struct ServerChunkStorer’  
121 | auto c = serverChunkStorer.getChunkOrGetNull(pos.x, pos.y);  
| ^ ~~~~~~~~~~~~~~~~  
In file included from /run/media/philip//Downloads/ourCraft-master/include/gameLayer/gameplay/droppedItem.h:2,  
from /run/media/philip//Downloads/ourCraft-master/include/gameLayer/multyPlayer/packet.h:10:  
/run/media/philip//Downloads/ourCraft-master/include/gameLayer/gameplay/entity.h:73:8: note: forward declaration of ‘struct ServerChunkStorer’  
73 | struct ServerChunkStorer;  
| ^ ~~~~~~~~~~~~~~~~  
make[2]: \*\*\* [CMakeFiles/ourCraft.dir/build.make:90: CMakeFiles/ourCraft.dir/src/gameLayer/chunkSystem.cpp.o] Error 1  
make[1]: \*\*\* [CMakeFiles/Makefile2:539: CMakeFiles/ourCraft.dir/all] Error 2  
make: \*\*\* [Makefile:136: all] Error 2

---

<div class="post-metadata">

### Author: ![craig.scott](https://discourse.cmake.org/user_avatar/discourse.cmake.org/craig.scott/32/20_2.png) [@craig.scott](https://discourse.cmake.org/u/craig.scott)
#### Post date: [June 29, 2024, 10:41pm UTC](https://discourse.cmake.org/t/cmake-error-while-building-ourcraft/11132/2 "2024-06-29T22:41:23Z")

</div>

This doesn’t look like a CMake problem. You may want to ask the folks who maintain the project you are building, since it looks to be a problem with the code itself.
