Non-portable path to file:when building project for linux

What i have:

  • Windows PC
  • UE 4.19 compiled from sources
  • Our Project whitch we want to build (Windows Clinet and Linux Dedicated Server)
  • Toolchain: v11 clang 5.0.0-based - for UE4 4.19

Windows clinet builds successfully. But Linux Dedicated Server not:

c:\jenkins\workspace\STARFALL_Server_And_Client>"c:\jenkins\UnrealEngine-4.19\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -nocompileeditor -nop4 -project="c:\jenkins\workspace\STARFALL_Server_And_Client\Starfall.uproject" -cook -stage -serverconfig=Development -clientconfig=Development -pak -prereqs -nodebuginfo -serverplatform=Linux -server -noclient -build -utf8output 
Running AutomationTool...
Parsing command line: BuildCookRun -nocompileeditor -nop4 -project=c:\jenkins\workspace\STARFALL_Server_And_Client\Starfall.uproject -cook -stage -serverconfig=Development -clientconfig=Development -pak -prereqs -nodebuginfo -serverplatform=Linux -server -noclient -build -utf8output -compile
Compiling scripts.
    DotNETUtilities -> c:\jenkins\UnrealEngine-4.19\Engine\Binaries\DotNET\DotNETUtilities.dll
    UnrealBuildTool -> c:\jenkins\UnrealEngine-4.19\Engine\Binaries\DotNET\UnrealBuildTool.exe
    AutomationUtils.Automation -> c:\jenkins\UnrealEngine-4.19\Engine\Binaries\DotNET\AutomationUtils.Automation.dll
    AllDesktop.Automation -> c:\jenkins\UnrealEngine-4.19\Engine\Binaries\DotNET\AutomationScripts\AllDesktop\AllDesktop.Automation.dll
    Localization.Automation -> c:\jenkins\UnrealEngine-4.19\Engine\Binaries\DotNET\AutomationScripts\Localization.Automation.dll
    OneSkyLocalization.Automation -> c:\jenkins\UnrealEngine-4.19\Engine\Binaries\DotNET\AutomationScripts\OneSkyLocalization.Automation.dll
    AutomationScripts.Automation -> c:\jenkins\UnrealEngine-4.19\Engine\Binaries\DotNET\AutomationScripts\AutomationScripts.Automation.dll
    Android.Automation -> c:\jenkins\UnrealEngine-4.19\Engine\Binaries\DotNET\AutomationScripts\Android\Android.Automation.dll
    BuildGraph.Automation -> c:\jenkins\UnrealEngine-4.19\Engine\Binaries\DotNET\AutomationScripts\BuildGraph.Automation.dll
    HTML5.Automation -> c:\jenkins\UnrealEngine-4.19\Engine\Binaries\DotNET\AutomationScripts\HTML5\HTML5.Automation.dll
    MobileDeviceInterface -> c:\jenkins\UnrealEngine-4.19\Engine\Binaries\DotNET\IOS\MobileDeviceInterface.dll
    IOS.Automation -> c:\jenkins\UnrealEngine-4.19\Engine\Binaries\DotNET\AutomationScripts\IOS\IOS.Automation.dll
    Linux.Automation -> c:\jenkins\UnrealEngine-4.19\Engine\Binaries\DotNET\AutomationScripts\Linux\Linux.Automation.dll
    Mac.Automation -> c:\jenkins\UnrealEngine-4.19\Engine\Binaries\DotNET\AutomationScripts\Mac\Mac.Automation.dll
    TVOS.Automation -> c:\jenkins\UnrealEngine-4.19\Engine\Binaries\DotNET\AutomationScripts\TVOS\TVOS.Automation.dll
    Win.Automation -> c:\jenkins\UnrealEngine-4.19\Engine\Binaries\DotNET\AutomationScripts\Win.Automation.dll
    XLocLocalization.Automation -> c:\jenkins\UnrealEngine-4.19\Engine\Binaries\DotNET\AutomationScripts\XLocLocalization.Automation.dll
