Download

Xcopy Error in DatasmithSDK building engine source in 4.25.1

Hi there,

So we’re using the engine source here, and it built fine on my main workstation, but configuring it for a Jenkins automation box we got a different result with the same code:

10:57:09 Building 4 actions with 24 processes…
10:57:10 [1/4] DatasmithSDK.cpp
10:57:11 [2/4] DatasmithSDK.dll
10:57:11 Creating library D:\Jenkins\workspace\UE4\UE4 Engine\Engine\Binaries\Win64\DatasmithSDK\DatasmithSDK.lib and object D:\Jenkins\workspace\UE4\UE4 Engine\Engine\Binaries\Win64\DatasmithSDK\DatasmithSDK.exp
10:57:11 [3/4] DatasmithSDK.target
10:57:11 [4/4] Executing post build script (PostBuild-1.bat)
10:57:11 Copying D:\Jenkins\workspace\UE4\UE4 Engine\Engine\Source\Programs\Enterprise\Datasmith\DatasmithSDK\Documentation*.* to D:\Jenkins\workspace\UE4\UE4 Engine\Engine\Binaries\Win64\DatasmithSDK\Documentation
10:57:11 ‘xcopy’ is not recognized as an internal or external command,
10:57:11 operable program or batch file.
10:57:11 Copying D:\Jenkins\workspace\UE4\UE4 Engine\Engine\Source\Runtime\Datasmith\DatasmithCore\Public*.h to D:\Jenkins\workspace\UE4\UE4 Engine\Engine\Binaries\Win64\DatasmithSDK\Public
10:57:11 ‘xcopy’ is not recognized as an internal or external command,
10:57:11 operable program or batch file.
10:57:11 Copying D:\Jenkins\workspace\UE4\UE4 Engine\Engine\Source\Developer\Datasmith\DatasmithExporter\Public*.h to D:\Jenkins\workspace\UE4\UE4 Engine\Engine\Binaries\Win64\DatasmithSDK\Public
10:57:11 ‘xcopy’ is not recognized as an internal or external command,
10:57:11 operable program or batch file.
10:57:11 C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command “…\Build\BatchFiles\Build.bat DatasmithSDK Win64 Development -WaitMutex -FromMsBuild” exited with code 6. [D:\Jenkins\workspace\UE4\UE4 Engine\Engine\Intermediate\ProjectFiles\DatasmithSDK.vcxproj] 10:57:11 Done Building Project “D:\Jenkins\workspace\UE4\UE4 Engine\Engine\Intermediate\ProjectFiles\DatasmithSDK.vcxproj” (default targets) – FAILED.

Somehow it’s not finding xcopy. Every console I can open on the machine even without VS Dev environments does have the path set correctly for xcopy, but for some reason this part of the build process is failing.

Any suggestions for how to fix this?

So, there were two fixes I put in to solve this problem. Not sure why they happen on this specific machine, but:

  1. The paths were incorrect. I added a SET PATH=%PATH%;%SystemRoot%\System32
  2. once that was done, we were using a Jenkins workspace with a space in the title. Had to modify the build engine to wrap the params for xcopy in quotes to have them work.