Hi,
I have cloned the Unreal Engine repository on the release branch.
The problem I am having is that after doing Setup.sh and GenerateProjectFiles.sh, doing
make SlateViewer
returns compilation warnings as errors because the code is not keeping the return value of C functions like fscan and other elemental ones, as shown below. I am on Arch linux with updated packages. I edited those lines of code to store the return values, but later on I got more compilation errors for other parts, i believe that is not the path since its a release branch it should compile as it is. Should I disable warning errors? Any help is welcome. I have not even tried compiling the Editor since this is already not working.
UnrealEngine git:(release) ✗ make SlateViewer
bash "/home/cristobal/gamedev/UnrealEngine"/Engine/Build/BatchFiles/Linux/Build.sh SlateViewer Linux Development
Building SlateViewer...
Using clang version '3.7.0' (string), 3 (major), 7 (minor), 0 (patch)
Performing full C++ include scan (building a new target)
Creating makefile for SlateViewer (no existing makefile)
Building UnrealHeaderTool...
Using clang version '3.7.0' (string), 3 (major), 7 (minor), 0 (patch)
Creating makefile for UnrealHeaderTool (no existing makefile)
Performing full C++ include scan (no include cache file)
Performing 21 actions (5 in parallel)
[4/21] Compile Module.CoreUObject.4_of_4.cpp
[5/21] Compile Module.CoreUObject.3_of_4.cpp
[3/21] Compile Module.Projects.cpp
[2/21] Compile Module.Json.cpp
[1/21] Compile CorePrivatePCH.h
[6/21] Compile Module.Core.4_of_6.cpp
[7/21] Compile Module.Core.3_of_6.cpp
[8/21] Compile Module.Core.2_of_6.cpp
In file included from /home/cristobal/gamedev/UnrealEngine/Engine/Intermediate/Build/Linux/x86_64-unknown-linux-gnu/UnrealHeaderTool/Development/Core/Module.Core.2_of_6.cpp:39:
/home/cristobal/gamedev/UnrealEngine/Engine/Source/Runtime/Core/Private/Linux/LinuxPlatformMisc.cpp:130:3: error: ignoring return value of function declared with warn_unused_result attribute [-Werror,-Wunused-result]
fscanf(SysFsFile, "%d", &SystemLineSize);
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/cristobal/gamedev/UnrealEngine/Engine/Intermediate/Build/Linux/x86_64-unknown-linux-gnu/UnrealHeaderTool/Development/Core/Module.Core.2_of_6.cpp:41:
/home/cristobal/gamedev/UnrealEngine/Engine/Source/Runtime/Core/Private/Linux/LinuxPlatformProcess.cpp:956:2: error: ignoring return value of function declared with warn_unused_result attribute [-Werror,-Wunused-result]
getcwd(CurrentDir, sizeof(CurrentDir));
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/cristobal/gamedev/UnrealEngine/Engine/Source/Runtime/Core/Private/Linux/LinuxPlatformProcess.cpp:1186:2: error: ignoring return value of function declared with warn_unused_result attribute [-Werror,-Wunused-result]
fscanf(FilePtr, "%d %s %c %d", &DummyNumber, Buf, &DummyChar, &ParentPID);
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 errors generated.
[9/21] Compile Module.Core.1_of_6.cpp
[10/21] Compile Module.Core.6_of_6.cpp
[11/21] Compile Module.Core.5_of_6.cpp
[12/21] Compile Module.CoreUObject.2_of_4.cpp
[13/21] Compile Module.CoreUObject.1_of_4.cpp
[14/21] Compile Module.ScriptGeneratorPlugin.cpp
[15/21] Compile Module.UnrealHeaderTool.cpp