Download

UE4_Build Issue CString.h

Hi,

I would like to build a special version of the Editor on Mac. But when I try to built the UE4 target I have one issue :

Target : UE4_Build

issue : Shell Script Invocation Error Group

       Runtime/Core/Public/Misc/CString.h:364:31: error: instantiation of variable 'TCStringSpcHelper<wchar_t>::SpcArray' required here, but no definition is available -Werror,-Wundefined-var-template]

Setting up Mono
Building UE4Editor…
2017-04-12 18:34:25.994 defaults[33527:6160707]
The domain/default pair of (com.apple.dt.Xcode, IDEBuildOperationMaxNumberOfConcurrentCompileTasks) does not exist
Running command : Engine/Binaries/DotNET/UnrealBuildTool.exe UE4Editor Mac Development
Compiling with MacOSX SDK 10.12
Building UnrealHeaderTool…
Compiling with MacOSX SDK 10.12
Performing 28 actions (4 in parallel)
[2/28] Compile Module.Json.cpp
[1/28] Compile CorePrivatePCH.h
[3/28] Compile Module.Projects.cpp
[4/28] Compile Module.CoreUObject.1_of_5.cpp
[5/28] Compile Module.Core.2_of_8.cpp
[6/28] Compile Module.Core.3_of_8.cpp
[7/28] Compile Module.Core.1_of_8.cpp
[8/28] Compile Module.Core.6_of_8.cpp
[9/28] Compile Module.Core.4_of_8.cpp
[10/28] Compile Module.Core.5_of_8.cpp
[11/28] Compile Module.Core.8_of_8.cpp
[12/28] Compile Module.Core.7_of_8.cpp
[13/28] Compile Module.CoreUObject.3_of_5.cpp
[14/28] Compile Module.CoreUObject.2_of_5.cpp
In file included from /Users/adelesuty/Desktop/UnrealEngine/UnrealEngine-4.13_Preview_NVIDIA_Techs/Engine/Intermediate/Build/Mac/UnrealHeaderTool/Development/CoreUObject/Module.CoreUObject.3_of_5.cpp:2:
In file included from Runtime/CoreUObject/Private/CoreUObjectPrivate.h:10:
In file included from Runtime/Core/Public/Core.h:48:
In file included from Runtime/Core/Public/Misc/StringUtility.h:6:
Runtime/Core/Public/Misc/CString.h:364:31: error: instantiation of variable ‘TCStringSpcHelper<wchar_t>::SpcArray’ required here, but no definition is available -Werror,-Wundefined-var-template]
return TCStringSpcHelper<T>::SpcArray + TCStringSpcHelper<T>::MAX_SPACES - NumSpaces;
^
Runtime/CoreUObject/Public/UObject/ClassTree.h:581:35: note: in instantiation of member function ‘TCString<wchar_t>::Spc’ requested here
Ar.Logf(TEXT("%s%s"), FCString::Spc(IndentCount), *Class->GetName());
^
Runtime/Core/Public/Misc/CString.h:356:33: note: forward declaration of template entity is here
static CORE_API const CharType SpcArray[MAX_SPACES + 1];
^
Runtime/Core/Public/Misc/CString.h:364:31: note: add an explicit instantiation declaration to suppress this warning if ‘TCStringSpcHelper<wchar_t>::SpcArray’ is explicitly instantiated in another translation unit
return TCStringSpcHelper<T>::SpcArray + TCStringSpcHelper<T>::MAX_SPACES - NumSpaces;
^
1 error generated.
[15/28] Compile Module.CoreUObject.4_of_5.cpp
In file included from /Users/adelesuty/Desktop/UnrealEngine/UnrealEngine-4.13_Preview_NVIDIA_Techs/Engine/Intermediate/Build/Mac/UnrealHeaderTool/Development/CoreUObject/Module.CoreUObject.2_of_5.cpp:2:
In file included from Runtime/CoreUObject/Private/CoreUObjectPrivate.h:10:
In file included from Runtime/Core/Public/Core.h:48:
In file included from Runtime/Core/Public/Misc/StringUtility.h:6:
Runtime/Core/Public/Misc/CString.h:364:31: error: instantiation of variable ‘TCStringSpcHelper<wchar_t>::SpcArray’ required here, but no definition is available -Werror,-Wundefined-var-template]
return TCStringSpcHelper<T>::SpcArray + TCStringSpcHelper<T>::MAX_SPACES - NumSpaces;
^
/Users/adelesuty/Desktop/UnrealEngine/UnrealEngine-4.13_Preview_NVIDIA_Techs/Engine/Source/Runtime/CoreUObject/Private/UObject/CoreNet.cpp:77:73: note: in instantiation of member function ‘TCString<wchar_t>::Spc’ requested here
UE_LOG( LogCoreNet, Warning, TEXT( “%s%s %s] %u] %u]” ), FCString::Spc( 2 * DebugChecksumIndent ), *Property->GetName().ToLower(), *Property->GetClass()->GetName().ToLower(), Property->ArrayDim, Checksum );
^
Runtime/Core/Public/Misc/CString.h:356:33: note: forward declaration of template entity is here
static CORE_API const CharType SpcArray[MAX_SPACES + 1];
^
Runtime/Core/Public/Misc/CString.h:364:31: note: add an explicit instantiation declaration to suppress this warning if ‘TCStringSpcHelper<wchar_t>::SpcArray’ is explicitly instantiated in another translation unit
return TCStringSpcHelper<T>::SpcArray + TCStringSpcHelper<T>::MAX_SPACES - NumSpaces;
^
[16/28] Compile Module.CoreUObject.5_of_5.cpp
1 error generated.
[17/28] Compile Module.UnrealHeaderTool.cpp
In file included from /Users/adelesuty/Desktop/UnrealEngine/UnrealEngine-4.13_Preview_NVIDIA_Techs/Engine/Intermediate/Build/Mac/UnrealHeaderTool/Development/UnrealHeaderTool/Module.UnrealHeaderTool.cpp:2:
In file included from Programs/UnrealHeaderTool/Public/UnrealHeaderTool.h:7:
In file included from Runtime/Core/Public/Core.h:48:
In file included from Runtime/Core/Public/Misc/StringUtility.h:6:
Runtime/Core/Public/Misc/CString.h:364:31: error: instantiation of variable ‘TCStringSpcHelper<wchar_t>::SpcArray’ required here, but no definition is available -Werror,-Wundefined-var-template]
return TCStringSpcHelper<T>::SpcArray + TCStringSpcHelper<T>::MAX_SPACES - NumSpaces;
^
Programs/UnrealHeaderTool/Private/ParserHelper.h:1175:53: note: in instantiation of member function ‘TCString<wchar_t>::Spc’ requested here
UE_LOG(LogCompile, Log, TEXT("%s%s"), FCString::Spc(Indent), *Token.Describe());
^
Runtime/Core/Public/Misc/CString.h:356:33: note: forward declaration of template entity is here
static CORE_API const CharType SpcArray[MAX_SPACES + 1];
^
Runtime/Core/Public/Misc/CString.h:364:31: note: add an explicit instantiation declaration to suppress this warning if ‘TCStringSpcHelper<wchar_t>::SpcArray’ is explicitly instantiated in another translation unit
return TCStringSpcHelper<T>::SpcArray + TCStringSpcHelper<T>::MAX_SPACES - NumSpaces;
^
1 error generated.
[18/28] Link UnrealHeaderTool-Core.dylib
[19/28] Link UnrealHeaderTool-Json.dylib
Generating UnrealHeaderTool-Core.dSYM
[21/28] Link UnrealHeaderTool-Projects.dylib
Generating UnrealHeaderTool-Json.dSYM
Generating UnrealHeaderTool-Projects.dSYM
ERROR: UBT ERROR: Failed to produce item: /Users/adelesuty/Desktop/UnrealEngine/UnrealEngine-4.13_Preview_NVIDIA_Techs/Engine/Binaries/Mac/UnrealHeaderTool-CoreUObject.dylib
Total build time: 118,08 seconds
UnrealHeaderTool failed for target ‘UE4Editor’ (platform: Mac, module info: /Users/adelesuty/Desktop/UnrealEngine/UnrealEngine-4.13_Preview_NVIDIA_Techs/Engine/Intermediate/Build/Mac/UE4Editor/Development/UE4Editor.uhtmanifest).

Someone can help me ?

Cordially.

If you have Xcode 8.3 or above, download Xcode 8.2.1 and try again.
you can download Xcode 8.2.1 from http://adcdownload.apple.com/Developer_Tools/Xcode_8.2.1/Xcode_8.2.1.xip

Hi,
Unfortunately, I’m reproducing this on Linux.
Now that I don’t have anything like XCode.
Is this a issue with CLANG/LLVM version?

Thank you.

I’m getting this in a 4.13.2 project. XCode 9.2. Target iOS is 11.2.5 so I can’t use a prior version of XCode. Will update with progress.

Seems like XCode versions 8.3 and newer no longer allow implicit instantiation of explicitly specialized template types? That’s a lot of words that make sense to very few people. I’m not one of them.