前提・実現したいこと
新規PCにて既存Unity製Switchアプリケーションの環境を移行中となります。
開発に利用するソフトウェアのインストールを済ませ、Unity上でSwitchアプリケーションのビルドをいざ試みた所
以下のエラーメッセージとともに、本来出力されるはずのromデータが生成されない状況となりました。
現在開発PCでの環境ではビルドがエラーもなく問題なく通り、romデータが生成される状況です。
どうやら"il2cpp"エラーというエラーのようで、
ディレクトリのパスに2バイト文字が使われている事が原因としてよく取り上げられているようです。
上記の要因は念の為確認済となります。
実現したい事としては、ビルド時にエラーが無くromが生成される環境を作る事が目的となります。
原因をご存じの方はご教示頂けますよう、宜しくお願いいたします。
発生している問題・エラーメッセージ
Failed running C:\Program Files\Unity\Hub\Editor\2018.3.10f1\Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-stacktrace --enable-array-bounds-check --dotnetprofile="unityaot" --enable-debugger --compile-cpp --platform="Switch" --architecture="ARM64" --configuration="Release" --outputpath="C:\Data\project\2018310f2\ALST_PRJ\Temp\StagingArea\Native\SwitchPlayer.nss" --cachedirectory="C:/Data/project/2018310f2/ALST_PRJ/Assets/../SwitchIL2CPPCache/il2cpp_cache" --plugin="C:/Program Files/Unity/Hub/Editor/2018.3.10f1/Editor/Data/PlaybackEngines/Switch/Tools\Il2CppPlugin.dll" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2018.3.10f1\Editor\Data\PlaybackEngines\Switch\Tools/il2cpp\bdwgc/include" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2018.3.10f1\Editor\Data\PlaybackEngines\Switch\Tools/il2cpp\libil2cpp/include" --verbose --enable-stats --stats-output-dir="C:/Data/project/2018310f2/ALST_PRJ/Assets/../SwitchIL2CPPStats" --libil2cpp-static --additional-defines="DEBUGMODE=1,UNITY_RELEASE=0,IL2CPP_USE_SOCKET_MULTIPLEX_IO=1" --configuration="Release" --map-file-parser="C:\Program Files\Unity\Hub\Editor\2018.3.10f1\Editor\Data\Tools\MapFileParser\MapFileParser.exe" --directory="C:\Data\project\2018310f2\ALST_PRJ\Temp\StagingArea\Managed" --generatedcppdir="C:\Data\project\2018310f2\ALST_PRJ\Temp\StagingArea\il2cppOutput"
stdout:
Building SwitchPlayer.nss with SwitchToolChain
Output directory: C:\Data\project\2018310f2\ALST_PRJ\Temp\StagingArea\Native
Cache directory: C:\Data\project\2018310f2\ALST_PRJ\SwitchIL2CPPCache\il2cpp_cache
ObjectFiles: 786 of which compiled: 33
Time Compile: 2041 milliseconds SocketImpl.cpp
Time Compile: 1610 milliseconds Directory.cpp
Time Compile: 1430 milliseconds File.cpp
Time Compile: 1368 milliseconds Environment.cpp
Time Compile: 1341 milliseconds Cryptography.cpp
Time Compile: 1194 milliseconds LibraryLoader.cpp
Time Compile: 1024 milliseconds MultiplexIO.cpp
Time Compile: 1016 milliseconds TimeZone.cpp
Time Compile: 1010 milliseconds PlatformSocketConsts.cpp
Time Compile: 903 milliseconds Locale.cpp
Total compilation time: 3979 milliseconds.
il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: C:\Nintendo\Unity2018310\NintendoSDK\Compilers\NX\nx\aarch64\bin\clang.exe -nostartfiles -Wl,--gc-sections -Wl,-init=_init,-fini=_fini -Wl,-z,combreloc,-z,relro,--enable-new-dtags -Wl,-pie -Wl,--build-id=uuid -Wl,-u,malloc -Wl,-u,calloc -Wl,-u,realloc -Wl,-u,aligned_alloc -Wl,-u,free -v "-Wl,-T" "C:\Nintendo\Unity2018310\NintendoSDK\Resources\SpecFiles\Application.aarch64.lp64.ldscript" -fuse-ld=gold.exe -Wl,--export-dynamic -Wl,--start-group "C:\Nintendo\Unity2018310\NintendoSDK\Libraries\NX-NXFP2-a64\Develop\rocrt.o" "C:\Nintendo\Unity2018310\NintendoSDK\Libraries\NX-NXFP2-a64\Develop\nnApplication.o" @"C:\Users\a300_0\AppData\Local\Temp\tmpC81F.tmp" "C:\Program Files\Unity\Hub\Editor\2018.3.10f1\Editor\Data\PlaybackEngines\Switch\Tools../Native/Develop/SwitchPlayer.a" "C:\Nintendo\Unity2018310\NintendoSDK\Libraries\NX-NXFP2-a64\Develop\libnn_profiler.a" "C:\Nintendo\Unity2018310\NintendoSDK\Libraries\NX-NXFP2-a64\Develop\libnn_init_memory.a" "C:\Nintendo\Unity2018310\NintendoSDK\Libraries\NX-NXFP2-a64\Develop\libnn_gfx.a" "C:\Nintendo\Unity2018310\NintendoSDK\Libraries\NX-NXFP2-a64\Develop\libnn_mii_draw.a" "C:\Nintendo\Unity2018310\NintendoSDK\Libraries\NX-NXFP2-a64\Develop\libnn_gfx.a" "C:\Nintendo\Unity2018310\NintendoSDK\Libraries\NX-NXFP2-a64\Develop\libnn_mii_draw.a" "C:\Nintendo\Unity2018310\NintendoSDK\Libraries\NX-NXFP2-a64\Develop\libcurl.a" "C:\Nintendo\Unity2018310\NintendoSDK\Libraries\NX-NXFP2-a64\Develop\libz.a" "C:\Nintendo\Unity2018310\NintendoSDK\Libraries\NX-NXFP2-a64\Develop\llgd-target.nss" -Wl,--end-group -Wl,--start-group "C:\Nintendo\Unity2018310\NintendoSDK\Libraries\NX-NXFP2-a64\Develop\multimedia.nss" "C:\Nintendo\Unity2018310\NintendoSDK\Libraries\NX-NXFP2-a64\Develop\nnSdk.nss" -Wl,--end-group C:\Nintendo\Unity2018310\NintendoSDK\Libraries\NX-NXFP2-a64\Develop\crtend.o -o "C:\Data\project\2018310f2\ALST_PRJ\SwitchIL2CPPCache\il2cpp_cache\linkresult_8532D3CCBA1F2DBE5C47D35D82842FA1\SwitchPlayer.nss"
Rynda clang version 1.7.5 (based on LLVM 7.0.1)
Target: aarch64-nintendo-nx-elf
Thread model: posix
InstalledDir: C:\Nintendo\Unity2018310\NintendoSDK\Compilers\NX\nx\aarch64\bin
C:\Nintendo\Unity2018310\NintendoSDK\Compilers\NX\nx\aarch64\bin\aarch64-nintendo-nx-elf-ld.gold.exe "@C:\Users\a300_0\AppData\Local\Temp\response-3d36bf.txt"
Arguments passed via response file:
-z "relro" "-X" "--hash-style=both" "--build-id=uuid" "--eh-frame-hdr" "-m" "aarch64elf" "-dynamic-linker" "/lib/ld-nx-aarch64.so.1" "-o" "C:\Data\project\2018310f2\ALST_PRJ\SwitchIL2CPPCache\il2cpp_cache\linkresult_8532D3CCBA1F2DBE5C47D35D82842FA1\SwitchPlayer.nss" "-LC:\Nintendo\Unity2018310\NintendoSDK\Compilers\NX\nx\aarch64/lib" "--gc-sections" "-init=_init" "-fini=_fini" "-z" "combreloc" "-z" "relro" "--enable-new-dtags" "-pie" "--build-id=uuid" "-u" "malloc" "-u" "calloc" "-u" "realloc" "-u" "aligned_alloc" "-u" "free" "-T" "C:\Nintendo\Unity2018310\NintendoSDK\Resources\SpecFiles\Application.aarch64.lp64.ldscript" "--export-dynamic" "--start-group" "C:\Nintendo\Unity2018310\NintendoSDK\Libraries\NX-NXFP2-a64\Develop\rocrt.o" "C:\Nintendo\Unity2018310\NintendoSDK\Libraries\NX-NXFP2-a64\Develop\nnApplication.o" "C:/Data/project/2018310f2/ALST_PRJ/SwitchIL2CPPCache/il2cpp_cache/780FD0AEF4703C5B6512B0E1434B66D3.o"
・・・
(省略)
・・・
"C:/Data/project/2018310f2/ALST_PRJ/SwitchI<message truncated>
C:\Program Files\Unity\Hub\Editor\2018.3.10f1\Editor\Data\il2cpp/build/il2cpp.exe did not run properly!
at UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) [0x0011f] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\BuildUtils.cs:130
at UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action1[T] setupStartInfo) [0x00063] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\BuildUtils.cs:73 at UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List
1[T] arguments, System.Action1[T] setupStartInfo, System.String workingDirectory) [0x0008b] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\IL2CPPUtils.cs:368 at UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (System.String inputDirectory, System.String outputDirectory, System.String workingDirectory, System.Boolean platformSupportsManagedDebugging) [0x00272] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\IL2CPPUtils.cs:349 at UnityEditorInternal.IL2CPPBuilder.Run () [0x000ba] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\IL2CPPUtils.cs:211 at UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action
1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) [0x0001d] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\IL2CPPUtils.cs:42
at UnityEditor.Switch.PostProcessSwitch.PostProcess (UnityEditor.BuildTarget target, UnityEditor.BuildOptions options, System.String installPath, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String stagingAreaDataManaged, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) [0x003ac] in C:\buildslave\unity\build\PlatformDependent\Switch\Editor\Managed\PostProcessSwitch.cs:200
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
試したこと
現環境にて新規プロジェクトに物体を生成しCSスクリプトをアタッチした上でビルド → 成功
エラーログに記載されたdllを空のプロジェクトで利用してビルド → 成功
プロジェクト内のキャッシュを消去してビルド → 失敗
最新のUnity環境に変換してビルド → 失敗
別のPCに必要ツールの新規インストールを実施した上でビルド → 失敗
Unityの最新版プロジェクトデータに更新をした上でビルド → 失敗
補足情報(FW/ツールのバージョンなど)
NDI 2.5.3.0
NXAddon 7.3.2 (以下のUnityVerに対応した環境)
Unity 2018.3.10f1
Visual Studio Comunity 2017
あなたの回答
tips
プレビュー