Announcement

Collapse
No announcement yet.

UE4 Linux Native Compilation using KDevelop not working

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    UE4 Linux Native Compilation using KDevelop not working

    Hello gentlemen,

    I'm trying to compile the engine under Linux (Ubuntu 14.10). So far I've been able to run both the Setup.sh and GenerateProjectFiles.sh scripts successfully: I see the CMakeLists.txt now. Because I keep reading about people having success compiling the code base using KDevelop, I've decided to take the same route and so I've installed KDevelop 4.14 on my system (from the ubuntu repos).

    After importing the project successfully via the CMakeLists file I can see the project directories and a bunch of targets. However, building from the highest level folder or building specific targets doesn't seem to work for me. I do see a '*** Finished ***' message in the build window every time but it literally just takes a couple seconds and I don't see any other output. Clicking on the IDE's Execute button doesn't help either as that just takes me to a 'Launch Configurations' dialog window that leads nowhere.

    I'm new to UE and not very familiar with the KDevelop IDE. That and the lack of information on this step in both the readme and wiki makes me wonder if I'm missing something basic here or I just have bad luck and my Kdevelop is not working properly.

    Any suggestions would be appreciated, thanks!
    Attached Files

    #2
    when using kdevelop , you can import via the cmakelists or the make file, make file is easiest because once you can build manually, it uses the same make file for further builds.
    dont forget, after your initial build you are pretty much just linking, if no file was altered.
    as far as the launch goes you have to set that up, not at all difficult , in the launch configuration, click add new, set your path to the executable: "/home/angelo/projects/game/ue4/UnrealEngine/Engine/Binaries/Linux/UE4Editor",
    set up any command line arguments you may have,
    choose working directory,
    click ok.
    then when you click execute it will perform as expected:
    Click image for larger version