Took 3,5709534s to run MSBuild.exe, ExitCode=0
Setting up ProjectParams for c:\jenkins\workspace\STARFALL_Server_And_Client\Starfall.uproject
********** BUILD COMMAND STARTED **********
Running: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\bin\MSBuild.exe c:/jenkins/UnrealEngine-4.19/Engine/Source/Programs/UnrealBuildTool/UnrealBuildTool.csproj /verbosity:minimal /nologo /property:Configuration=Development /property:Platform=AnyCPU
    DotNETUtilities -> c:\jenkins\UnrealEngine-4.19\Engine\Binaries\DotNET\DotNETUtilities.dll
    UnrealBuildTool -> c:\jenkins\UnrealEngine-4.19\Engine\Binaries\DotNET\UnrealBuildTool.exe
Took 0,5465694s to run MSBuild.exe, ExitCode=0
Running: c:\jenkins\UnrealEngine-4.19\Engine\Binaries\DotNET\UnrealBuildTool.exe StarfallServer Linux Development -Project=c:\jenkins\workspace\STARFALL_Server_And_Client\Starfall.uproject  c:\jenkins\workspace\STARFALL_Server_And_Client\Starfall.uproject -NoUBTMakefiles  -remoteini="c:\jenkins\workspace\STARFALL_Server_And_Client" -noxge -generatemanifest -NoHotReload
  Using LINUX_MULTIARCH_ROOT, building with toolchain 'C:\newtoolchain\x86_64-unknown-linux-gnu'
