• Runtimes
  • Problem compiling runtime 3.7-beta-cpp for UE4-19

Hi, I'm trying to compile runtime 3.7-beta-cpp and the process fails, this is the output log:

1>

---

 Build started: Project: UE4, Configuration: BuiltWithUnrealBuildTool Win32 

---


2>

---

 Build started: Project: prot02, Configuration: Development_Editor x64 

---


2>Creating makefile for spineTestEditor (no existing makefile)
2>Performing full C++ include scan (no include cache file)
2>Parsing headers for spineTestEditor
2>  Running UnrealHeaderTool "D:\proyectos\nachosAdventures\unreal\prot02\prot02.uproject" "D:\proyectos\nachosAdventures\unreal\prot02\Intermediate\Build\Win64\spineTestEditor\Development\spineTestEditor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
2>Reflection code generated for spineTestEditor in 24.0686909 seconds
2>Performing 20 actions (4 in parallel)
2>[2/20] Resource ModuleVersionResource.rc.inl
2>[4/20] Resource PCLaunch.rc
2>SharedPCH.UnrealEd.cpp
2>SharedPCH.Engine.cpp
2>[5/20] Resource PCLaunch.rc
2>[6/20] Resource PCLaunch.rc
2>Module.SpinePlugin.gen.cpp
2>Module.SpinePlugin.cpp
2>spineTestGameModeBase.gen.cpp
2>spineTest.init.gen.cpp
2>spineTestGameModeBase.cpp
2>spineTest.cpp
2>Module.SpineEditorPlugin.gen.cpp
2>Module.SpineEditorPlugin.cpp
2>D:\proyectos\nachosAdventures\unreal\prot02\Plugins\SpinePlugin\Source\SpinePlugin\Public\spine-cpp\src\spine\Animation.cpp(32): fatal error C1083: Cannot open include file: 'SpinePluginPrivatePCH.h': No such file or directory
2>[15/20] Link UE4Editor-spineTest.dll
2>   Creating library D:\proyectos\nachosAdventures\unreal\prot02\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-spineTest.suppressed.lib and object D:\proyectos\nachosAdventures\unreal\prot02\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-spineTest.suppressed.exp
2>[16/20] Link UE4Editor-spineTest.lib
2>   Creating library D:\proyectos\nachosAdventures\unreal\prot02\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-spineTest.lib and object D:\proyectos\nachosAdventures\unreal\prot02\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-spineTest.exp
2>[17/20] Link UE4Editor-SpineEditorPlugin.lib
2>   Creating library D:\proyectos\nachosAdventures\unreal\prot02\Plugins\SpinePlugin\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-SpineEditorPlugin.lib and object D:\proyectos\nachosAdventures\unreal\prot02\Plugins\SpinePlugin\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-SpineEditorPlugin.exp
2>UnrealBuildTool : error : UBT ERROR: Failed to produce item: D:\proyectos\nachosAdventures\unreal\prot02\Plugins\SpinePlugin\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-SpinePlugin.lib
2>Total build time: 833.64 seconds (Local executor: 0.00 seconds)
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets(44,5): error MSB3075: The command ""C:\Program Files\Epic Games\UE_4.19\Engine\Build\BatchFiles\Build.bat" spineTestEditor Win64 Development "D:\proyectos\nachosAdventures\unreal\prot02\prot02.uproject" -WaitMutex -FromMsBuild" exited with code 5. Please verify that you have sufficient rights to run this command.
2>Done building project "prot02.vcxproj" 

---

 FAILED.
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I'm using 4.19 with VS Community 2017, just fetched the files earlier today with Github Desktop 1.4.1.

I've compiled this same project before with the same configuration.

Thank you.

Related Discussions
...

We made some changes to the build.cs files for the plugin. You need to do as it says in the build.cs file here:

spine-runtimes/SpinePlugin.Build.cs at 3.7-beta-cpp

