Zylann / godot_voxel

Voxel module for Godot Engine
MIT License
2.62k stars 246 forks source link

Errors while building Godot 4 version #366

Closed WaltonSimons closed 2 years ago

WaltonSimons commented 2 years ago

Is the current version of godot4 branch supposed to be build-ready? I keep getting errors when trying to build godot with voxel module. I'm building arm64 version on macos. Here are the logs:

[  6%] Compiling main/main.cpp ...
[ 11%] Compiling modules/voxel/thirdparty/fast_noise_2/src/FastNoise/Metadata.cpp ...
[ 11%] Compiling modules/voxel/thirdparty/fast_noise_2/src/FastNoise/FastNoise_C.cpp ...
[ 11%] Compiling modules/voxel/thirdparty/fast_noise_2/src/FastNoise/SmartNode.cpp ...
[ 11%] Compiling modules/voxel/thirdparty/fast_noise_2/src/FastSIMD/FastSIMD.cpp ...
[ 11%] Compiling modules/voxel/thirdparty/fast_noise_2/src/FastSIMD/FastSIMD_Level_Scalar.cpp ...
[ 11%] Compiling modules/voxel/thirdparty/fast_noise_2/src/FastSIMD/FastSIMD_Level_SSE2.cpp ...
[ 12%] Compiling modules/voxel/thirdparty/fast_noise_2/src/FastSIMD/FastSIMD_Level_SSE3.cpp ...
clang: warning: argument unused during compilation: '-msse3' [-Wunused-command-line-argument]
[ 12%] Compiling modules/voxel/thirdparty/fast_noise_2/src/FastSIMD/FastSIMD_Level_SSSE3.cpp ...
[ 12%] Compiling modules/voxel/thirdparty/fast_noise_2/src/FastSIMD/FastSIMD_Level_SSE41.cpp ...
clang: warning: argument unused during compilation: '-mssse3' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-msse4.1' [-Wunused-command-line-argument]
[ 12%] Compiling modules/voxel/thirdparty/fast_noise_2/src/FastSIMD/FastSIMD_Level_SSE42.cpp ...
[ 12%] Compiling modules/voxel/thirdparty/fast_noise_2/src/FastSIMD/FastSIMD_Level_AVX2.cpp ...
clang: warning: argument unused during compilation: '-msse4.2' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mavx2' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mfma' [-Wunused-command-line-argument]
In file included from modules/voxel/thirdparty/fast_noise_2/src/FastSIMD/FastSIMD.cpp:7:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/include/x86intrin.h:13:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/include/ia32intrin.h:200:10: error: use of undeclared identifier '__builtin_ia32_readeflags_u32'
  return __builtin_ia32_readeflags_u32();
         ^
[ 12%] Compiling modules/voxel/thirdparty/fast_noise_2/src/FastSIMD/FastSIMD_Level_AVX512.cpp ...
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/include/ia32intrin.h:206:3: error: use of undeclared identifier '__builtin_ia32_writeeflags_u32'
  __builtin_ia32_writeeflags_u32(__f);
  ^
In file included from modules/voxel/thirdparty/fast_noise_2/src/FastSIMD/FastSIMD_Level_Scalar.cpp:6:
In file included from modules/voxel/thirdparty/fast_noise_2/src/FastSIMD/Internal/SourceBuilder.inl:29:
In file included from modules/voxel/thirdparty/fast_noise_2/src/FastSIMD/Internal/../FastSIMD_BuildList.inl:10:
In file included from modules/voxel/thirdparty/fast_noise_2/include/FastNoise/FastNoise_BuildList.inl:14:
modules/voxel/thirdparty/fast_noise_2/include/FastNoise/Generators/Generator.inl:8:9: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma warning( disable:4250 )
        ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/include/ia32intrin.h:288:10: error: use of undeclared identifier '__builtin_ia32_crc32qi'
  return __builtin_ia32_crc32qi(__C, __D);
         ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/include/ia32intrin.h:309:10: error: use of undeclared identifier '__builtin_ia32_crc32hi'; did you mean '__builtin_arm_crc32h'?
  return __builtin_ia32_crc32hi(__C, __D);
         ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/include/ia32intrin.h:309:10: note: '__builtin_arm_crc32h' declared here
clang: warning: argument unused during compilation: '-mavx512f' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mavx512dq' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mfma' [-Wunused-command-line-argument]
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/include/ia32intrin.h:330:10: error: use of undeclared identifier '__builtin_ia32_crc32si'
  return __builtin_ia32_crc32si(__C, __D);
         ^
In file included from modules/voxel/thirdparty/fast_noise_2/src/FastNoise/Metadata.cpp:10:
modules/voxel/thirdparty/fast_noise_2/include/FastNoise/Metadata.h:10:9: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma warning( push )
        ^
modules/voxel/thirdparty/fast_noise_2/include/FastNoise/Metadata.h:11:9: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma warning( disable : 4251 )
        ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/include/ia32intrin.h:358:10: error: use of undeclared identifier '__builtin_ia32_rdpmc'; did you mean '__builtin_arm_dmb'?
  return __builtin_ia32_rdpmc(__A);
         ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/include/ia32intrin.h:358:10: note: '__builtin_arm_dmb' declared here
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/include/ia32intrin.h:358:10: error: argument to '__builtin_arm_dmb' must be a constant integer
  return __builtin_ia32_rdpmc(__A);
         ^                    ~~~