Took 2,3422974s to run UnrealBuildTool.exe, ExitCode=0
Running: c:\jenkins\UnrealEngine-4.19\Engine\Binaries\DotNET\UnrealBuildTool.exe StarfallServer Linux Development -Project=c:\jenkins\workspace\STARFALL_Server_And_Client\Starfall.uproject  c:\jenkins\workspace\STARFALL_Server_And_Client\Starfall.uproject -NoUBTMakefiles  -remoteini="c:\jenkins\workspace\STARFALL_Server_And_Client" -noxge -NoHotReload -ignorejunk
  Using LINUX_MULTIARCH_ROOT, building with toolchain 'C:\newtoolchain\x86_64-unknown-linux-gnu'
  Building UnrealHeaderTool...
  Creating makefile for UnrealHeaderTool (UnrealBuildTool.exe is newer)
  Target is up to date
  Total build time: 1,13 seconds (NoActionsToExecute executor: 0,00 seconds)
  Parsing headers for StarfallServer
    Running UnrealHeaderTool "c:\jenkins\workspace\STARFALL_Server_And_Client\Starfall.uproject" "c:\jenkins\workspace\STARFALL_Server_And_Client\Intermediate\Build\Linux\B4D820EA\StarfallServer\Development\StarfallServer.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors
  Reflection code generated for StarfallServer in 10,6912126 seconds
  ------- Build details --------
  Using clang (C:/newtoolchain/x86_64-unknown-linux-gnu\bin\clang++.exe) version '5.0.0' (string), 5 (major), 0 (minor), 0 (patch)
  Using bundled libc++ standard C++ library.
  Using lld linker
  Using llvm-ar : llvm-ar.exe
  Using old way to relink circularly dependent libraries (with a FixDeps step).
  ------------------------------
  Performing 391 actions (9 in parallel)
  [2/391] Compile PCH.Engine.h
  [6/391] Compile PCH.Core.h
  [4/391] Compile PCH.Starfall.h
  [1/391] Compile SharedPCH.Engine.h
  [5/391] Compile SharedPCH.Core.h
  [3/391] Compile SharedPCH.CoreUObject.h
  [7/391] Compile SharedPCH.Slate.h
  [8/391] Compile PCH.CoreUObject.h
  [9/391] Compile SharedPCH.Slate.NonOptimized.h
  c:/jenkins/workspace/STARFALL_Server_And_Client/Intermediate/Build/Linux/B4D820EA/StarfallServer/Development/Core/PCH.Core.h(48,10):  error: non-portable path to file '"c\\jenkins\UnrealEngine-4.19\Engine\Source\Runtime\Core\Private\CorePrivatePCH.h"'; specified path differs in case from file name on disk [-Werror,-Wnonportable-include-path]
  c:/jenkins/workspace/STARFALL_Server_And_Client/Intermediate/Build/Linux/B4D820EA/StarfallServer/Development/Slate/SharedPCH.Slate.NonOptimized.h(53,10):  error: non-portable path to file '"c\\jenkins\UnrealEngine-4.19\Engine\Source\Runtime\Slate\Public\SlateSharedPCH.h"'; specified path differs in case from file name on disk [-Werror,-Wnonportable-include-path]
  c:/jenkins/workspace/STARFALL_Server_And_Client/Intermediate/Build/Linux/B4D820EA/StarfallServer/Development/Engine/PCH.Engine.h(142,10):  error: non-portable path to file '"c\\jenkins\UnrealEngine-4.19\Engine\Source\Runtime\Engine\Private\EnginePrivatePCH.h"'; specified path differs in case from file name on disk [-Werror,-Wnonportable-include-path]
  #include "c:\jenkins\UnrealEngine-4.19\Engine\Source\Runtime\Slate\Public\SlateSharedPCH.h"
  #include "c:\jenkins\UnrealEngine-4.19\Engine\Source\Runtime\Core\Private\CorePrivatePCH.h"
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           "c\\jenkins\UnrealEngine-4.19\Engine\Source\Runtime\Core\Private\CorePrivatePCH.h"
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           "c\\jenkins\UnrealEngine-4.19\Engine\Source\Runtime\Slate\Public\SlateSharedPCH.h"
  #include "c:\jenkins\UnrealEngine-4.19\Engine\Source\Runtime\Engine\Private\EnginePrivatePCH.h"
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  c:/jenkins/workspace/STARFALL_Server_And_Client/Intermediate/Build/Linux/B4D820EA/StarfallServer/Development/Starfall/PCH.Starfall.h(114,10):  error: non-portable path to file '"c\\jenkins\workspace\STARFALL_Server_And_Client\Source\Starfall\Starfall.h"'; specified path differs in case from file name on disk [-Werror,-Wnonportable-include-path]
           "c\\jenkins\UnrealEngine-4.19\Engine\Source\Runtime\Engine\Private\EnginePrivatePCH.h"
  #include "c:\jenkins\workspace\STARFALL_Server_And_Client\Source\Starfall\Starfall.h"
  c:/jenkins/workspace/STARFALL_Server_And_Client/Intermediate/Build/Linux/B4D820EA/StarfallServer/Development/Core/SharedPCH.Core.h(42,10):  error: non-portable path to file '"c\\jenkins\UnrealEngine-4.19\Engine\Source\Runtime\Core\Public\CoreSharedPCH.h"'; specified path differs in case from file name on disk [-Werror,-Wnonportable-include-path]
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           "c\\jenkins\workspace\STARFALL_Server_And_Client\Source\Starfall\Starfall.h"
  #include "c:\jenkins\UnrealEngine-4.19\Engine\Source\Runtime\Core\Public\CoreSharedPCH.h"
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           "c\\jenkins\UnrealEngine-4.19\Engine\Source\Runtime\Core\Public\CoreSharedPCH.h"
  c:/jenkins/workspace/STARFALL_Server_And_Client/Intermediate/Build/Linux/B4D820EA/StarfallServer/Development/Engine/SharedPCH.Engine.h(90,10):  error: non-portable path to file '"c\\jenkins\UnrealEngine-4.19\Engine\Source\Runtime\Engine\Public\EngineSharedPCH.h"'; specified path differs in case from file name on disk [-Werror,-Wnonportable-include-path]
  #include "c:\jenkins\UnrealEngine-4.19\Engine\Source\Runtime\Engine\Public\EngineSharedPCH.h"
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           "c\\jenkins\UnrealEngine-4.19\Engine\Source\Runtime\Engine\Public\EngineSharedPCH.h"
  1 error generated.
  c:/jenkins/workspace/STARFALL_Server_And_Client/Intermediate/Build/Linux/B4D820EA/StarfallServer/Development/CoreUObject/PCH.CoreUObject.h(48,10):  error: non-portable path to file '"c\\jenkins\UnrealEngine-4.19\Engine\Source\Runtime\CoreUObject\Private\CoreUObjectPrivatePCH.h"'; specified path differs in case from file name on disk [-Werror,-Wnonportable-include-path]
  #include "c:\jenkins\UnrealEngine-4.19\Engine\Source\Runtime\CoreUObject\Private\CoreUObjectPrivatePCH.h"
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           "c\\jenkins\UnrealEngine-4.19\Engine\Source\Runtime\CoreUObject\Private\CoreUObjectPrivatePCH.h"
  [10/391] Compile Module.OnlineSubsystemUtils.cpp
  1 error generated.
  c:/jenkins/workspace/STARFALL_Server_And_Client/Intermediate/Build/Linux/B4D820EA/StarfallServer/Development/CoreUObject/SharedPCH.CoreUObject.h(41,10):  error: non-portable path to file '"c\\jenkins\UnrealEngine-4.19\Engine\Source\Runtime\CoreUObject\Public\CoreUObjectSharedPCH.h"'; specified path differs in case from file name on disk [-Werror,-Wnonportable-include-path]
  #include "c:\jenkins\UnrealEngine-4.19\Engine\Source\Runtime\CoreUObject\Public\CoreUObjectSharedPCH.h"
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           "c\\jenkins\UnrealEngine-4.19\Engine\Source\Runtime\CoreUObject\Public\CoreUObjectSharedPCH.h"
  [11/391] Compile Module.PhysXVehicles.cpp
  1 error generated.

