godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.13k stars 21.19k forks source link

Build error: 'uint32_t' does not name a type #76907

Closed timothyqiu closed 1 year ago

timothyqiu commented 1 year ago

Godot version

master (bee96aa5cb2e353cbbfc1cb346cf2c27e9748746)

System information

Arch Linux

Issue description

The updated rvo2 seems lacking a header include:

Building Godot (master) ...
scons: Reading SConscript files ...
Automatically detected platform: linuxbsd
Using linker program: mold
Building for platform "linuxbsd", architecture "x86_64", target "editor".
NOTE: Developer build, with debug optimization level and debug symbols (unless overridden).
Scons cache enabled... (path: '/tmp/godot-cache/master')
Checking for C header file mntent.h... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
[  7%] Linking Static Library tests/libtests.linuxbsd.editor.dev.x86_64.san.a ...
Ranlib Library tests/libtests.linuxbsd.editor.dev.x86_64.san.a ...
[ 24%] Linking Static Library modules/libmodule_multiplayer.linuxbsd.editor.dev.x86_64.san.a ...
Ranlib Library modules/libmodule_multiplayer.linuxbsd.editor.dev.x86_64.san.a ...
[ 24%] Compiling thirdparty/rvo2/rvo2_2d/Agent2d.cpp ...
In file included from thirdparty/rvo2/rvo2_2d/Agent2d.cpp:33:
thirdparty/rvo2/rvo2_2d/Agent2d.h:104:17: error: 'uint32_t' does not name a type
  104 |                 uint32_t avoidance_layers_ = 1;
      |                 ^~~~~~~~
thirdparty/rvo2/rvo2_2d/Agent2d.h:43:1: note: 'uint32_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
   42 | #include "RVOSimulator2d.h"
  +++ |+#include <cstdint>
   43 | 
thirdparty/rvo2/rvo2_2d/Agent2d.h:105:17: error: 'uint32_t' does not name a type
  105 |                 uint32_t avoidance_mask_ = 1;
      |                 ^~~~~~~~
thirdparty/rvo2/rvo2_2d/Agent2d.h:105:17: note: 'uint32_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
In file included from thirdparty/rvo2/rvo2_2d/Agent2d.cpp:36:
thirdparty/rvo2/rvo2_2d/Obstacle2d.h:62:17: error: 'uint32_t' does not name a type
   62 |                 uint32_t avoidance_layers_ = 1;
      |                 ^~~~~~~~
thirdparty/rvo2/rvo2_2d/Obstacle2d.h:1:1: note: 'uint32_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
  +++ |+#include <cstdint>
    1 | /*
thirdparty/rvo2/rvo2_2d/Agent2d.cpp: In member function 'void RVO2D::Agent2D::insertAgentNeighbor(const RVO2D::Agent2D*, float&)':
thirdparty/rvo2/rvo2_2d/Agent2d.cpp:370:22: error: 'avoidance_mask_' was not declared in this scope
  370 |                 if ((avoidance_mask_ & agent->avoidance_layers_) == 0) {
      |                      ^~~~~~~~~~~~~~~
thirdparty/rvo2/rvo2_2d/Agent2d.cpp:370:47: error: 'const class RVO2D::Agent2D' has no member named 'avoidance_layers_'; did you mean 'avoidance_priority_'?
  370 |                 if ((avoidance_mask_ & agent->avoidance_layers_) == 0) {
      |                                               ^~~~~~~~~~~~~~~~~
      |                                               avoidance_priority_
thirdparty/rvo2/rvo2_2d/Agent2d.cpp: In member function 'void RVO2D::Agent2D::insertObstacleNeighbor(const RVO2D::Obstacle2D*, float)':
thirdparty/rvo2/rvo2_2d/Agent2d.cpp:409:22: error: 'avoidance_mask_' was not declared in this scope
  409 |                 if ((avoidance_mask_ & nextObstacle->avoidance_layers_) == 0) {
      |                      ^~~~~~~~~~~~~~~
thirdparty/rvo2/rvo2_2d/Agent2d.cpp:409:54: error: 'const class RVO2D::Obstacle2D' has no member named 'avoidance_layers_'
  409 |                 if ((avoidance_mask_ & nextObstacle->avoidance_layers_) == 0) {
      |                                                      ^~~~~~~~~~~~~~~~~
scons: *** [thirdparty/rvo2/rvo2_2d/Agent2d.linuxbsd.editor.dev.x86_64.san.o] Error 1
scons: building terminated because of errors.

CC @smix8

Steps to reproduce

Build godot.

Minimal reproduction project

N/A

adamscott commented 1 year ago

Got the same issue, cannot build master too.