Sorry for the trouble. Sadly, there's no clean way to keep that build working in both 4.20 and versions below without manual intervention.

It's ok, I don't mind doing that kind of things. If it's going to be a (semi)permanent solution it would be nice to have that info in the official guide for reference.

Though I tried and still have problems, the main one seems to be this one:

1>D:\proyectos\nachosAdventures\unreal\prot02\Plugins\SpinePlugin\Source\SpinePlugin\Public\spine-cpp\src\spine\Animation.cpp(32): fatal error C1083: Cannot open include file: 'SpinePluginPrivatePCH.h': No such file or directory

It's not finding that header even when the file is in "Plugins\SpinePlugin\Source\SpinePlugin\Private"

I don't know what I'm doing wrong, I've followed carefully the instructions on the guide as I've done before.

Could you show me all your build.cs files? Seems like the include paths aren't setup correctly. Please also try running our example project from Git.

Sure, The only modification I've made to the cs file is the one to allow it to run it for 4.19 (uncomment the line 23 and comment line 19 on SpinePlugin.Build.cs)

SpineEditorPlugin.Build.cs:

using System;
using System.IO;

namespace UnrealBuildTool.Rules
{
   public class SpineEditorPlugin : ModuleRules
   {
      public SpineEditorPlugin(ReadOnlyTargetRules Target) : base(Target)
      {
            PublicIncludePaths.Add(Path.Combine(ModuleDirectory, "Public"));
         PublicIncludePaths.Add(Path.Combine(ModuleDirectory, "../SpinePlugin/Public/spine-cpp/include"));

     PrivateIncludePaths.Add(Path.Combine(ModuleDirectory, "Public"));
     PrivateIncludePaths.Add(Path.Combine(ModuleDirectory, "../SpinePlugin/Public/spine-cpp/include"));

        PublicDependencyModuleNames.AddRange(new string[] {
            "Core",
            "CoreUObject",
            "Engine",
            "UnrealEd",
            "SpinePlugin"
        });

        PublicIncludePathModuleNames.AddRange(new string[] {
           "AssetTools",
           "AssetRegistry"
        });

        DynamicallyLoadedModuleNames.AddRange(new string[] {
           "AssetTools",
           "AssetRegistry"
        });
  }
   }
}

SpinePlugin.Build.cs:

using System;
using System.IO;

namespace UnrealBuildTool.Rules
{
   public class SpinePlugin : ModuleRules
   {
      public SpinePlugin(ReadOnlyTargetRules Target) : base(Target)
      {
         PublicIncludePaths.Add(Path.Combine(ModuleDirectory, "Public"));
         PublicIncludePaths.Add(Path.Combine(ModuleDirectory, "Public/spine-cpp/include"));

     PrivateIncludePaths.Add(Path.Combine(ModuleDirectory, "Public"));
     PrivateIncludePaths.Add(Path.Combine(ModuleDirectory, "Public/spine-cpp/include"));

        PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "RHI", "RenderCore", "ShaderCore", "ProceduralMeshComponent", "UMG", "Slate", "SlateCore" });
     //PublicDefinitions.Add("SPINE_UE4");

     // For UE 4.19 and below comment the line above and uncomment the line
     // below.
     Definitions.Add("SPINE_UE4");
  }
   }
}

I tried to run the samples but it asked me to compile from source and when I tried to do that I received the same error.

The path the cs file is adding is "../SpinePlugin/Public/spine-cpp/include" (the problem seems to be in spineEditorPlugin), and the header in question is in "\SpinePlugin\Source\SpineEditorPlugin\Private".


There seems to be a typo on both SpineEditorPlugin.Build.cs and SpinePlugin.Build.cs.

I changed the line

PrivateIncludePaths.Add(Path.Combine(ModuleDirectory, "Public"));

for

PrivateIncludePaths.Add(Path.Combine(ModuleDirectory, "Private"));

on both files and it worked.

Happy to help! 🙂 :yes: