Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] D3D build failure on basic project Unity 2019.1f1. #259

Closed
ShaneRH opened this issue May 8, 2019 · 7 comments
Closed

[Bug] D3D build failure on basic project Unity 2019.1f1. #259

ShaneRH opened this issue May 8, 2019 · 7 comments
Labels

Comments

@ShaneRH
Copy link

ShaneRH commented May 8, 2019

Bug
Visual studio project fails to compile when AppCenter SDK for unity is added to project.
(Error report included at end of this report)

Setup
Windows 10 Version 10.0.17763 Build 17763
Unity 2019.1.1f1
Visual Studio 2017 & 2019
Latest windows 10 SDK etc

Steps to Reproduce
Create new project in unity 2019.1.1f1
Add App-center SDK
Install analytics package.
Create a D3D Build
Open the Visual Studio project and build it

The following error is output:

il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\bin\HostX64\x64\link.exe /out:"R:\Source\UWP-Test\uwptest14\build\obj\il2cppOutputProject\x64\Debug\linkresult_300AEDD81259B9FA3DFCD48212B67285\GameAssembly.dll" /DEBUG:FASTLINK /INCREMENTAL:NO /LARGEADDRESSAWARE /NXCOMPAT /DYNAMICBASE /NOLOGO /TLBID:1 /HIGHENTROPYVA /DLL /NODEFAULTLIB:uuid.lib "Shcore.lib" "WindowsApp.lib" "Crypt32.lib" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\um\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\lib\x64\store" /APPCONTAINER /SUBSYSTEM:WINDOWS /NODEFAULTLIB:ole32.lib /NODEFAULTLIB:kernel32.lib /NODEFAULTLIB:msvcrt.lib @"C:\Users\shane\AppData\Local\Temp\tmp45C2.tmp"
1>
1>Creating library R:\Source\UWP-Test\uwptest14\build\obj\il2cppOutputProject\x64\Debug\linkresult_300AEDD81259B9FA3DFCD48212B67285\GameAssembly.lib and object R:\Source\UWP-Test\uwptest14\build\obj\il2cppOutputProject\x64\Debug\linkresult_300AEDD81259B9FA3DFCD48212B67285\GameAssembly.exp
1>DAAFDDB530D7D20E60516F17CA95E7E7.obj : error LNK2019: unresolved external symbol "public: static struct Il2CppString * __cdecl il2cpp::icalls::mscorlib::System::IO::MonoIO::GetCurrentDirectory(int *)" (?GetCurrentDirectory@MonoIO@IO@System@mscorlib@icalls@il2cpp@@SAPEAUIl2CppString@@PEAH@Z) referenced in function MonoIO_GetCurrentDirectory_m58052285E84A0379331FF2FE78A663C9F5C64C21
1>R:\Source\UWP-Test\uwptest14\build\obj\il2cppOutputProject\x64\Debug\linkresult_300AEDD81259B9FA3DFCD48212B67285\GameAssembly.dll : fatal error LNK1120: 1 unresolved externals
1>
1>   at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)
1>   at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
1>   at il2cpp.Program.DoRun(String[] args)
1>   at il2cpp.Program.Run(String[] args)
1>   at il2cpp.Program.Main(String[] args)
1>
1>Unhandled Exception: Unity.IL2CPP.Building.BuilderFailedException: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\bin\HostX64\x64\link.exe /out:"R:\Source\UWP-Test\uwptest14\build\obj\il2cppOutputProject\x64\Debug\linkresult_300AEDD81259B9FA3DFCD48212B67285\GameAssembly.dll" /DEBUG:FASTLINK /INCREMENTAL:NO /LARGEADDRESSAWARE /NXCOMPAT /DYNAMICBASE /NOLOGO /TLBID:1 /HIGHENTROPYVA /DLL /NODEFAULTLIB:uuid.lib "Shcore.lib" "WindowsApp.lib" "Crypt32.lib" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\um\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\lib\x64\store" /APPCONTAINER /SUBSYSTEM:WINDOWS /NODEFAULTLIB:ole32.lib /NODEFAULTLIB:kernel32.lib /NODEFAULTLIB:msvcrt.lib @"C:\Users\shane\AppData\Local\Temp\tmp45C2.tmp"
1>
1>Creating library R:\Source\UWP-Test\uwptest14\build\obj\il2cppOutputProject\x64\Debug\linkresult_300AEDD81259B9FA3DFCD48212B67285\GameAssembly.lib and object R:\Source\UWP-Test\uwptest14\build\obj\il2cppOutputProject\x64\Debug\linkresult_300AEDD81259B9FA3DFCD48212B67285\GameAssembly.exp
1>DAAFDDB530D7D20E60516F17CA95E7E7.obj : error LNK2019: unresolved external symbol "public: static struct Il2CppString * __cdecl il2cpp::icalls::mscorlib::System::IO::MonoIO::GetCurrentDirectory(int *)" (?GetCurrentDirectory@MonoIO@IO@System@mscorlib@icalls@il2cpp@@SAPEAUIl2CppString@@PEAH@Z) referenced in function MonoIO_GetCurrentDirectory_m58052285E84A0379331FF2FE78A663C9F5C64C21
1>R:\Source\UWP-Test\uwptest14\build\obj\il2cppOutputProject\x64\Debug\linkresult_300AEDD81259B9FA3DFCD48212B67285\GameAssembly.dll : fatal error LNK1120: 1 unresolved externals
1>
1>   at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)
1>   at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
1>   at il2cpp.Program.DoRun(String[] args)
1>   at il2cpp.Program.Run(String[] args)
1>   at il2cpp.Program.Main(String[] args)
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command ""R:\Source\UWP-Test\uwptest14\Il2CppOutputProject\\IL2CPP\build\il2cpp.exe" --libil2cpp-static --compile-cpp -architecture=x64 -configuration=Debug -platform=winrt -outputpath="R:\Source\UWP-Test\uwptest14\\build\bin\x64\Debug\GameAssembly.dll" --data-folder="R:\Source\UWP-Test\uwptest14\\build\bin\x64\Debug\\" -cachedirectory="R:\Source\UWP-Test\uwptest14\\build\obj\il2cppOutputProject\x64\Debug\\" -generatedcppdir="R:\Source\UWP-Test\uwptest14\Il2CppOutputProject\\Source"  --profiler-report --additional-defines=WINDOWS_UWP --additional-defines=UNITY_UWP --additional-defines=UNITY_WSA_10_0 --additional-defines=UNITY_WSA --additional-defines=UNITY_WINRT --additional-defines=PLATFORM_WINRT -dotnetprofile=unityaot -verbose --map-file-parser="R:\Source\UWP-Test\uwptest14\Il2CppOutputProject\\IL2CPP\MapFileParser\MapFileParser.exe"" exited with code -532462766.
1>Done building project "Il2CppOutputProject.vcxproj" -- FAILED.
@MatkovIvan MatkovIvan added the bug label May 8, 2019
@ShaneRH
Copy link
Author

ShaneRH commented May 8, 2019

Additional Comment:

If you comment out FixIl2CppLogging(pathToBuiltProject); (line 68 in AppCenterPostBuild.cs) the project then builds successfully, I do not know what side effects this will have though....

@annakocheshkova
Copy link

Thank you @ShaneRH for opening that issue and sharing the details! We haven't tested with Unity 2019 yet. Looking at it.

@annakocheshkova
Copy link

@ShaneRH we've managed to reproduce this. We will notify you once the fix is ready. Thanks!

@wagenheimer
Copy link

@AnastasiaKubova I'm creating a WSA build in Unity 2019.1 and have the same error. Is the fix already available?

@dtrabo
Copy link
Contributor

dtrabo commented May 24, 2019

Hi @wagenheimer , thanks for reporting this.
We are still working on it. Please stay in touch and we will notify you when the fix will be released.

@maestersid
Copy link

Hi all! Thank you for your patience, our team has been working on this issue and there should be a fix in place. I believe it will be included in the June release. I'm not 100% sure on timeframe, but soon I think?

@annakocheshkova
Copy link

Hi there, @ShaneRH @wagenheimer the fix is released now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants