GenerateProjectFiles, Compilation error

Hi, I try to compile UE4 from github on Linux Fedora 20 x86_64. I forked 3dluvr and followed all the instruction from the wiki but I got this error and warnings :
Setting up Unreal Engine 4 project files…

+ xbuild Source/Programs/UnrealBuildTool/UnrealBuildTool_Mono.csproj /verbosity:quiet /nologo /p:TargetFrameworkVersion=v4.0 /p:Configuration=Development
+ xbuild Source/Programs/AutomationTool/AutomationTool_Mono.csproj /verbosity:quiet /nologo /p:TargetFrameworkVersion=v4.0 /p:Configuration=Development
/usr/lib/mono/4.0/Microsoft.Common.targets:  warning : Unable to find framework corresponding to the target framework moniker '.NETFramework,Version=v4.0,Prof might not be the intended behavior.
+ xbuild Source/Programs/AutomationTool/Scripts/AutomationScripts.Automation.csproj /verbosity:quiet /nologo /p:TargetFrameworkVersion=v4.0 /p:Configuration=D
/usr/lib/mono/4.0/Microsoft.Common.targets:  warning : Unable to find framework corresponding to the target framework moniker '.NETFramework,Version=v4.0,Prof might not be the intended behavior.
GUBP.Automation.cs(5937,17): error CS0219: The variable `BranchForEmail' is assigned but its value is never used

I think the warning is related with the Mono profile. (stackoverflow)

Someone have a hint?

[EDIT]

I’m currently searching a solution to get rid off the error. Normaly, it should be a simple warning. But it is taken as an error. I’m looking for a way to change the compiler settings. Maybe the Mono forum or stackoverflow will can help me.

Mono JIT compiler version 2.10.8 (tarball Sat Aug 3 13:17:40 UTC 2013)
Copyright (C) 2002-2011 Novell, Inc, Xamarin, Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: debugger softdebug
LLVM: supported, not enabled.
GC: Included Boehm (with typed GC and Parallel Mark)

Just delete that variable in question. I guess amigo merged from our master and because MS C# compiler has more lax attitude to things like unused variables (warnings like that can be enabled there, but as a code analysis pass, not for normal compilation), C# code got broken for mono.

EDIT: as for warnings, just ignore them.

I don’t think I can delete it. Here is the code : GUBP.Automation.cs

    string GetEMailListForNode(GUBP bp, string NodeToDo, string Causers)
    {        
        var BranchForEmail = "";
        if (P4Enabled)
        {
            BranchForEmail = P4Env.BuildRootP4;
        }
        return HackEmails(Causers, BranchForEmail, NodeToDo);
    }

Anyways, I tried to delete it and I got even more compilation errors(and some related with other part of the code).
I talked of that on the irc channel #UE4Linux and it seems like I’m not alone. They just said it could be a mono version problem. I will deepen my research on fedora’s mono options.
[EDIT]
I also try this :

        string GetEMailListForNode(GUBP bp, string NodeToDo, string Causers)
        {        
            var BranchForEmail = "";
            if (P4Enabled)
            {
                BranchForEmail = P4Env.BuildRootP4;
            }
else 
{
BranchForEmail = "WARN : !P4Enabled. No value for BranchForEmail.";
}
            return HackEmails(Causers, BranchForEmail, NodeToDo);
        }

Still not working. I have read that code(the field) that is never reached could be the cause of the warning, but this var is used in the return. I don’t do C# and I dont get it…

What worked for me was commenting out lines 5937 and 5940. Hope this helps!

            //var BranchForEmail = "";
            if (P4Enabled)
            {
            //    BranchForEmail = P4Env.BuildRootP4;
            }

Ok it worked. I just did not check the right lines… T_T I block commented this part iand its ok now.
But I have compilation errors(in linking I think).
When I do make SlateViewer and the others I got undefined reference.

UnrealEngine/Engine/Source/Runtime/Core/Private/Linux/LinuxApplication.cpp:945: référence indéfinie vers « SDL_CaptureMouse »
UnrealEngine/Engine/Source/Runtime/Core/Private/Linux/LinuxApplication.cpp:940: référence indéfinie vers « SDL_CaptureMouse »
UnrealEngine/Engine/Source/Runtime/Core/Private/Linux/LinuxApplication.cpp:949: référence indéfinie vers « SDL_CaptureMouse »
UnrealEngine/Engine/Source/Runtime/Core/Private/Linux/LinuxApplication.cpp:940: référence indéfinie vers « SDL_CaptureMouse »
UnrealEngine/Engine/Intermediate/Build/Linux/x86_64-unknown-linux-gnu/SlateViewer/Development/Core/Module.Core.2_of_6.cpp.o:/home/francis/GitHub/UnrealEngine/Engine/Source/Runtime/Core/Private/Linux/LinuxApplication.cpp:949: encore plus de références indéfinies suivent vers « SDL_CaptureMouse »
/Engine/Source/Runtime/Core/Private/Linux/LinuxCursor.cpp:168: référence indéfinie vers « SDL_GetGlobalMouseState »

And a missing lib.

clang: error: no such file or directory: '/home/francis/GitHub/UnrealEngine/Engine/Source/ThirdParty/nvTextureTools/nvTextureTools-2.0.8/lib/Linux/x86_64-unknown-linux-gnu/libsquish.a'
clang: error: no such file or directory: '/home/francis/GitHub/UnrealEngine/Engine/Source/ThirdParty/nvTextureTools/nvTextureTools-2.0.8/lib/Linux/x86_64-unknown-linux-gnu/libsquish.a'
clang: error: no such file or directory: '/home/francis/GitHub/UnrealEngine/Engine/Source/ThirdParty/coremod/coremod-4.2.6//lib/Linux/x86_64-unknown-linux-gnu/libcoremodLinux.a'

Make sure you are including SDL headers from SDL bundled with the sources (I am not sure how it may not have happened, but the first errors you mention look like some other SDL header is included).

As for the missing libraries, run BuildThirdParty.sh from Engine/Build/BatchFiles/Linux before the build and make sure it ouputs **** SUCCESS **** line (otherwise look up BuildThirdParty.log and see what has gone wrong).

When running BuildThirdParty.sh it is possible to get a false ** SUCCESS ** currently. I ran into an issue where LND wasn’t being built because I didn’t have libqt4-dev installed, but I was still getting ** SUCCESS ** after it ran.

It seems that libsquish is not build. What are the config files for SDL include???

OK I found out that there is “conflicting declaration” and some other compile error for nvtexturetools.

[francis@localhost src]$ make
[ 12%] Built target nvcore
[ 23%] Built target nvmath
[ 25%] Built target posh
[ 27%] Building CXX object src/nvimage/CMakeFiles/nvimage.dir/ImageIO.cpp.o
In file included from /usr/include/tiffio.h:33:0,
                 from /home/francis/GitHub/UnrealEngine/Engine/Source/ThirdParty/nvTextureTools/nvTextureTools-2.0.8/src/src/nvimage/ImageIO.cpp:31:
/usr/include/tiff.h:77:21: erreur: conflicting declaration ‘typedef long int int64’
 typedef TIFF_INT64_T  int64;
                     ^
In file included from /home/francis/GitHub/UnrealEngine/Engine/Source/ThirdParty/nvTextureTools/nvTextureTools-2.0.8/src/src/nvcore/nvcore.h:160:0,
                 from /home/francis/GitHub/UnrealEngine/Engine/Source/ThirdParty/nvTextureTools/nvTextureTools-2.0.8/src/src/nvcore/Ptr.h:6,
                 from /home/francis/GitHub/UnrealEngine/Engine/Source/ThirdParty/nvTextureTools/nvTextureTools-2.0.8/src/src/nvimage/ImageIO.cpp:3:
/home/francis/GitHub/UnrealEngine/Engine/Source/ThirdParty/nvTextureTools/nvTextureTools-2.0.8/src/src/nvcore/DefsGnucLinux.h:62:26: erreur: ‘int64’ has a previous declaration as ‘typedef long long int int64’
 typedef signed long long    int64;
                          ^
In file included from /usr/include/tiffio.h:33:0,
                 from /home/francis/GitHub/UnrealEngine/Engine/Source/ThirdParty/nvTextureTools/nvTextureTools-2.0.8/src/src/nvimage/ImageIO.cpp:31:
/usr/include/tiff.h:78:23: erreur: conflicting declaration ‘typedef long unsigned int uint64’
 typedef TIFF_UINT64_T uint64;
                       ^
In file included from /home/francis/GitHub/UnrealEngine/Engine/Source/ThirdParty/nvTextureTools/nvTextureTools-2.0.8/src/src/nvcore/nvcore.h:160:0,
                 from /home/francis/GitHub/UnrealEngine/Engine/Source/ThirdParty/nvTextureTools/nvTextureTools-2.0.8/src/src/nvcore/Ptr.h:6,
                 from /home/francis/GitHub/UnrealEngine/Engine/Source/ThirdParty/nvTextureTools/nvTextureTools-2.0.8/src/src/nvimage/ImageIO.cpp:3:
/home/francis/GitHub/UnrealEngine/Engine/Source/ThirdParty/nvTextureTools/nvTextureTools-2.0.8/src/src/nvcore/DefsGnucLinux.h:61:28: erreur: ‘uint64’ has a previous declaration as ‘typedef long long unsigned int uint64’
 typedef unsigned long long  uint64;
                            ^
/home/francis/GitHub/UnrealEngine/Engine/Source/ThirdParty/nvTextureTools/nvTextureTools-2.0.8/src/src/nvimage/ImageIO.cpp: In function ‘nv::FloatImage* nv::ImageIO::loadFloat(const char*)’:
/home/francis/GitHub/UnrealEngine/Engine/Source/ThirdParty/nvTextureTools/nvTextureTools-2.0.8/src/src/nvimage/ImageIO.cpp:138:10: attention : converting ‘false’ to pointer type ‘nv::FloatImage*’ [-Wconversion-null]
   return false;
          ^
/home/francis/GitHub/UnrealEngine/Engine/Source/ThirdParty/nvTextureTools/nvTextureTools-2.0.8/src/src/nvimage/ImageIO.cpp: In function ‘nv::Image* nv::ImageIO::loadTGA(nv::Stream&)’:
/home/francis/GitHub/UnrealEngine/Engine/Source/ThirdParty/nvTextureTools/nvTextureTools-2.0.8/src/src/nvimage/ImageIO.cpp:236:12: attention : converting ‘false’ to pointer type ‘nv::Image*’ [-Wconversion-null]
     return false;
            ^
/home/francis/GitHub/UnrealEngine/Engine/Source/ThirdParty/nvTextureTools/nvTextureTools-2.0.8/src/src/nvimage/ImageIO.cpp:257:11: attention : converting ‘false’ to pointer type ‘nv::Image*’ [-Wconversion-null]
    return false;
           ^
/home/francis/GitHub/UnrealEngine/Engine/Source/ThirdParty/nvTextureTools/nvTextureTools-2.0.8/src/src/nvimage/ImageIO.cpp: In function ‘void user_read_data(png_structp, png_bytep, png_size_t)’:
/home/francis/GitHub/UnrealEngine/Engine/Source/ThirdParty/nvTextureTools/nvTextureTools-2.0.8/src/src/nvimage/ImageIO.cpp:606:32: erreur: invalid use of incomplete type ‘png_struct {aka struct png_struct_def}’
  Stream * s = (Stream *)png_ptr->io_ptr;
                                ^
In file included from /home/francis/GitHub/UnrealEngine/Engine/Source/ThirdParty/nvTextureTools/nvTextureTools-2.0.8/src/src/nvimage/ImageIO.cpp:26:0:
/usr/include/png.h:549:16: erreur: forward declaration of ‘png_struct {aka struct png_struct_def}’
 typedef struct png_struct_def png_struct;
                ^
/home/francis/GitHub/UnrealEngine/Engine/Source/ThirdParty/nvTextureTools/nvTextureTools-2.0.8/src/src/nvimage/ImageIO.cpp: In function ‘nv::Image* nv::ImageIO::loadPNG(nv::Stream&)’:
/home/francis/GitHub/UnrealEngine/Engine/Source/ThirdParty/nvTextureTools/nvTextureTools-2.0.8/src/src/nvimage/ImageIO.cpp:624:10: attention : converting ‘false’ to pointer type ‘nv::Image*’ [-Wconversion-null]
   return false;
          ^
/home/francis/GitHub/UnrealEngine/Engine/Source/ThirdParty/nvTextureTools/nvTextureTools-2.0.8/src/src/nvimage/ImageIO.cpp:632:10: attention : converting ‘false’ to pointer type ‘nv::Image*’ [-Wconversion-null]
   return false;
          ^
/home/francis/GitHub/UnrealEngine/Engine/Source/ThirdParty/nvTextureTools/nvTextureTools-2.0.8/src/src/nvimage/ImageIO.cpp:639:10: attention : converting ‘false’ to pointer type ‘nv::Image*’ [-Wconversion-null]
   return false;
          ^
make[3]: *** [src/nvimage/CMakeFiles/nvimage.dir/ImageIO.cpp.o] Erreur 1
make[2]: *** [src/nvimage/CMakeFiles/nvimage.dir/all] Erreur 2
make[1]: *** [all] Erreur 2
make: *** [all] Erreur 2

It look like this issue → link

We apologize that we were not able to resolve this post at the time it was created. We have since improved our systems and workflows to provide better coverage going forward. Many changes have occurred to the Unreal Engine since this post was made, so we are marking this as Resolved for tracking purposes. If you still require assistance with this issue, please let us know. If the issue has changed in any way, we recommend you create a new post.

Thank you.

Problem solved since I updated to UE4 4.5.1.