modules/voxel/thirdparty/fast_noise_2/include/FastNoise/Metadata.h:229:9: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma warning( pop )
        ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/include/ia32intrin.h:364:10: error: use of undeclared identifier '__builtin_ia32_rdtscp'; did you mean '__builtin_arm_rsrp'?
  return __builtin_ia32_rdtscp(__A);
         ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/include/ia32intrin.h:364:10: note: '__builtin_arm_rsrp' declared here
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/include/ia32intrin.h:364:32: error: cannot initialize a parameter of type 'const char *' with an lvalue of type 'unsigned int *'
  return __builtin_ia32_rdtscp(__A);
                               ^~~
[ 12%] In file included from modules/voxel/thirdparty/fast_noise_2/src/FastNoise/FastNoise_C.cpp:3:
modules/voxel/thirdparty/fast_noise_2/include/FastNoise/Metadata.h:10:9: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma warning( push )
        ^
modules/voxel/thirdparty/fast_noise_2/include/FastNoise/Metadata.h:11:9: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma warning( disable : 4251 )
        ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/include/ia32intrin.h:373:3: error: use of undeclared identifier '__builtin_ia32_wbinvd'
[ 12%]   __builtin_ia32_wbinvd();
  ^
[ 12%] In file included from modules/voxel/thirdparty/fast_noise_2/src/FastSIMD/FastSIMD.cpp:7:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/include/x86intrin.h:15:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/include/immintrin.h:13:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/include/x86gprintrin.h:15:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/include/hresetintrin.h:42:27: error: invalid input constraint 'a' in asm
  __asm__ ("hreset $0" :: "a"(__eax));
                          ^
[ 12%] In file included from modules/voxel/thirdparty/fast_noise_2/src/FastSIMD/FastSIMD.cpp:7:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/include/x86intrin.h:15:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/include/immintrin.h:17:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/include/mmintrin.h:33:5: error: use of undeclared identifier '__builtin_ia32_emms'; did you mean '__builtin_isless'?
    __builtin_ia32_emms();
    ^
[ 12%] /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/include/mmintrin.h:33:5: note: '__builtin_isless' declared here
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/include/mmintrin.h:33:25: error: too few arguments to function call, expected 2, have 0
    __builtin_ia32_emms();
    ~~~~~~~~~~~~~~~~~~~~^
[ 12%] modules/voxel/thirdparty/fast_noise_2/include/FastNoise/Metadata.h:229:9: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma warning( pop )
        ^
[ 13%] /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/include/mmintrin.h:50:19: error: use of undeclared identifier '__builtin_ia32_vec_init_v2si'
    return (__m64)__builtin_ia32_vec_init_v2si(__i, 0);
                  ^
[ 13%] Compiling modules/voxel/register_types.cpp ...
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/include/mmintrin.h:67:12: error: use of undeclared identifier '__builtin_ia32_vec_ext_v2si'
    return __builtin_ia32_vec_ext_v2si((__v2si)__m, 0);
           ^
[ 13%] Compiling modules/voxel/constants/cube_tables.cpp ...
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/include/mmintrin.h:129:19: error: use of undeclared identifier '__builtin_ia32_packsswb'
    return (__m64)__builtin_ia32_packsswb((__v4hi)__m1, (__v4hi)__m2);
                  ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/include/mmintrin.h:159:19: error: use of undeclared identifier '__builtin_ia32_packssdw'
    return (__m64)__builtin_ia32_packssdw((__v2si)__m1, (__v2si)__m2);
                  ^
3 warnings generated.
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/include/mmintrin.h:189:19: error: use of undeclared identifier '__builtin_ia32_packuswb'
    return (__m64)__builtin_ia32_packuswb((__v4hi)__m1, (__v4hi)__m2);
                  ^
[ 13%] Compiling modules/voxel/constants/voxel_string_names.cpp ...
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/include/mmintrin.h:216:19: error: use of undeclared identifier '__builtin_ia32_punpckhbw'
    return (__m64)__builtin_ia32_punpckhbw((__v8qi)__m1, (__v8qi)__m2);
                  ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
[ 13%] Compiling modules/voxel/meshers/blocky/voxel.cpp ...
20 errors generated.
scons: *** [modules/voxel/thirdparty/fast_noise_2/src/FastSIMD/FastSIMD.osx.tools.arm64.o] Error 1
In file included from modules/voxel/constants/cube_tables.cpp:1:
In file included from modules/voxel/constants/cube_tables.h:4:
In file included from modules/voxel/constants/../util/math/vector3i.h:5:
modules/voxel/constants/../util/math/funcs.h:164:10: error: member access into incomplete type 'const Vector3i'
        return s.x >= 0 && s.y >= 0 && s.z >= 0;
                ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/register_types.cpp:3:
In file included from modules/voxel/edition/voxel_tool.h:4:
In file included from modules/voxel/edition/../storage/funcs.h:5:
In file included from modules/voxel/edition/../storage/../util/math/vector3i.h:5:
modules/voxel/edition/../storage/../util/math/funcs.h:164:10: error: member access into incomplete type 'const Vector3i'
        return s.x >= 0 && s.y >= 0 && s.z >= 0;
                ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/register_types.cpp:3:
In file included from modules/voxel/edition/voxel_tool.h:4:
In file included from modules/voxel/edition/../storage/funcs.h:5:
modules/voxel/edition/../storage/../util/math/vector3i.h:275:17: error: incomplete result type 'Vector3i' in function definition
inline Vector3i create(int xyz) {
                ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/register_types.cpp:3:
In file included from modules/voxel/edition/voxel_tool.h:4:
In file included from modules/voxel/edition/../storage/funcs.h:5:
modules/voxel/edition/../storage/../util/math/vector3i.h:276:9: error: invalid use of incomplete type 'Vector3i'
        return Vector3i(xyz, xyz, xyz);
               ^~~~~~~~~~~~~~~~~~~~~~~
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/register_types.cpp:3:
In file included from modules/voxel/edition/voxel_tool.h:4:
In file included from modules/voxel/edition/../storage/funcs.h:5:
modules/voxel/edition/../storage/../util/math/vector3i.h:276:9: error: initialization of incomplete type 'Vector3i'
        return Vector3i(xyz, xyz, xyz);
               ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/register_types.cpp:3:
In file included from modules/voxel/edition/voxel_tool.h:4:
In file included from modules/voxel/edition/../storage/funcs.h:5:
modules/voxel/edition/../storage/../util/math/vector3i.h:283:17: error: incomplete result type 'Vector3i' in function definition
inline Vector3i from_floored(const Vector3 &f) {
                ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/register_types.cpp:3:
In file included from modules/voxel/edition/voxel_tool.h:4:
In file included from modules/voxel/edition/../storage/funcs.h:5:
modules/voxel/edition/../storage/../util/math/vector3i.h:284:9: error: invalid use of incomplete type 'Vector3i'
        return Vector3i(Math::floor(f.x), Math::floor(f.y), Math::floor(f.z));
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/register_types.cpp:3:
In file included from modules/voxel/edition/voxel_tool.h:4:
In file included from modules/voxel/edition/../storage/funcs.h:5:
modules/voxel/edition/../storage/../util/math/vector3i.h:284:9: error: initialization of incomplete type 'Vector3i'
        return Vector3i(Math::floor(f.x), Math::floor(f.y), Math::floor(f.z));
               ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/register_types.cpp:3:
In file included from modules/voxel/edition/voxel_tool.h:4:
In file included from modules/voxel/edition/../storage/funcs.h:5:
modules/voxel/edition/../storage/../util/math/vector3i.h:287:17: error: incomplete result type 'Vector3i' in function definition
inline Vector3i from_rounded(const Vector3 &f) {
                ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/register_types.cpp:3:
In file included from modules/voxel/edition/voxel_tool.h:4:
In file included from modules/voxel/edition/../storage/funcs.h:5:
modules/voxel/edition/../storage/../util/math/vector3i.h:288:9: error: invalid use of incomplete type 'Vector3i'
        return Vector3i(Math::round(f.x), Math::round(f.y), Math::round(f.z));
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/register_types.cpp:3:
In file included from modules/voxel/edition/voxel_tool.h:4:
In file included from modules/voxel/edition/../storage/funcs.h:5:
modules/voxel/edition/../storage/../util/math/vector3i.h:288:9: error: initialization of incomplete type 'Vector3i'
        return Vector3i(Math::round(f.x), Math::round(f.y), Math::round(f.z));
               ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/register_types.cpp:3:
In file included from modules/voxel/edition/voxel_tool.h:4:
In file included from modules/voxel/edition/../storage/funcs.h:5:
modules/voxel/edition/../storage/../util/math/vector3i.h:291:17: error: incomplete result type 'Vector3i' in function definition
inline Vector3i from_ceiled(const Vector3 &f) {
                ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/register_types.cpp:3:
In file included from modules/voxel/edition/voxel_tool.h:4:
In file included from modules/voxel/edition/../storage/funcs.h:5:
modules/voxel/edition/../storage/../util/math/vector3i.h:292:9: error: invalid use of incomplete type 'Vector3i'
        return Vector3i(Math::ceil(f.x), Math::ceil(f.y), Math::ceil(f.z));
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/register_types.cpp:3:
In file included from modules/voxel/edition/voxel_tool.h:4:
In file included from modules/voxel/edition/../storage/funcs.h:5:
modules/voxel/edition/../storage/../util/math/vector3i.h:292:9: error: initialization of incomplete type 'Vector3i'
        return Vector3i(Math::ceil(f.x), Math::ceil(f.y), Math::ceil(f.z));
               ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/register_types.cpp:3:
In file included from modules/voxel/edition/voxel_tool.h:4:
In file included from modules/voxel/edition/../storage/funcs.h:5:
modules/voxel/edition/../storage/../util/math/vector3i.h:295:17: error: incomplete result type 'Vector3i' in function definition
inline Vector3i from_cast(const Vector3 &f) {
                ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/register_types.cpp:3:
In file included from modules/voxel/edition/voxel_tool.h:4:
In file included from modules/voxel/edition/../storage/funcs.h:5:
modules/voxel/edition/../storage/../util/math/vector3i.h:296:9: error: invalid use of incomplete type 'Vector3i'
        return Vector3i(f.x, f.y, f.z);
               ^~~~~~~~~~~~~~~~~~~~~~~
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/register_types.cpp:3:
In file included from modules/voxel/edition/voxel_tool.h:4:
In file included from modules/voxel/edition/../storage/funcs.h:5:
modules/voxel/edition/../storage/../util/math/vector3i.h:296:9: error: initialization of incomplete type 'Vector3i'
        return Vector3i(f.x, f.y, f.z);
               ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/register_types.cpp:3:
In file included from modules/voxel/edition/voxel_tool.h:4:
In file included from modules/voxel/edition/../storage/funcs.h:5:
modules/voxel/edition/../storage/../util/math/vector3i.h:300:16: error: member access into incomplete type 'Vector3i'
        zylann::sort(a.x, b.x);
                      ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/register_types.cpp:3:
In file included from modules/voxel/edition/voxel_tool.h:4:
In file included from modules/voxel/edition/../storage/funcs.h:5:
modules/voxel/edition/../storage/../util/math/vector3i.h:300:21: error: member access into incomplete type 'Vector3i'
        zylann::sort(a.x, b.x);
                           ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/register_types.cpp:3:
In file included from modules/voxel/edition/voxel_tool.h:4:
In file included from modules/voxel/edition/../storage/funcs.h:5:
modules/voxel/edition/../storage/../util/math/vector3i.h:301:16: error: member access into incomplete type 'Vector3i'
        zylann::sort(a.y, b.y);
                      ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
In file included from modules/voxel/constants/cube_tables.cpp:1:
In file included from modules/voxel/constants/cube_tables.h:4:
modules/voxel/constants/../util/math/vector3i.h:275:17: error: incomplete result type 'Vector3i' in function definition
inline Vector3i create(int xyz) {
                ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/constants/cube_tables.cpp:1:
In file included from modules/voxel/constants/cube_tables.h:4:
modules/voxel/constants/../util/math/vector3i.h:276:9: error: invalid use of incomplete type 'Vector3i'
        return Vector3i(xyz, xyz, xyz);
               ^~~~~~~~~~~~~~~~~~~~~~~
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/constants/cube_tables.cpp:1:
In file included from modules/voxel/constants/cube_tables.h:4:
modules/voxel/constants/../util/math/vector3i.h:276:9: error: initialization of incomplete type 'Vector3i'
        return Vector3i(xyz, xyz, xyz);
               ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/constants/cube_tables.cpp:1:
In file included from modules/voxel/constants/cube_tables.h:4:
modules/voxel/constants/../util/math/vector3i.h:283:17: error: incomplete result type 'Vector3i' in function definition
inline Vector3i from_floored(const Vector3 &f) {
                ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/constants/cube_tables.cpp:1:
In file included from modules/voxel/constants/cube_tables.h:4:
modules/voxel/constants/../util/math/vector3i.h:284:9: error: invalid use of incomplete type 'Vector3i'
        return Vector3i(Math::floor(f.x), Math::floor(f.y), Math::floor(f.z));
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/constants/cube_tables.cpp:1:
In file included from modules/voxel/constants/cube_tables.h:4:
modules/voxel/constants/../util/math/vector3i.h:284:9: error: initialization of incomplete type 'Vector3i'
        return Vector3i(Math::floor(f.x), Math::floor(f.y), Math::floor(f.z));
               ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/constants/cube_tables.cpp:1:
In file included from modules/voxel/constants/cube_tables.h:4:
modules/voxel/constants/../util/math/vector3i.h:287:17: error: incomplete result type 'Vector3i' in function definition
inline Vector3i from_rounded(const Vector3 &f) {
                ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/constants/cube_tables.cpp:1:
In file included from modules/voxel/constants/cube_tables.h:4:
modules/voxel/constants/../util/math/vector3i.h:288:9: error: invalid use of incomplete type 'Vector3i'
        return Vector3i(Math::round(f.x), Math::round(f.y), Math::round(f.z));
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/constants/cube_tables.cpp:1:
In file included from modules/voxel/constants/cube_tables.h:4:
modules/voxel/constants/../util/math/vector3i.h:288:9: error: initialization of incomplete type 'Vector3i'
        return Vector3i(Math::round(f.x), Math::round(f.y), Math::round(f.z));
               ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/constants/cube_tables.cpp:1:
In file included from modules/voxel/constants/cube_tables.h:4:
modules/voxel/constants/../util/math/vector3i.h:291:17: error: incomplete result type 'Vector3i' in function definition
inline Vector3i from_ceiled(const Vector3 &f) {
                ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/constants/cube_tables.cpp:1:
In file included from modules/voxel/constants/cube_tables.h:4:
modules/voxel/constants/../util/math/vector3i.h:292:9: error: invalid use of incomplete type 'Vector3i'
        return Vector3i(Math::ceil(f.x), Math::ceil(f.y), Math::ceil(f.z));
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/constants/cube_tables.cpp:1:
In file included from modules/voxel/constants/cube_tables.h:4:
modules/voxel/constants/../util/math/vector3i.h:292:9: error: initialization of incomplete type 'Vector3i'
        return Vector3i(Math::ceil(f.x), Math::ceil(f.y), Math::ceil(f.z));
               ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/constants/cube_tables.cpp:1:
In file included from modules/voxel/constants/cube_tables.h:4:
modules/voxel/constants/../util/math/vector3i.h:295:17: error: incomplete result type 'Vector3i' in function definition
inline Vector3i from_cast(const Vector3 &f) {
                ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/constants/cube_tables.cpp:1:
In file included from modules/voxel/constants/cube_tables.h:4:
modules/voxel/constants/../util/math/vector3i.h:296:9: error: invalid use of incomplete type 'Vector3i'
        return Vector3i(f.x, f.y, f.z);
               ^~~~~~~~~~~~~~~~~~~~~~~
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/constants/cube_tables.cpp:1:
In file included from modules/voxel/constants/cube_tables.h:4:
modules/voxel/constants/../util/math/vector3i.h:296:9: error: initialization of incomplete type 'Vector3i'
        return Vector3i(f.x, f.y, f.z);
               ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/constants/cube_tables.cpp:1:
In file included from modules/voxel/constants/cube_tables.h:4:
modules/voxel/constants/../util/math/vector3i.h:300:16: error: member access into incomplete type 'Vector3i'
        zylann::sort(a.x, b.x);
                      ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/constants/cube_tables.cpp:1:
In file included from modules/voxel/constants/cube_tables.h:4:
modules/voxel/constants/../util/math/vector3i.h:300:21: error: member access into incomplete type 'Vector3i'
        zylann::sort(a.x, b.x);
                           ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/constants/cube_tables.cpp:1:
In file included from modules/voxel/constants/cube_tables.h:4:
modules/voxel/constants/../util/math/vector3i.h:301:16: error: member access into incomplete type 'Vector3i'
        zylann::sort(a.y, b.y);
                      ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
scons: *** [modules/voxel/constants/cube_tables.osx.tools.arm64.o] Error 1
In file included from modules/voxel/meshers/blocky/voxel.cpp:1:
In file included from modules/voxel/meshers/blocky/voxel.h:4:
In file included from modules/voxel/meshers/blocky/../../constants/cube_tables.h:4:
In file included from modules/voxel/meshers/blocky/../../constants/../util/math/vector3i.h:5:
modules/voxel/meshers/blocky/../../constants/../util/math/funcs.h:164:10: error: member access into incomplete type 'const Vector3i'
        return s.x >= 0 && s.y >= 0 && s.z >= 0;
                ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/meshers/blocky/voxel.cpp:1:
In file included from modules/voxel/meshers/blocky/voxel.h:4:
In file included from modules/voxel/meshers/blocky/../../constants/cube_tables.h:4:
modules/voxel/meshers/blocky/../../constants/../util/math/vector3i.h:275:17: error: incomplete result type 'Vector3i' in function definition
inline Vector3i create(int xyz) {
                ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/meshers/blocky/voxel.cpp:1:
In file included from modules/voxel/meshers/blocky/voxel.h:4:
In file included from modules/voxel/meshers/blocky/../../constants/cube_tables.h:4:
modules/voxel/meshers/blocky/../../constants/../util/math/vector3i.h:276:9: error: invalid use of incomplete type 'Vector3i'
        return Vector3i(xyz, xyz, xyz);
               ^~~~~~~~~~~~~~~~~~~~~~~
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/meshers/blocky/voxel.cpp:1:
In file included from modules/voxel/meshers/blocky/voxel.h:4:
In file included from modules/voxel/meshers/blocky/../../constants/cube_tables.h:4:
modules/voxel/meshers/blocky/../../constants/../util/math/vector3i.h:276:9: error: initialization of incomplete type 'Vector3i'
        return Vector3i(xyz, xyz, xyz);
               ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/meshers/blocky/voxel.cpp:1:
In file included from modules/voxel/meshers/blocky/voxel.h:4:
In file included from modules/voxel/meshers/blocky/../../constants/cube_tables.h:4:
modules/voxel/meshers/blocky/../../constants/../util/math/vector3i.h:283:17: error: incomplete result type 'Vector3i' in function definition
inline Vector3i from_floored(const Vector3 &f) {
                ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/meshers/blocky/voxel.cpp:1:
In file included from modules/voxel/meshers/blocky/voxel.h:4:
In file included from modules/voxel/meshers/blocky/../../constants/cube_tables.h:4:
modules/voxel/meshers/blocky/../../constants/../util/math/vector3i.h:284:9: error: invalid use of incomplete type 'Vector3i'
        return Vector3i(Math::floor(f.x), Math::floor(f.y), Math::floor(f.z));
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/meshers/blocky/voxel.cpp:1:
In file included from modules/voxel/meshers/blocky/voxel.h:4:
In file included from modules/voxel/meshers/blocky/../../constants/cube_tables.h:4:
modules/voxel/meshers/blocky/../../constants/../util/math/vector3i.h:284:9: error: initialization of incomplete type 'Vector3i'
        return Vector3i(Math::floor(f.x), Math::floor(f.y), Math::floor(f.z));
               ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/meshers/blocky/voxel.cpp:1:
In file included from modules/voxel/meshers/blocky/voxel.h:4:
In file included from modules/voxel/meshers/blocky/../../constants/cube_tables.h:4:
modules/voxel/meshers/blocky/../../constants/../util/math/vector3i.h:287:17: error: incomplete result type 'Vector3i' in function definition
inline Vector3i from_rounded(const Vector3 &f) {
                ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/meshers/blocky/voxel.cpp:1:
In file included from modules/voxel/meshers/blocky/voxel.h:4:
In file included from modules/voxel/meshers/blocky/../../constants/cube_tables.h:4:
modules/voxel/meshers/blocky/../../constants/../util/math/vector3i.h:288:9: error: invalid use of incomplete type 'Vector3i'
        return Vector3i(Math::round(f.x), Math::round(f.y), Math::round(f.z));
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/meshers/blocky/voxel.cpp:1:
In file included from modules/voxel/meshers/blocky/voxel.h:4:
In file included from modules/voxel/meshers/blocky/../../constants/cube_tables.h:4:
modules/voxel/meshers/blocky/../../constants/../util/math/vector3i.h:288:9: error: initialization of incomplete type 'Vector3i'
        return Vector3i(Math::round(f.x), Math::round(f.y), Math::round(f.z));
               ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/meshers/blocky/voxel.cpp:1:
In file included from modules/voxel/meshers/blocky/voxel.h:4:
In file included from modules/voxel/meshers/blocky/../../constants/cube_tables.h:4:
modules/voxel/meshers/blocky/../../constants/../util/math/vector3i.h:291:17: error: incomplete result type 'Vector3i' in function definition
inline Vector3i from_ceiled(const Vector3 &f) {
                ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/meshers/blocky/voxel.cpp:1:
In file included from modules/voxel/meshers/blocky/voxel.h:4:
In file included from modules/voxel/meshers/blocky/../../constants/cube_tables.h:4:
modules/voxel/meshers/blocky/../../constants/../util/math/vector3i.h:292:9: error: invalid use of incomplete type 'Vector3i'
        return Vector3i(Math::ceil(f.x), Math::ceil(f.y), Math::ceil(f.z));
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/meshers/blocky/voxel.cpp:1:
In file included from modules/voxel/meshers/blocky/voxel.h:4:
In file included from modules/voxel/meshers/blocky/../../constants/cube_tables.h:4:
modules/voxel/meshers/blocky/../../constants/../util/math/vector3i.h:292:9: error: initialization of incomplete type 'Vector3i'
        return Vector3i(Math::ceil(f.x), Math::ceil(f.y), Math::ceil(f.z));
               ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/meshers/blocky/voxel.cpp:1:
In file included from modules/voxel/meshers/blocky/voxel.h:4:
In file included from modules/voxel/meshers/blocky/../../constants/cube_tables.h:4:
modules/voxel/meshers/blocky/../../constants/../util/math/vector3i.h:295:17: error: incomplete result type 'Vector3i' in function definition
inline Vector3i from_cast(const Vector3 &f) {
                ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/meshers/blocky/voxel.cpp:1:
In file included from modules/voxel/meshers/blocky/voxel.h:4:
In file included from modules/voxel/meshers/blocky/../../constants/cube_tables.h:4:
modules/voxel/meshers/blocky/../../constants/../util/math/vector3i.h:296:9: error: invalid use of incomplete type 'Vector3i'
        return Vector3i(f.x, f.y, f.z);
               ^~~~~~~~~~~~~~~~~~~~~~~
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/meshers/blocky/voxel.cpp:1:
In file included from modules/voxel/meshers/blocky/voxel.h:4:
In file included from modules/voxel/meshers/blocky/../../constants/cube_tables.h:4:
modules/voxel/meshers/blocky/../../constants/../util/math/vector3i.h:296:9: error: initialization of incomplete type 'Vector3i'
        return Vector3i(f.x, f.y, f.z);
               ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/meshers/blocky/voxel.cpp:1:
In file included from modules/voxel/meshers/blocky/voxel.h:4:
In file included from modules/voxel/meshers/blocky/../../constants/cube_tables.h:4:
modules/voxel/meshers/blocky/../../constants/../util/math/vector3i.h:300:16: error: member access into incomplete type 'Vector3i'
        zylann::sort(a.x, b.x);
                      ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/meshers/blocky/voxel.cpp:1:
In file included from modules/voxel/meshers/blocky/voxel.h:4:
In file included from modules/voxel/meshers/blocky/../../constants/cube_tables.h:4:
modules/voxel/meshers/blocky/../../constants/../util/math/vector3i.h:300:21: error: member access into incomplete type 'Vector3i'
        zylann::sort(a.x, b.x);
                           ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
In file included from modules/voxel/meshers/blocky/voxel.cpp:1:
In file included from modules/voxel/meshers/blocky/voxel.h:4:
In file included from modules/voxel/meshers/blocky/../../constants/cube_tables.h:4:
modules/voxel/meshers/blocky/../../constants/../util/math/vector3i.h:301:16: error: member access into incomplete type 'Vector3i'
        zylann::sort(a.y, b.y);
                      ^
./core/math/vector3.h:40:8: note: forward declaration of 'Vector3i'
struct Vector3i;
       ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning generated.
20 errors generated.
scons: *** [modules/voxel/meshers/blocky/voxel.osx.tools.arm64.o] Error 1
20 errors generated.
scons: *** [modules/voxel/register_types.osx.tools.arm64.o] Error 1
3 warnings generated.
scons: building terminated because of errors.
Zylann commented 2 years ago

The first errors seem to occur in FastNoise2, which I have no idea why. It's trying to include x86 symbols but fails because I guess it's actually not on x86. Unfortunately the official library uses CMake and couldn't get static linking to work yet, so I currently translated it to SCons to keep the build system unified, however I could never test it on Mac OS (and even seeing your logs I have no idea what I should change). Did it work for you before?

In other news, Godot 4 just replaced OpenSimplexNoise with FastNoiseLite. That makes support for this class in the module irrelevant and won't compile anymore, but it also directly conflicts with my own implementation of FastNoiseLite. It should be prefixed or maybe removed (I consider the former because after seeing Godot's version, I suspect it might be slightly slower due to lack of inlining, especially in builds with float=64 because it uses real_t everywhere, not just in coordinates. It also lacks separate warp functions and get_noise functions aren't const for some reason. But since there is FastNoise2 now, it's probably not a big deal to remove it?).

Zylann commented 2 years ago

Just got some insight from Auburn, FastNoise2 doesn't work on arm64 yet. It can only do x86. So you need either to switch to an x86 target, or you could turn off FastNoise2 support in SCsub. It is also possible to build FastNoise2 without SIMD support but it would be much slower.

The second problem is still valid tho, I'll work on that when I get the time.

Zylann commented 2 years ago

Another thing I noticed:

In file included from modules/voxel/constants/../util/math/vector3i.h:5:
modules/voxel/constants/../util/math/funcs.h:164:10: error: member access into incomplete type 'const Vector3i'
        return s.x >= 0 && s.y >= 0 && s.z >= 0;

This suggests you are compiling with the wrong Godot version? Because Vector3i should definitely be defined here. Also when you say godot4 branch, do not use the branch that is actually named godot4. That was a very old one. For Godot 4, you should use the master branch.

WaltonSimons commented 2 years ago

Many thanks for your help. I reverted godot to version that still supports OpenSimplexNoise (v4.0.alpha.custom_build [45ec0e31c]) and turned off FastNoise2 in SCsub. Most errors are now gone, but I'm still encountering the one related to Vector3i for some reason:


In file included from modules/voxel/register_types.cpp:30:
In file included from modules/voxel/terrain/fixed_lod/voxel_box_mover.h:4:
In file included from modules/voxel/terrain/fixed_lod/voxel_terrain.h:5:
modules/voxel/terrain/fixed_lod/../../storage/voxel_data_map.h:143:18: error: no matching constructor for initialization of 'const Vector3i'
                const Vector3i block_size(get_block_size());
                               ^          ~~~~~~~~~~~~~~~~
./core/math/vector3i.h:40:21: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'unsigned int' to 'const Vector3i' for 1st argument
struct _NO_DISCARD_ Vector3i {
                    ^
./core/math/vector3i.h:40:21: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'unsigned int' to 'Vector3i' for 1st argument
./core/math/vector3i.h:114:17: note: candidate constructor not viable: requires 0 arguments, but 1 was provided
        _FORCE_INLINE_ Vector3i() {}
                       ^
./core/math/vector3i.h:115:17: note: candidate constructor not viable: requires 3 arguments, but 1 was provided
        _FORCE_INLINE_ Vector3i(const int32_t p_x, const int32_t p_y, const int32_t p_z) {
                       ^
In file included from modules/voxel/register_types.cpp:32:
In file included from modules/voxel/terrain/instancing/voxel_instance_component.h:4:
modules/voxel/terrain/instancing/voxel_instancer.h:134:9: warning: class member cannot be redeclared [-Wredeclared-class-member]
        struct Block;
               ^
modules/voxel/terrain/instancing/voxel_instancer.h:94:9: note: previous declaration is here
        struct Block;
               ^
[ 13%] Compiling modules/voxel/meshers/cubes/voxel_color_palette.cpp ...
[ 13%] Compiling modules/voxel/meshers/cubes/voxel_mesher_cubes.cpp ...
[ 13%] Compiling modules/voxel/meshers/voxel_mesher.cpp ...
[ 13%] In file included from modules/voxel/register_types.cpp:7:
In file included from modules/voxel/generators/graph/voxel_generator_graph.h:6:
modules/voxel/generators/graph/voxel_graph_runtime.h:239:29: warning: private field '_node' is not used [-Wunused-private-field]
                const ProgramGraph::Node &_node;
                                          ^
[ 13%] Compiling modules/voxel/streams/compressed_data.cpp ...
2 warnings and 1 error generated.
scons: *** [modules/voxel/register_types.osx.tools.arm64.o] Error 1
scons: building terminated because of errors.```
Zylann commented 2 years ago
modules/voxel/terrain/fixed_lod/../../storage/voxel_data_map.h:143:18: error: no matching constructor for initialization of 'const Vector3i'
                const Vector3i block_size(get_block_size());

Interesting you got this error. Neither MSVC nor GCC on Github actions caught this one. I used to have a custom Vector3i before Godot adds its own, but Godot doesn't have a constructor converting from a single int. I'll fix that.

Edit: error and warnings should be fixed after fd0f524bf5252c1614ad87aa563b3efbf2e79b32

I still need to address the FastNoiseLite problem.

Zylann commented 2 years ago

master should build with FastNoiseLite now after e0008d3335cdc7ecd4b7fd53a5ec86e9fcb420b7

WaltonSimons commented 2 years ago

Unfortunately I'm still encountering errors 🙁

[ 14%] Compiling modules/voxel/server/load_all_blocks_data_task.cpp ...
modules/voxel/terrain/fixed_lod/voxel_terrain.cpp:624:38: warning: lambda capture 'bpos' is not used [-Wunused-lambda-capture]
        _data_map.remove_block(bpos, [this, bpos, save](VoxelDataBlock &block) {
                                          ~~^~~~
modules/voxel/terrain/fixed_lod/voxel_terrain.cpp:1094:46: warning: lambda capture 'viewer' is not used [-Wunused-lambda-capture]
                                                out_of_range_box.for_each_cell([this, &viewer](Vector3i bpos) { //
                                                                                    ~~~^~~~~~
modules/voxel/terrain/variable_lod/voxel_lod_terrain.cpp:1672:6: warning: variable 'deferred_collision_updates' set but not used [-Wunused-but-set-variable]
        int deferred_collision_updates = 0;
            ^
[ 14%] modules/voxel/terrain/variable_lod/voxel_lod_terrain_update_task.cpp:256:27: warning: lambda capture 'lod_index' is not used [-Wunused-lambda-capture]
                                                                [&lod, &data_lod, lod_index, &blocks_to_save, can_save](Vector3i pos) {
                                                                                ~~^~~~~~~~~
[ 14%] Compiling modules/voxel/server/load_block_data_task.cpp ...
modules/voxel/terrain/variable_lod/voxel_lod_terrain_update_task.cpp:348:53: warning: lambda capture 'lod' is not used [-Wunused-lambda-capture]
                        unordered_remove_if(lod.blocks_pending_update, [&lod, new_box](Vector3i bpos) { //
                                                                        ~^~~~
modules/voxel/server/load_all_blocks_data_task.cpp:17:88: error: conversion from 'std::vector<zylann::voxel::VoxelStream::FullLoadingResult::Block>::size_type' (aka 'unsigned long') to 'const Variant' is ambiguous
        PRINT_VERBOSE(String("Loaded {0} blocks for volume {1}").format(varray(_result.blocks.size(), volume_id)));
                                                                               ~~~~~~~~~~~~~~~^~~~~~
modules/voxel/server/../util/macros.h:10:14: note: expanded from macro 'PRINT_VERBOSE'
                print_line(msg);                                                                                               \
                           ^~~
./core/string/print_string.h:64:57: note: expanded from macro 'print_line'
#define print_line(...) __print_line(stringify_variants(__VA_ARGS__))
                                                        ^~~~~~~~~~~
./core/variant/variant.h:385:2: note: candidate constructor
        Variant(bool p_bool);
        ^
./core/variant/variant.h:386:2: note: candidate constructor
        Variant(signed int p_int); // real one
        ^
./core/variant/variant.h:387:2: note: candidate constructor
        Variant(unsigned int p_int);
        ^
./core/variant/variant.h:392:2: note: candidate constructor
        Variant(signed short p_short); // real one
        ^
./core/variant/variant.h:393:2: note: candidate constructor
        Variant(unsigned short p_short);
        ^
./core/variant/variant.h:394:2: note: candidate constructor
        Variant(signed char p_char); // real one
        ^
./core/variant/variant.h:395:2: note: candidate constructor
        Variant(unsigned char p_char);
        ^
./core/variant/variant.h:396:2: note: candidate constructor
        Variant(int64_t p_int); // real one
        ^
./core/variant/variant.h:397:2: note: candidate constructor
        Variant(uint64_t p_int);
        ^
./core/variant/variant.h:398:2: note: candidate constructor
        Variant(float p_float);
        ^
./core/variant/variant.h:399:2: note: candidate constructor
        Variant(double p_double);
        ^
1 error generated.
scons: *** [modules/voxel/server/load_all_blocks_data_task.osx.tools.arm64.o] Error 1
2 warnings generated.
2 warnings generated.
In file included from modules/voxel/server/load_block_data_task.cpp:1:
modules/voxel/server/load_block_data_task.h:36:7: warning: private field '_request_voxels' is not used [-Wunused-private-field]
        bool _request_voxels = false;
             ^
1 warning generated.
1 warning generated.
scons: building terminated because of errors.
Zylann commented 2 years ago

Your compiler seems to be really picky compared to GCC and MSVC... that's another bit they never picked up. It's like Godot configures different warning levels for every compiler?

modules/voxel/server/load_all_blocks_data_task.cpp:17:88: error: conversion from 'std::vector::size_type' (aka 'unsigned long') to 'const Variant' is ambiguous PRINT_VERBOSE(String("Loaded {0} blocks for volume {1}").format(varray(_result.blocks.size(), volume_id)));

This one is yet another occurrence of https://github.com/godotengine/godot/issues/36690, but it can be worked around.

Should be fixed in 15bf2a6980037eb42c7995a7addf034466b54bc0

WaltonSimons commented 2 years ago

It works now. Thank you so much!