Reputation: 25
I want to build my Unity-AR Apps to run on HoloLens 2. We use gRPC for interprocess communication of the HoloLens device and a desktop PC to pass information. HoloLens 2 has an ARM processor architecture, for which gRPC does not provide a grpc_csharp_ext.dll.
Does anyone already had the same problem and how did you solve it?
*Edit: I use Unity for app development, so I'm limited to .NET Framework & .NET Standard solutions
Upvotes: 2
Views: 1403
Reputation: 2273
This is a merged copy/paste from my comments in the grpc issue tracker here and here
Edit: I published a Unity project with precompiled libraries for x86
, x64
and arm64
on Github.
My workaround for this problem involves compiling a Grpc.Core.dll without the Mono and DllImportsFromStaticLib which is used for WSA builds AND an ARM64 version of the grpc_charp_ext.dll
which isn't part of the official Unity package but necessary for HoloLens 2.
grpc_charp_ext.dll
is not correctly loaded in the HoloLens emulator for these builds. I also tried the most recent version (1.29.1) vcpkg has to offer but unfortunately there is a Protobuf/System.Memory version conflict (#22251) which hasnt been resolved yet, afaik.git checkout 8853754e8caa0b2ffb3ab0e25514f3f7612ebf7a
if you use the build abovegit submodule update --init
grpc_charp_ext
:
python tools/run_tests/run_tests.py -l csharp -c opt --build_only
git clone https://github.com/microsoft/vcpkg.git
git checkout 2020.01
grpc
port to build the correct version. Download 00001-fix-uwp.patch.txt, 00002-static-linking-in-linux.patch.txt and portfile.cmake.txt, remove the .txt
ending and override the files located at ports\grpc
.triplets\community
vcpkg
and build protobuf:x86-windows
and grpc
with the arm64-windows-static
triplet
.\vcpkg.exe install protobuf:x86-windows
.\vcpkg.exe install grpc --triplet arm64-windows-static
buildtrees\grpc\arm64-windows-static-rel\grpc_csharp_ext.dll
into your Plugin folder (Grpc.Core\runtimes\win\arm64
) and set the target for this DLL:
Upvotes: 3