Name:	ued5runningonmylinuxboxfromkdev.png
Views:	1
Size:	386.1 KB
ID:	1067823
    hope this helped.

    Comment


      #3
      KDevelop is my favorite IDE on Linux, so it's nice to see there's an easy way to get it compiling - nice tip angjminer!
      Storyteller - An immersive VR audiobook player

      Dungeon Survival - WIP First person dungeon crawler with a focus on survival and environmental gameplay ala roguelikes

      Comment


        #4
        Hi there

        I've looked at this post many times trying to figure it out, but I don't see an "add new" as mentioned, there are "add" options everywhere...
        Could someone please elaborate (step-by-step)?

        Oh, In case it helps others, I've found that it looks like it's possible to run it under qtcreator (there's a youtube video on that)... gonna try that in the mean time (I'd prefer instructions for codeblocks ...in case Epic is listening!)

        Thanks!

        Comment


          #5
          In what do you mean the 'add new'? as far as KDevelop goes you just import the CMakeLists.txt file. Most any c/c++ ide on linux can import a CMakeLists.txt as auto tools are very common, so qtcreater should work out of the box with that. I myself use a heavily modified code::blocks for native linux ue development. Let me know if you have trouble getting code::blocks to open or import the cmakelists.

          Comment


            #6
            Hey there!

            Thanks for your reply, I'll definitely try code::blocks with your method (although -- you say heavily modified? Want to elaborate?).

            In the mean time, regarding QTCreator, I was able to make it work up until a certain point (see screenshot below). Here is my step-by-step (bear in mind I'm using latest Arch Linux):

            # ---------------------------------------------------------------------------
            # DEPS
            # ---------------------------------------------------------------------------

            sudo pacman -Sy git clang35 dos2unix qtcreator cmake mono gdb

            Start UE4 Editor, then create a new C++ project.

            # ---------------------------------------------------------------------------
            # QTCreator - setup
            # ---------------------------------------------------------------------------

            Then, inside QTCreator:

            Go to
            Projects - Build Steps - click DETAILS
            - Make arguments:
            TestEditor

            Projects - Clean Steps - click DETAILS
            - Make Arguments:
            TestEditor ARGS=" -clean"

            Select RUN (PROJECTS/RUN)
            - Run configuration (Executable -> browse until binaries/linux, choose UE4Editor) or write directly the path:
            /hd/home/UE4/UnrealEngine/Engine/Binaries/Linux/UE4Editor <------- of course, your path will vary, mine is /hd/home/UE4

            Put .uproject name to run
            - Arguments: "/hd/home/UE4.......myproject.uproject" -opengl4 <------------- or, wherever your project resides.

            Working directory:
            - Put : /hd/home/UE4/UnrealEngine/Engine/Binaries/Linux

            Click "RUN IN TERMINAL".

            Then
            ADD BUILD ENVIRONNEMENT VARIABLE

            New/Modify Variable: LD_LIBRARY_PATH -> ":.:"

            Then:

            Go to Tools > Options, select Build & Run from left side panel, click Kits tab, click on Desktop (default), with an exclamation mark near it, click Auto-detect.
            Finally: Select Debug - Start Debugging - Start Debugging

            (If it says GDB not found -- as was my case, then, you need to ensure gdb is installed -- basically gdb must be found in the $PATH of your *running* session -- then, redo these last steps and select GDB -- do not create an entry manually -- doesn't seem to work.)

            # ---------------------------------------------------------------------------
            # Compiling
            # ---------------------------------------------------------------------------

            So, All was well up to this point, it compiles and finds the gdb debugger.... but then I get this:

            Click image for larger version

Name:	UE4-qtcreator-status.png
Views:	1
Size:	62.9 KB
ID:	1080003

            Using binned.
            Increasing per-process limit of core file size to infinity.

            (and when I click OK on the message)

            Exiting abnormally (error code: 1)
            Press <RETURN> to close this window...

            Is there a font issue, or some other error? (Message popup seems empty...)

            So, that's basically where I am at right now.... if anyone has an idea what to do next...

            Thanks!

            Comment


              #7
              I should have used "Heavily customized," as code::blocks is meant to be extremely modular and I just meant plugins here, toolchain there, I like to tinker. I use fedora at the moment, (though I've been thinking of going back to arch), but arch is extremely minimalist. Everything is done from scratch, as you know, that's what it's not officially supported. UnrealEngine is built to be as sophisticated as possible while using fewer higher quality libraries to do so. It does indeed look to me that it is a library issue with your gui or library conflict, but I can't say for sure without knowing how you setup your arch. I'm also not as familiar with qt as I am with KDevelop or C::B, but I'll try it out on my box in the meantime to see what comes out with qt. Make sure you followed everything on this page:

              https://wiki.unrealengine.com/Building_On_Linux

              I'll try building with arch - kde - qtcreator tomorrow and I'll get back to you.

              P.S. It's not out of the way for me because my current project is on iOS, so I was planning to switch to arch or gentoo anyway while I develop on my macbook.
              Last edited by BleuGamer; 06-17-2015, 11:21 PM. Reason: P.S.

              Comment


                #8
                Cool!

                I actually like the freedom and minimalism of ArchBang + MATE + compiz (or openbox+cairo-dock+compiz). ATM, I'm not sure the distro has that much an impact on the result I'm seeing, but I may be wrong. Though, if I run /hd/home/UE4/UnrealEngine/Engine/Binaries/Linux/UE4Editor-Linux-Debug directly after compilation, it starts. It's 4.7; I'll try 4.8 soon.

                /hd/home/UE4/UnrealEngine/Engine/Binaries/Linux $ ./UE4Editor-Linux-Debug

                Using binned.
                Increasing per-process limit of core file size to infinity.

                LogInit: Display: Running engine without a game
                LogInit: Version: 4.7.2-0+++depot+UE4-Releases+4.7
                LogInit: API Version: 0
                LogInit: Compiled (64-bit): Jun 10 2015 11:09:22
                LogInit: Compiled with Clang: 3.5.2 (tags/RELEASE_352/final)
                LogInit: Build Configuration: Debug
                LogInit: Branch Name: ++depot+UE4-Releases+4.7
                LogInit: Command line:
                LogInit: Base directory: /hd/home/UE4/UnrealEngine/Engine/Binaries/Linux/
                LogInit: Rocket: 0
                [2015.06.18-17.38.28:512][ 0]LogTaskGraph: Started task graph with 3 named threads and 6 total threads.
                [2015.06.18-17.38.28:528][ 0]LogOnline:Warning: No default platform service specified for OnlineSubsystem
                [2015.06.18-17.38.28:709][ 0]LogInit: Presizing for 0 objects not considered by GC, pre-allocating 0 bytes.
                [2015.06.18-17.38.28:747][ 0]LogInit: Object subsystem initialized
                [2015.06.18-17.38.28:760][ 0]LogInit: Initializing SDL.
                [2015.06.18-17.38.29:077][ 0]LogInit: Display metrics:
                [2015.06.18-17.38.29:077][ 0]LogInit: PrimaryDisplayWidth: 1920
                [2015.06.18-17.38.29:077][ 0]LogInit: PrimaryDisplayHeight: 1080
                [2015.06.18-17.38.29:077][ 0]LogInit: PrimaryDisplayWorkAreaRect:
                [2015.06.18-17.38.29:077][ 0]LogInit: Left=0, Top=0, Right=1920, Bottom=1080
                [2015.06.18-17.38.29:077][ 0]LogInit: VirtualDisplayRect:
                [2015.06.18-17.38.29:077][ 0]LogInit: Left=0, Top=0, Right=1920, Bottom=1080
                [2015.06.18-17.38.29:077][ 0]LogInit: TitleSafePaddingSize: X=0.000 Y=0.000
                [2015.06.18-17.38.29:077][ 0]LogInit: ActionSafePaddingSize: X=0.000 Y=0.000
                [2015.06.18-17.38.29:078][ 0]LogInit: Number of monitors: 1
                [2015.06.18-17.38.29:078][ 0]LogInit: Monitor 0
                [2015.06.18-17.38.29:078][ 0]LogInit: Name: S27B370 27"
                [2015.06.18-17.38.29:078][ 0]LogInit: ID: display0
                [2015.06.18-17.38.29:078][ 0]LogInit: NativeWidth: 1920
                [2015.06.18-17.38.29:078][ 0]LogInit: NativeHeight: 1080
                [2015.06.18-17.38.29:078][ 0]LogInit: bIsPrimary: true
                [2015.06.18-17.38.29:080][ 0]LogInit: Selected Device Profile: [Linux]


                ... then the GUI starts and all is well. Just doesn't work from QTCreator "Start Debugging" option, as I mentioned previously.

                In the meantime, I tried setting up C::B (latest 13.12) yesterday, but I couldn't build anything (after opening CMakeLists or Makefile directly, nothing compiles (it complains it doesn't know what application should open the file -- from within C::B);.... maybe I'm missing something... if you have a step-by-step, it'd be great -- and I guess it could help many other people stumbling on this in the future. I'm used to starting with a blank project in C::B, so not entirely sure how to integrate with UE4... yet.

                If I may ask, which plugins did you use and how did you set up C::B precisely?

                Cheers

                Comment


                  #9
                  Just got my arch up and running, I will link a blog post with that stuff for qtc, cb, and KDevelop hopefully by monday, perhaps Tuesday. That way people can see how to get each one working.

                  Comment


                    #10
                    Hi again,

                    ...now it works with KDevelop and UE4 - 4.8

                    Answered here:
                    https://forums.unrealengine.com/arch...p/t-61205.html

                    I had to add a variable so it finds libGL.so

                    (Still I'm intrigued on how to make it work on cb and qtc)

                    Comment


                      #11
                      I have it working with Kdevelop as well as Qtcreator, but I'm having trouble with code::blocks. The arch repository is outdated (January of 2014) while it's being maintained at sourceforge, so I'm going to wait on that. If I get it working I'll make a separate post on how I customized it but until then I'm going to put that on hold. The reason cb is nice is because every part of it is extensible and customizable, but as such you have to be precise in setting it up for such a large project which I currently don't have time to do. I'm glad you have the others working.

                      Comment


                        #12
                        Originally posted by BleuGamer View Post
                        I have it working with Kdevelop as well as Qtcreator, but I'm having trouble with code::blocks. The arch repository is outdated (January of 2014) while it's being maintained at sourceforge, so I'm going to wait on that. If I get it working I'll make a separate post on how I customized it but until then I'm going to put that on hold. The reason cb is nice is because every part of it is extensible and customizable, but as such you have to be precise in setting it up for such a large project which I currently don't have time to do. I'm glad you have the others working.
                        Can you run Qt debugger? I have problems now with it, i try to build but qt doesn't build, can you help me?

                        Comment

                        Working...
                        X