Build Error on UE5.1.1 and Visual Studio 17.12.3

Hi,
I want to report an error after (having to/) upgrading to VS 17.12.3 while our project still is at UE5.1.1

After the upgrade, the compiler failed to recognize a __has_feature used in one of the Runtime headers.
This results in an error with that statement that the elif __has_feature() is replaced with an ‘elif 0’.
However the build does not proceed and is cancelled with the next cascading error.

My fix was to manually replace the line in question with an #elif 0. Which worked.

This is in : \UE_5.1\Engine\Source\Runtime\Core\Public\Experimental\ConcurrentLinearAllocator.h
line 29:
#elif __has_feature(address_sanitizer)
#define IS_ASAN_ENABLED 1

Replaced with:
#elif 0
#define IS_ASAN_ENABLED 1
Fixes the issue.
(Maybe this is fixed and not an issue in later versions but for the combination of UE5.1.1 and VS 17.12.3, required this change on my side.)

As I did not go deeper into this, and who is to fix this, I simply want to report this here and point out a solution to people running into this. The suspect culprit is a change in the bundled .net version of the VS installation that was updated.
If you rely on ASAN this is obviously not the right solution for you!

All the best,
–M

(As a note: downgrading .net and therfore VS is not an option, as this was a forced upgrade in the first place. :frowning: )

1 Like