Skip to content
This repository has been archived by the owner on Jun 22, 2021. It is now read-only.

Using libuv as low level transport for open source Unity networking framework (Mirror), DLL can't be loaded because missing dependencies #174

Open
miwarnec opened this issue Oct 3, 2020 · 1 comment

Comments

@miwarnec
Copy link

miwarnec commented Oct 3, 2020

Hey guys,
first of, thanks for your great work with libuv. We've been trying to make our own low level transport for years, and libuv outperforms it in every way (stability, performance, everything).

We are trying to deploy libuv.dll with a Unity project, but most users are missing some dependencies which is why the DLL can't be loaded. My question is, is there any way to ship libuv in a way that the end user doesn't need to install any additional dependencies? We can't expect players to manually install vs build tools, etc.

I build libuv in a Windows 10 x64 virtual machine with the following commands:

mkdir -p build
(cd build && cmake .. -DBUILD_TESTING=ON)
cd ../
cmake --build build

I then copy the uv.dll file to Unity and do native calls.

This works fine on my machine where I previously installed visual c++ build tools.
It does not work on fresh Windows 10 installs. Unity fails to load the DLL. I don't see which exact dependency is missing, but it is missing one. If we install build tools etc., then it loads fine.

To summarize, how can we deploy libuv with all dependencies?

Additionally, the uv.dll build is flagged as virus by some user's antivirus (I believe Kaspersky). Did you guys deal with this before? Is there perhaps a way to provide official libuv builds so at least users know where the DLLs come from?

Thanks in advance!

@miwarnec
Copy link
Author

miwarnec commented Oct 3, 2020

Hey guys, we did some more research.

we are missing vcruntime140d.dll and ucrtbased.dll.

vcruntime140.dll is present by default.
vcruntime140d.dll is the debug version, which is not present.

ucrtbase.dll is present by default.
ucrtbased.dll is the debug version, which is not present.

looks like we need to build libuv as release :)

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

No branches or pull requests

1 participant