It worked well on UE.4.18 and Toolchain v9 clang 4.0.0-based

Hello,

We’ve recently made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.

https://forums.unrealengine.com/unreal-engine/announcements-and-releases/1410408-unreal-engine-bug-submission-form

Thanks

Fixing the case in your includes should solve this problem.
Possibly [-Werror,-Wnonportable-include-path] was not set in the v9 toolchain, so you could also try to switch if off again, but adjusting the includes is probably the cleaner soluiton.

The problem is not in my includes but in generated engine includes :frowning:

But thank you for “[-Werror,-Wnonportable-include-path]” i will try it.

Has anyone solved that problem??? I’m having the same exact issue with 4.19 and clang 5. Any ideas?

The only way i found is to disable “-Werror” in engine.
To do this change LinuxToolChain.cs:315

-Result += " -Wall -Werror";
+Result += " -Wall";

Awesome! That did the magic!

Bump.

4.19.2 - the issue is still there. Have to do workaround with modifying LinuxToolChain.cs

I remember reporting it in bug report form, but it looks like never made to the report in issues.unrealengine.com

I reported it too. Seems like it didn’t pass the premoderation.

I guess we keep bumping it, so someone from Epic notice it.

Removing the “-Werror” from the ToolChains arguments seemed kinda too much to us, so we suppressed only this warning by adding

Result += " -Wno-nonportable-include-path";

to the LinuxToolChain.cs somewhere (below " -Wall -Werror") in GetCLArguments_Global. Note that this is only recommended if you cross-compile. When building for linux on linux, you probably want the build to fail and fix the underlying issue.

(using UE4.20 - v11_clang-5.0.0-centos7)

1 Like

Note you’ll also need to recompile UnrealBuildTool after making this change.

1 Like

you might need to recompile the engine. At least this is what I do: download the latest engine, change LinuxToolChain.cs, compile the whole thing.

1 Like