Failed to build UnrealLightMass.exe on Promoted Branch

Failed to Build due to

Full log attached

Module.UnrealLightmass.2_of_3.cpp
1>d:\3d\engines\unrealengine\engine\source\programs\unreallightmass\private\lightmasscore\math\LMMathSSE.h(595): error C3861: '_mm_cvtpu8_ps': identifier not found
1>  Module.UnrealLightmass.3_of_3.cpp
1>d:\3d\engines\unrealengine\engine\source\programs\unreallightmass\private\lightmasscore\math\LMMathSSE.h(595): error C3861: '_mm_cvtpu8_ps': identifier not found
1>  Module.UnrealLightmass.1_of_3.cpp
1>d:\3d\engines\unrealengine\engine\source\programs\unreallightmass\private\lightmasscore\math\LMMathSSE.h(595): error C3861: '_mm_cvtpu8_ps': identifier not found

link text

Hey pyropace-

I was able to successfully build the engine from the GitHub Promoted branch. It is possible that a file was corrupted before going into the build or during the download process without this issue. If you redownload the promoted branch you should be able to build the engine.

Cheers

Hi @-

I noticed _mm_cvtpu8_ps(__m64 _A) is not available in

d:\Program Files\Visual Studio 2015\VC\include\xmmintrin.h ( which is used by lightmass )

Because _M_IX86 is not defined. After searching around a bit. i came across this link

if you search for “_M_IX86” you will notice "
Defined for compilations that target x86 processors. This is not defined for x64 processors." which explains why _mm_cvtpu8_ps is not available when i do a build since i am building on a x64 processor.

is there something i am missing here?

Thanks

if i generate vs 2013 project files instead of 2015. i can build no problem

I am also having the same issue when compiling with VS2015 update 2. Is there any simple work around this issue? (this happens in 4.11, in release branch!)

Hey osolin-

Are you referring to the engine failing to build or a project being used in that version of the engine? Can you let me know if pyropace’s solution of generating VS2013 project files instead of 2015 solves the issue for you? Can you also provide any log files from the failed build attempt?

Hey @,

I did some more investigation into this. after updating to vs update 2 for some reason, when you generate 2015 projects, the light mass project , generates 32 bit code instead of 64 bit code , that results in _M_IX86 marco being undefined, which results in these errors , it has nothing to do with the actual build machine processor. it is a project setting. here is a stack overflow topic to better explain the issue.

to produce this issue locally on your machine. update your visual studio 2015 to update 2 , then open UE solution from any branches, i tried, master, promoted, released 4.11. this happens on all. i believe it is just s configuration issue .

I can also confirm this.

Is there any quick fix for this?

@Dough, To answer your earlier question, this happens on engine builds and the projects that are generated by the engine

Having same problems trying to build 4.11 release using Visual Studio update 2, generates the above errors, preventing lightmass from compiling.

If anyone needs a quick temp fix for this issue, open LMMathSSE.h in UnrealLightmass/Private/LightmassCore/Math and replace line 586 with:
VectorRegister Temp = _mm_cvtepi32_ps(_mm_unpacklo_epi16(_mm_unpacklo_epi8(_mm_cvtsi32_si128((int32)Ptr), _mm_setzero_si128()), _mm_setzero_si128()));

This is taken from the Core libraries version of that same function.

That didnt work for me, did it work for you ?

@Dough

Based on Visual studio update 2 release notes, /bigobj is now supported …

look under Clang/C2 Platform Toolset

so we can maybe enable it ?

if (!WindowsPlatform.bCompileWithClang)
				{
					// Allow large object files to avoid hitting the 2^16 section limit when running with -StressTestUnity.
					Arguments.Append(" /bigobj");

					// Relaxes floating point precision semantics to allow more optimization.
					Arguments.Append(" /fp:fast");
				}

@anonymous_user_d18a2df2 Yep, wouldn’t have posted it otherwise… Did you explicitly build UnrealLightmass project? Had to do that manually.

@anonymous_user_d18a2df2 Oh! Stupid input box removed the '*'s… See attached image.

I am getting this error

Severity	Code	Description	Project	File	Line	Suppression State
Error	C4302	'type cast': truncation from 'void *' to 'int32'	UnrealLightmass	d:\3d\engines\unrealengine\unrealengine\engine\source\programs\unreallightmass\private\lightmasscore\math\LMMathSSE.h	595

beautiful . thanks!

This bug is really bugging me ( not pun intended :wink: )

Thank you for this! This has absolutely been destroying me today and this fixed it. One question though, what does the change do? Will I need to revert this later for any reason?

Thanks, this fix works for now!

Simply takes the long route to do the same thing as _mm_cvtpu8_ps. Ideally, yes you would revert it once Epic fixes the bug since the single intrinsic call is a bit faster.

Hello,

I have been able to reproduce this compiler error, and have entered a bug report (UE-29050). Thank you for your report. I will provide updates on this issue as they become available.

Have a great day