Best way to resolve missing Protobuf tools?

I’m trying to update my 5.0 checkout/build, and running into setup trouble with a missing Protobuf generation tool.

D:\UE5>git pull -r
Created autostash: 2583766894f7
Current branch 5.0 is up to date.
Applied autostash.

D:\UE5>Setup.bat
Checking dependencies...
Registering git hooks...
Installing prerequisites...

D:\UE5>GenerateProjectFiles.bat
Setting up Unreal Engine 5 project files...
Using bundled DotNet SDK
Building UnrealBuildTool...
Log file: D:\UE5\Engine\Programs\UnrealBuildTool\Log_GPF.txt

Some Platforms were skipped due to invalid SDK setup: Mac, IOS, Android, Linux, LinuxArm64, TVOS.
See the log file for detailed information

Binding IntelliSense data...
WARNING: Exception while generating include data for UnrealEditor: Unable to instantiate module 'Protobuf': System.IO.FileNotFoundException: ThirdParty\vcpkg\Win64\x64-windows-static-md-v141\protobuf_x64-windows-static-md-v141\lib\libprotobuf.lib
            at UnrealBuildTool.ModuleRules.AddVcPackage(String PackageName, Boolean AddInclude, String[] Libraries) in D:\UE5\Engine\Source\Programs\UnrealBuildTool\Configuration\ModuleRules.cs:line 1453
            at Protobuf..ctor(ReadOnlyTargetRules Target) in D:\UE5\Engine\Source\ThirdParty\Protobuf\Protobuf.Build.cs:line 23
         (referenced via allmodules option -> MLDeformer.Build.cs -> NeuralNetworkInference.Build.cs -> ONNXRuntime.Build.cs)
Binding IntelliSense data... 100%
Writing project files... 100%

D:\UE5>git show-ref 5.0
8cb79475aa7cf70d2740b6029ac2f64102e9a36f refs/heads/5.0
8cb79475aa7cf70d2740b6029ac2f64102e9a36f refs/remotes/origin/5.0

D:\UE5>

Interestingly, the v142 version of the library does exist in the checkout – but something is referencing version 141 instead.

What process is supposed to pull in this other version of the protobuf library?

(When posting this question, I got an error about including a version tag in the post, even though 5-0 was tagged, so I also added 4-27 even though this is about 5.0)

The mystery thickens.
I removed the vcpkg/Win64/ directories (where both version v141 and v142 directories existed) and did a “git restore” which restored v142 but not v141 directories.
However, when I then run “setup.bat” again, it does something to recreate the v141 directory too. But doesn’t put a libprotobuf.lib into it.

OK, even worse. It seems like this comes from vcpkg. Vcpkg is a forward-only tool. I can’t “vcpkg install protobuf-v141:x64-windows” to get an older version. (Although there is brand-new manifest JSON support, which could be used to pin versions, except UE build doesn’t use this.)

Apparently, the protobuf dependency comes from some neural network mesh modification plugin, which I’m pretty sure I can live without, and which might even just be some kind of demo boondoggle?
Then again, maybe the problem is that I’m on a too new version of Visual Studio, too? I’m on 2019, version 16.11.10. I’d like to think that I remember 2019 previously building the UE5 branch fine just fine, but …

Same thing still happens with a clean git checkout
(git restore . git clean -f -X, git clean -f -d)

So I guess Epic have decided that something that forces VS 2017 is now A-OK.
Also, Microsoft has stopped shipping v141 toolset, so that can’t actually be downloaded anymore. In fact, not even 2019 can be downloaded – it’s all 2022 now.
This may end up being a problem, long term. Just sayin’.

2 Likes