Zylann / godot_voxel

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

fast_noise_2 causing errors while building godot #706

Open OsmiumShield opened 17 hours ago

OsmiumShield commented 17 hours ago

I pulled the Godot source and godot_voxel from the latest versions and I'm trying to build using the instructions from the voxel tools docs. I successfully built godot and ran the executable, then put the voxel tools file into godot/modules and renamed it to "voxel" I tried to build godot again as instructed, and got several errors, most of which seem to be related to fast_noise_2. Here's my log scons: Reading SConscript files ... Auto-detected 24 CPU cores available for build parallelism. Using 23 cores by default. You can override it with the-jornum_jobsarguments. Using SCons-detected MSVC version 14.3, arch x86_64 Building for platform "windows", architecture "x86_64", target "editor". Checking for C header file mntent.h... (cached) no scons: done reading SConscript files. scons: Building targets ... [ 27%] Linking Static Library modules\module_gdscript.windows.editor.x86_64.lib ... [ 67%] Linking Static Library modules\module_text_server_adv.windows.editor.x86_64.lib ... [ 69%] Linking Static Library modules\module_vhacd.windows.editor.x86_64.lib ... [ 69%] Compiling modules\voxel\thirdparty\fast_noise_2\src\FastSIMD\FastSIMD_Level_SSE2.cpp ... [ 69%] Compiling modules\voxel\thirdparty\fast_noise_2\src\FastSIMD\FastSIMD_Level_SSE41.cpp ... [ 70%] Compiling modules\voxel\thirdparty\fast_noise_2\src\FastSIMD\FastSIMD_Level_AVX2.cpp ... [ 70%] Compiling modules\voxel\thirdparty\fast_noise_2\src\FastSIMD\FastSIMD_Level_AVX512.cpp ... [ 70%] Compiling modules\voxel\meshers\blocky\voxel_blocky_library.cpp ... [ 70%] Compiling modules\voxel\meshers\blocky\voxel_blocky_library_base.cpp ... [ 71%] Compiling modules\voxel\meshers\blocky\voxel_blocky_model.cpp ... [ 71%] Compiling modules\voxel\meshers\blocky\voxel_blocky_model_cube.cpp ... [ 71%] Compiling modules\voxel\meshers\blocky\voxel_blocky_model_empty.cpp ... C:\Users\oswit\GodotWithVoxel\modules\voxel\thirdparty\fast_noise_2\include\FastNoise\Generators/Modifiers.inl(30): error C2039: 'GetSourceValue': is not a member of 'FS_T<FastNoise::DomainOffset,FastSIMD::SSE_T<FastSIMD::Level_SSE2>>::GenT::<lambda_1>' C:\Users\oswit\GodotWithVoxel\modules\voxel\thirdparty\fast_noise_2\include\FastNoise\Generators/Modifiers.inl(33): note: see declaration of 'FS_T<FastNoise::DomainOffset,FastSIMD::SSE_T<FastSIMD::Level_SSE2>>::GenT::<lambda_1>' C:\Users\oswit\GodotWithVoxel\modules\voxel\thirdparty\fast_noise_2\include\FastNoise\Generators/Modifiers.inl(30): note: the template instantiation context (the oldest one first) is modules\voxel\thirdparty\fast_noise_2\include\FastNoise/FastNoise_BuildList.inl(107): note: see reference to function template instantiation 'FastNoise::DomainOffset *FastSIMD::ClassFactory<FastNoise::DomainOffset,FastSIMD::Level_SSE2>(FastSIMD::MemoryAllocator)' being compiled C:\Users\oswit\GodotWithVoxel\modules\voxel\thirdparty\fast_noise_2\src\FastSIMD\Internal/SourceBuilder.inl(12): note: see reference to variable template 'const bool is_base_of_v<FastNoise::DomainOffset,FS_T<FastNoise::DomainOffset,FastSIMD::SSE_T<4> > >' being compiled modules\voxel\thirdparty\fast_noise_2\src\FastSIMD\FastSIMD_Level_SSE2.cpp(8): note: see reference to class template instantiation 'FS_T<FastNoise::DomainOffset,FastSIMD::SSE_T<FastSIMD::Level_SSE2>>' being compiled C:\Users\oswit\GodotWithVoxel\modules\voxel\thirdparty\fast_noise_2\include\FastNoise\Generators/Modifiers.inl(22): note: while compiling class template member function 'FastSIMD::SSE_f32x4 FS_T<FastNoise::DomainOffset,FastSIMD::SSE_T<FastSIMD::Level_SSE2>>::Gen(FastSIMD::SSE_i32x4<FastSIMD::Level_SSE2>,FastSIMD::SSE_f32x4,FastSIMD::SSE_f32x4,FastSIMD::SSE_f32x4,FastSIMD::SSE_f32x4) const' C:\Users\oswit\GodotWithVoxel\modules\voxel\thirdparty\fast_noise_2\include\FastNoise\Generators/Modifiers.inl(22): note: see reference to function template instantiation 'FastSIMD::SSE_f32x4 FS_T<FastNoise::DomainOffset,FastSIMD::SSE_T<FastSIMD::Level_SSE2>>::GenT<FastSIMD::SSE_f32x4,FastSIMD::SSE_f32x4,FastSIMD::SSE_f32x4,FastSIMD::SSE_f32x4>(FastSIMD::SSE_i32x4<FastSIMD::Level_SSE2>,FastSIMD::SSE_f32x4,FastSIMD::SSE_f32x4,FastSIMD::SSE_f32x4,FastSIMD::SSE_f32x4) const' being compiled [ 71%] Compiling modules\voxel\meshers\blocky\voxel_blocky_model_mesh.cpp ... scons: *** [modules\voxel\thirdparty\fast_noise_2\src\FastSIMD\FastSIMD_Level_SSE2.windows.editor.x86_64.obj] Error 2 C:\Users\oswit\GodotWithVoxel\modules\voxel\thirdparty\fast_noise_2\include\FastNoise\Generators/Modifiers.inl(30): error C2039: 'GetSourceValue': is not a member of 'FS_T<FastNoise::DomainOffset,FastSIMD::SSE_T<FastSIMD::Level_SSE41>>::GenT::<lambda_1>' C:\Users\oswit\GodotWithVoxel\modules\voxel\thirdparty\fast_noise_2\include\FastNoise\Generators/Modifiers.inl(33): note: see declaration of 'FS_T<FastNoise::DomainOffset,FastSIMD::SSE_T<FastSIMD::Level_SSE41>>::GenT::<lambda_1>' C:\Users\oswit\GodotWithVoxel\modules\voxel\thirdparty\fast_noise_2\include\FastNoise\Generators/Modifiers.inl(30): note: the template instantiation context (the oldest one first) is modules\voxel\thirdparty\fast_noise_2\include\FastNoise/FastNoise_BuildList.inl(107): note: see reference to function template instantiation 'FastNoise::DomainOffset *FastSIMD::ClassFactory<FastNoise::DomainOffset,FastSIMD::Level_SSE41>(FastSIMD::MemoryAllocator)' being compiled C:\Users\oswit\GodotWithVoxel\modules\voxel\thirdparty\fast_noise_2\src\FastSIMD\Internal/SourceBuilder.inl(12): note: see reference to variable template 'const bool is_base_of_v<FastNoise::DomainOffset,FS_T<FastNoise::DomainOffset,FastSIMD::SSE_T<32> > >' being compiled modules\voxel\thirdparty\fast_noise_2\src\FastSIMD\FastSIMD_Level_SSE41.cpp(8): note: see reference to class template instantiation 'FS_T<FastNoise::DomainOffset,FastSIMD::SSE_T<FastSIMD::Level_SSE41>>' being compiled C:\Users\oswit\GodotWithVoxel\modules\voxel\thirdparty\fast_noise_2\include\FastNoise\Generators/Modifiers.inl(22): note: while compiling class template member function 'FastSIMD::SSE_f32x4 FS_T<FastNoise::DomainOffset,FastSIMD::SSE_T<FastSIMD::Level_SSE41>>::Gen(FastSIMD::SSE_i32x4<FastSIMD::Level_SSE41>,FastSIMD::SSE_f32x4,FastSIMD::SSE_f32x4,FastSIMD::SSE_f32x4,FastSIMD::SSE_f32x4) const' C:\Users\oswit\GodotWithVoxel\modules\voxel\thirdparty\fast_noise_2\include\FastNoise\Generators/Modifiers.inl(22): note: see reference to function template instantiation 'FastSIMD::SSE_f32x4 FS_T<FastNoise::DomainOffset,FastSIMD::SSE_T<FastSIMD::Level_SSE41>>::GenT<FastSIMD::SSE_f32x4,FastSIMD::SSE_f32x4,FastSIMD::SSE_f32x4,FastSIMD::SSE_f32x4>(FastSIMD::SSE_i32x4<FastSIMD::Level_SSE41>,FastSIMD::SSE_f32x4,FastSIMD::SSE_f32x4,FastSIMD::SSE_f32x4,FastSIMD::SSE_f32x4) const' being compiled C:\Users\oswit\GodotWithVoxel\modules\voxel\thirdparty\fast_noise_2\include\FastNoise\Generators/Modifiers.inl(30): error C2039: 'GetSourceValue': is not a member of 'FS_T<FastNoise::DomainOffset,FastSIMD::AVX512_T<FastSIMD::Level_AVX512>>::GenT::<lambda_1>' C:\Users\oswit\GodotWithVoxel\modules\voxel\thirdparty\fast_noise_2\include\FastNoise\Generators/Modifiers.inl(33): note: see declaration of 'FS_T<FastNoise::DomainOffset,FastSIMD::AVX512_T<FastSIMD::Level_AVX512>>::GenT::<lambda_1>' C:\Users\oswit\GodotWithVoxel\modules\voxel\thirdparty\fast_noise_2\include\FastNoise\Generators/Modifiers.inl(30): note: the template instantiation context (the oldest one first) is modules\voxel\thirdparty\fast_noise_2\include\FastNoise/FastNoise_BuildList.inl(107): note: see reference to function template instantiation 'FastNoise::DomainOffset *FastSIMD::ClassFactory<FastNoise::DomainOffset,FastSIMD::Level_AVX512>(FastSIMD::MemoryAllocator)' being compiled C:\Users\oswit\GodotWithVoxel\modules\voxel\thirdparty\fast_noise_2\src\FastSIMD\Internal/SourceBuilder.inl(12): note: see reference to variable template 'const bool is_base_of_v<FastNoise::DomainOffset,FS_T<FastNoise::DomainOffset,FastSIMD::AVX512_T<512> > >' being compiled modules\voxel\thirdparty\fast_noise_2\src\FastSIMD\FastSIMD_Level_AVX512.cpp(18): note: see reference to class template instantiation 'FS_T<FastNoise::DomainOffset,FastSIMD::AVX512_T<FastSIMD::Level_AVX512>>' being compiled C:\Users\oswit\GodotWithVoxel\modules\voxel\thirdparty\fast_noise_2\include\FastNoise\Generators/Modifiers.inl(22): note: while compiling class template member function 'FastSIMD::AVX512_f32x16 FS_T<FastNoise::DomainOffset,FastSIMD::AVX512_T<FastSIMD::Level_AVX512>>::Gen(FastSIMD::AVX512_i32x16,FastSIMD::AVX512_f32x16,FastSIMD::AVX512_f32x16,FastSIMD::AVX512_f32x16,FastSIMD::AVX512_f32x16) const' C:\Users\oswit\GodotWithVoxel\modules\voxel\thirdparty\fast_noise_2\include\FastNoise\Generators/Modifiers.inl(22): note: see reference to function template instantiation 'FastSIMD::AVX512_f32x16 FS_T<FastNoise::DomainOffset,FastSIMD::AVX512_T<FastSIMD::Level_AVX512>>::GenT<FastSIMD::AVX512_f32x16,FastSIMD::AVX512_f32x16,FastSIMD::AVX512_f32x16,FastSIMD::AVX512_f32x16>(FastSIMD::AVX512_i32x16,FastSIMD::AVX512_f32x16,FastSIMD::AVX512_f32x16,FastSIMD::AVX512_f32x16,FastSIMD::AVX512_f32x16) const' being compiled scons: *** [modules\voxel\thirdparty\fast_noise_2\src\FastSIMD\FastSIMD_Level_SSE41.windows.editor.x86_64.obj] Error 2 scons: *** [modules\voxel\thirdparty\fast_noise_2\src\FastSIMD\FastSIMD_Level_AVX512.windows.editor.x86_64.obj] Error 2 C:\Users\oswit\GodotWithVoxel\modules\voxel\thirdparty\fast_noise_2\include\FastNoise\Generators/Modifiers.inl(30): error C2039: 'GetSourceValue': is not a member of 'FS_T<FastNoise::DomainOffset,FastSIMD::AVX_T<FastSIMD::Level_AVX2>>::GenT::<lambda_1>' C:\Users\oswit\GodotWithVoxel\modules\voxel\thirdparty\fast_noise_2\include\FastNoise\Generators/Modifiers.inl(33): note: see declaration of 'FS_T<FastNoise::DomainOffset,FastSIMD::AVX_T<FastSIMD::Level_AVX2>>::GenT::<lambda_1>' C:\Users\oswit\GodotWithVoxel\modules\voxel\thirdparty\fast_noise_2\include\FastNoise\Generators/Modifiers.inl(30): note: the template instantiation context (the oldest one first) is modules\voxel\thirdparty\fast_noise_2\include\FastNoise/FastNoise_BuildList.inl(107): note: see reference to function template instantiation 'FastNoise::DomainOffset *FastSIMD::ClassFactory<FastNoise::DomainOffset,FastSIMD::Level_AVX2>(FastSIMD::MemoryAllocator)' being compiled C:\Users\oswit\GodotWithVoxel\modules\voxel\thirdparty\fast_noise_2\src\FastSIMD\Internal/SourceBuilder.inl(12): note: see reference to variable template 'const bool is_base_of_v<FastNoise::DomainOffset,FS_T<FastNoise::DomainOffset,FastSIMD::AVX_T<256> > >' being compiled modules\voxel\thirdparty\fast_noise_2\src\FastSIMD\FastSIMD_Level_AVX2.cpp(18): note: see reference to class template instantiation 'FS_T<FastNoise::DomainOffset,FastSIMD::AVX_T<FastSIMD::Level_AVX2>>' being compiled C:\Users\oswit\GodotWithVoxel\modules\voxel\thirdparty\fast_noise_2\include\FastNoise\Generators/Modifiers.inl(22): note: while compiling class template member function 'FastSIMD::AVX_f32x8 FS_T<FastNoise::DomainOffset,FastSIMD::AVX_T<FastSIMD::Level_AVX2>>::Gen(FastSIMD::AVX2_i32x8,FastSIMD::AVX_f32x8,FastSIMD::AVX_f32x8,FastSIMD::AVX_f32x8,FastSIMD::AVX_f32x8) const' C:\Users\oswit\GodotWithVoxel\modules\voxel\thirdparty\fast_noise_2\include\FastNoise\Generators/Modifiers.inl(22): note: see reference to function template instantiation 'FastSIMD::AVX_f32x8 FS_T<FastNoise::DomainOffset,FastSIMD::AVX_T<FastSIMD::Level_AVX2>>::GenT<FastSIMD::AVX_f32x8,FastSIMD::AVX_f32x8,FastSIMD::AVX_f32x8,FastSIMD::AVX_f32x8>(FastSIMD::AVX2_i32x8,FastSIMD::AVX_f32x8,FastSIMD::AVX_f32x8,FastSIMD::AVX_f32x8,FastSIMD::AVX_f32x8) const' being compiled scons: *** [modules\voxel\thirdparty\fast_noise_2\src\FastSIMD\FastSIMD_Level_AVX2.windows.editor.x86_64.obj] Error 2 scons: building terminated because of errors.

OsmiumShield commented 14 hours ago

After a lot of troubleshooting I managed to figure out how to disable fast_noise_2 in SCsub. My understanding is that everything else should work without it. I believe my problem is that SCons is grabbing an outdated version of MSVC. It says it's grabbing 14.3, but the version I have in my PATH is 19.41.34120. I've looked for hours and can't figure out how it's grabbing 14.3, or how to make it grab the correct version.

NuclearPhoenixx commented 12 hours ago

That's weird, but I think you're correct that something is wrong with your compiler/dependencies install, because I don't have any troubles compiling the same version with the same settings.

Zylann commented 8 hours ago

I guess you need a more recent version of MSVC. I don't have problems compiling it (I have both VS2017 and VS2019, I think I'm only using the latter), I haven't heard of people having problem with it so far (it's been in the module for years; there has been a few issues with warnings treated as errors but those were fixed FN2 repo), and none of the CI platforms have problems with it (Linux with GCC, Mac OS with Clang, Windows with MSVC). Maybe you need to uninstall this old version somehow? 14 seems to be almost a decade old.