sideeffects / HoudiniEngineForUnreal-v2

Houdini Engine Plugin for Unreal Engine 4 - Version 2
http://www.sidefx.com/unreal
Other
295 stars 75 forks source link

PS4 LLVM Clang Compiler Errors. #10

Closed cort-gunfiregames closed 3 years ago

cort-gunfiregames commented 4 years ago

A few more issues as we moved to make builds for the PS4. Clang may be strict as hell, but it found a few good issues as well.

Any idea of how frequently you all are expecting to update the V2 repo?

Source\HoudiniEngineRuntime\Private\HoudiniParameterFile.h image

Source\HoudiniEngineRuntime\Private\HoudiniAssetComponent.h Due to use of UHoudiniOutput at line 625, the include is required vs forward declaration. image

On Line 631, I believe you are wanting to access OutputObject of FHoudiniOutputObject value. In which case there is one change needed. image

Source\HoudiniEngineRuntime\Private\HoudiniGeoPartObject.cpp Mismatch of && || && without scope control. image

Source\HoudiniEngineRuntime\Private\HoudiniInputObject.h Clang does not allow forward declarations of enumerations. image image image

Source\HoudiniEngineRuntime\Private\HoudiniAssetComponent.cpp Clang does not allow nested /**/ comments. image

Source\HoudiniEngine\Private\HoudiniEngine.cpp Fixing crashes due to accessing slate prior to init. image

Source\HoudiniEngineEditor\Private\HoudiniEngineEditor.cpp Same as above. image

Cheers, -Cort

dpernuit commented 4 years ago

Hi Cort,

Thanks for bringing these to our attention! We had a few of these already fixed on our end, but you did catch a few we missed. V2 is not yet part of our usual build farm, which uses clang so would normally report some of these issues,

As for updates, I'll be committing one soon, and we do plan on updating the alpha repo periodically, after adding new features or after a good amount of bugs have been fixed.

Thanks again for the feedback!

adambrown commented 4 years ago

Just integrated Alpha Update 2 and tried to build game binaries. Here are the issues I still had to fix to get them to build.

01 02 03 04 05 06 07 08 09

I think most of them were covered in one of Cort's two compile issues. One additional issue was I needed to #include <functional> in HoudiniInputObject.h because of std::hash<T> at 586.

dpernuit commented 4 years ago

Hi Adam,

Minus the include, all those issues should have been fixed in update-2. Adding functional breaks the build on my side though, so I wont be commuting a change for that.

Thanks!

adambrown commented 4 years ago

Hmm, that's odd Damien. I'm definitely on update 2. It pulled in Houdini 18.0.460. Just double checked. All the issues above are still in there. I am on the 4.24 branch. Is it possible not all the fixes made it to both branches?

GitHubDesktop_1tCJmQ4n9G rider64_WH4RGJyi7E
adambrown commented 4 years ago

If I remove #include <functional> and try to build game binaries with UBT like this:

E:\p4\adam_foo_dev_2\UE4\Engine\Binaries\DotNET\UnrealBuildTool.exe FOO Win64 Development

compile fails on HoudiniEngineRuntime with the following errors:

E:\p4\adam_foo_dev_2\UE4\Engine\Plugins\Runtime\HoudiniEngine\Source\HoudiniEngineRuntime\Private\HoudiniInputObject.h(586,17): error: implicit instantiation of undefined template 'std::__1::hash<float>'
           std::hash<T> h;
                        ^
 E:\p4\adam_foo_dev_2\UE4\Engine\Plugins\Runtime\HoudiniEngine\Source\HoudiniEngineRuntime\Private\HoudiniInputObject.h(592,3): note: in instantiation of function template specialization 'FHoudiniBrushInfo::HashCombine<float>' requested here
                 HashCombine(s, V.X);
                 ^
 E:\p4\adam_foo_dev_2\UE4\Engine\Source\ThirdParty\Linux\LibCxx\include\c++\v1\type_traits(417,50): note: template is declared here
 template <class _Tp> struct _LIBCPP_TEMPLATE_VIS hash;
                                                  ^
 In file included from E:\p4\adam_foo_dev_2\UE4\foo\Game\Intermediate\Build\Linux\B4D820EA\FOOServer\Development\HoudiniEngineRuntime\Module.HoudiniEngineRuntime.gen.1_of_3.cpp:9:
 In file included from E:/p4/adam_foo_dev_2/UE4/foo/Game/Intermediate/Build/Linux/B4D820EA/FOOServer/Inc/HoudiniEngineRuntime/HoudiniInput.gen.cpp:8:
 In file included from ../Plugins/Runtime/HoudiniEngine/Source\HoudiniEngineRuntime/Private/HoudiniInput.h:34:
 E:\p4\adam_foo_dev_2\UE4\Engine\Plugins\Runtime\HoudiniEngine\Source\HoudiniEngineRuntime\Private\HoudiniInputObject.h(586,17): error: implicit instantiation of undefined template 'std::__1::hash<unsigned long long>'
           std::hash<T> h;
                        ^
 E:\p4\adam_foo_dev_2\UE4\Engine\Plugins\Runtime\HoudiniEngine\Source\HoudiniEngineRuntime\Private\HoudiniInputObject.h(603,3): note: in instantiation of function template specialization 'FHoudiniBrushInfo::HashCombine<unsigned long long>' requested here
                 HashCombine(Hash, (uint64)(Poly.Material));
                 ^
 E:\p4\adam_foo_dev_2\UE4\Engine\Source\ThirdParty\Linux\LibCxx\include\c++\v1\type_traits(417,50): note: template is declared here
 template <class _Tp> struct _LIBCPP_TEMPLATE_VIS hash;
                                                  ^
 2 errors generated.

As best I can tell all the definitions for std::hash are in <functional>. How are you getting the definitions without including it? Note this is on a Development build. HoudiniEngineRuntime will compile for an Editor build. Is it possible it's relying on some transitive dependency somewhere that only comes in if WITH_EDITOR?

dpernuit commented 4 years ago

Hey Adam, My bad, you're right, sounds like the 4.24 sources are missing some backports from the main branch! I'll sort that out and post an update when its fixed!