Download

Building Editor On Linux

Hello,
I am attempting to compile the unreal editor on linux through the instructions on this page: A new, community-hosted Unreal Engine Wiki - Announcements and Releases - Unreal Engine Forums
Upon running Setup.sh, I get the following errors:



$ ./Setup.sh 
Registering git hooks... (this will override existing ones!)

Github build
Checking / downloading the latest archives
Checking dependencies (excluding Win32, Win64, Mac, HTML5, Android)...
Received 8107/15891 files (723.1/3042.5mb; 2.00mb/s; 23%)...Stacktrace:


Native stacktrace:

	mono() [0x4b73d8]
	mono() [0x50f13b]
	mono() [0x423d22]
	/lib/x86_64-linux-gnu/libpthread.so.0(+0x10340) [0x7f0a5027c340]

Debug info from gdb:

Received 8125/15891 files (724.7/3042.5mb; 2.07mb/s; 23%)...Could not attach to process.  If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf
ptrace: Operation not permitted.
No threads.

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

Build/BatchFiles/Linux/GitDependencies.sh: line 19: 18755 Aborted                 (core dumped) mono Engine/Binaries/DotNET/GitDependencies.exe $ARGS
Result: 134
Checking dependencies (excluding Win32, Win64, Mac, HTML5, Android)...
Received 7766/7766 files (2324.5/2324.5mb; 0.01mb/s; 100%)...
Result: 0
Fixing inconsistent case in filenames.
Content/Editor/Slate/Icons/ExploreLayerContents.png -> ExploreLayerContents.PNG
Content/Editor/Slate/Old/TableView/SplitterGrip.png -> SplitterGrip.PNG
Content/Editor/Slate/Old/Border.png -> Border.PNG
Content/Editor/Slate/Old/AnimEditor/NotifyTrackBackground.png -> NotifyTrackBackground.PNG
Content/Editor/Slate/Old/Graph/NodeShadowSelected.png -> NodeShadowSelected.PNG
Content/Editor/Slate/Old/Graph/NodeBackground.png -> NodeBackground.PNG
Content/Editor/Slate/Old/Graph/Arrow.png -> Arrow.PNG
Content/Editor/Slate/Old/Graph/GraphBackground.png -> GraphBackground.PNG
Content/Editor/Slate/Old/Graph/GraphBackground_Stone.png -> GraphBackground_Stone.PNG
Content/Editor/Slate/Old/Graph/GraphBackground_Slate.png -> GraphBackground_Slate.PNG
Content/Editor/Slate/Old/Graph/map.png -> map.PNG
Content/Editor/Slate/Old/Docking/ContentBorder.png -> ContentBorder.PNG
Content/Editor/Slate/Old/FilledBorder.png -> FilledBorder.PNG
Content/Editor/Slate/Old/DebugBorder.png -> DebugBorder.PNG
Content/Editor/Slate/Old/ComboArrow.png -> ComboArrow.PNG
Content/Editor/Slate/Graph/Pin_disconnected.png -> Pin_disconnected.PNG
Content/Editor/Slate/Graph/Icons/Hammer.png -> Hammer.PNG
Content/Editor/Slate/Graph/Pin_connected.png -> Pin_connected.PNG
Content/Editor/Slate/Graph/GraphPanel_SolidBackground.png -> GraphPanel_SolidBackground.PNG
Content/Editor/Slate/Graph/MathNode_body.png -> MathNode_body.PNG
Content/Editor/Slate/Common/WorkingBar_Marquee.png -> WorkingBar_Marquee.PNG
Content/Editor/Slate/Common/TextBoxLabelBorder.png -> TextBoxLabelBorder.PNG
Content/Editor/Slate/Common/WorkingFrame_Marquee_Vert.png -> WorkingFrame_Marquee_Vert.PNG
Content/Editor/Slate/Common/SearchGlass.png -> SearchGlass.PNG
Content/Editor/Slate/Common/VerticalPipe.png -> VerticalPipe.PNG
Content/Editor/Slate/Common/X.png -> X.PNG
Content/Editor/Slate/Common/HeaderSplitterGrip.png -> HeaderSplitterGrip.PNG
Content/Editor/Slate/Common/ProgressBar_Marquee.png -> ProgressBar_Marquee.PNG
Content/Editor/Slate/Common/WorkingFrame_Marquee.png -> WorkingFrame_Marquee.PNG
Content/Editor/Slate/Common/Spinbox.png -> Spinbox.PNG
Content/Editor/Slate/Common/RoundedSelection_16x.png -> RoundedSelection_16x.PNG
Content/Slate/Old/Border.png -> Border.PNG
Content/Slate/Common/TextBoxLabelBorder.png -> TextBoxLabelBorder.PNG
Content/Slate/Common/SearchGlass.png -> SearchGlass.PNG
Content/Slate/Common/X.png -> X.PNG
Content/Slate/Common/HeaderSplitterGrip.png -> HeaderSplitterGrip.PNG
Content/Slate/Common/ProgressBar_Marquee.png -> ProgressBar_Marquee.PNG
Content/Slate/Common/Spinbox.png -> Spinbox.PNG
Content/Slate/Common/DebugBorder.png -> DebugBorder.PNG
Content/Slate/Common/RoundedSelection_16x.png -> RoundedSelection_16x.PNG
Documentation/Source/Shared/Icons/Source/Images/ExploreLayerContents.png -> ExploreLayerContents.PNG
Documentation/Source/Shared/Icons/Images/ExploreLayerContents.png -> ExploreLayerContents.PNG

Building ThirdParty libraries

If you don't see SUCCESS message in the end, then building did not finish properly.
In that case, take a look into /home/siddharth/UnrealEngine/Engine/Build/BatchFiles/Linux/BuildThirdParty.log for details.
==> BuildLND
==> BuildHLSLCC
$ 


Here is my BuildThirdParty.log file:



building LinuxNativeDialogs
+ cd Source/ThirdParty/LinuxNativeDialogs/UELinuxNativeDialogs
+ rm -rf build
+ mkdir build
+ cd build
+ cmake ..
-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.26") 
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found
-- checking for module 'freetype2'
--   found freetype2, version 17.1.11
-- Found Freetype: /usr/lib/x86_64-linux-gnu/libfreetype.so (found version "17.1.11") 
-- Found GTK2_GTK: /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so  
-- checking for module 'gtk+-3.0'
--   package 'gtk+-3.0' not found
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so  
-- SDL2 found
-- Qt4 found
SDL2 found SDL2
-- GTK2 found
SDL2 found SDL2
-- Configuring done
-- Generating done
-- Build files have been written to: /home/siddharth/UnrealEngine/Engine/Source/ThirdParty/LinuxNativeDialogs/UELinuxNativeDialogs/build
+ make -j4
Scanning dependencies of target qt4dialog
 16%] Building CXX object CMakeFiles/qt4dialog.dir/src/qtdialog.cpp.o
Linking CXX shared library libqt4dialog.so
 16%] Built target qt4dialog
Scanning dependencies of target qt4test
Scanning dependencies of target qt4sdltest
 50%]  50%] Building CXX object CMakeFiles/qt4sdltest.dir/src/sdl2test.cpp.o
Building CXX object CMakeFiles/qt4test.dir/src/dialogtest.cpp.o
Linking CXX executable qt4test
Linking CXX executable qt4sdltest
 50%] Built target qt4test
 50%] Built target qt4sdltest
Scanning dependencies of target gtk2dialog
 66%] Building C object CMakeFiles/gtk2dialog.dir/src/gtkdialog.c.o
Linking C shared library libgtk2dialog.so
 66%] Built target gtk2dialog
Scanning dependencies of target gtk2test
Scanning dependencies of target gtk2sdltest
[100%] [100%] Building CXX object CMakeFiles/gtk2sdltest.dir/src/sdl2test.cpp.o
Building CXX object CMakeFiles/gtk2test.dir/src/dialogtest.cpp.o
Linking CXX executable gtk2test
[100%] Built target gtk2test
Linking CXX executable gtk2sdltest
[100%] Built target gtk2sdltest
+ local LIB_DIR=../lib/Linux/x86_64-unknown-linux-gnu/
+ '' -f libqt4dialog.so ']'
+ ln -s libqt4dialog.so libLND.so
+ mv libgtk2dialog.so libLND.so libqt4dialog.so ../lib/Linux/x86_64-unknown-linux-gnu//
+ cp -P --remove-destination ../lib/Linux/x86_64-unknown-linux-gnu//libgtk2dialog.so ../lib/Linux/x86_64-unknown-linux-gnu//libLND.so ../lib/Linux/x86_64-unknown-linux-gnu//libqt4dialog.so /home/siddharth/UnrealEngine/Engine/Binaries/Linux/
+ '' -f libqt5dialog.so ']'
+ '' -f libgtk2dialog.so ']'
+ '' -f libgtk3dialog.so ']'
+ set +x
building hlslcc
+ cd Source/ThirdParty/hlslcc
+ P4Open hlslcc/lib/Linux/x86_64-unknown-linux-gnu/libhlslcc.a
+ for file in '$@'
+ '' '!' -e hlslcc/lib/Linux/x86_64-unknown-linux-gnu/libhlslcc.a ']'
+ '' -w hlslcc/lib/Linux/x86_64-unknown-linux-gnu/libhlslcc.a ']'
+ return
+ cd hlslcc/projects/Linux
+ make -j4 clean
rm -f ../../src/hlslcc_lib/ast_expr.o ../../src/hlslcc_lib/ast_function.o ../../src/hlslcc_lib/ast_to_hir.o ../../src/hlslcc_lib/ast_type.o ../../src/hlslcc_lib/builtin_stubs.o ../../src/hlslcc_lib/glcpp-lex.o ../../src/hlslcc_lib/glcpp-parse.o ../../src/hlslcc_lib/glsl_parser_extras.o ../../src/hlslcc_lib/glsl_symbol_table.o ../../src/hlslcc_lib/glsl_types.o ../../src/hlslcc_lib/hash_table.o ../../src/hlslcc_lib/hir_field_selection.o ../../src/hlslcc_lib/hlslcc.o ../../src/hlslcc_lib/hlsl_lexer.o ../../src/hlslcc_lib/hlsl_parser.o ../../src/hlslcc_lib/ir_basic_block.o ../../src/hlslcc_lib/ir_clone.o ../../src/hlslcc_lib/ir_constant_expression.o ../../src/hlslcc_lib/ir.o ../../src/hlslcc_lib/IRDump.o ../../src/hlslcc_lib/ir_expression_flattening.o ../../src/hlslcc_lib/ir_function_can_inline.o ../../src/hlslcc_lib/ir_function.o ../../src/hlslcc_lib/ir_function_detect_recursion.o ../../src/hlslcc_lib/ir_hierarchical_visitor.o ../../src/hlslcc_lib/ir_hv_accept.o ../../src/hlslcc_lib/ir_import_prototypes.o ../../src/hlslcc_lib/ir_print_visitor.o ../../src/hlslcc_lib/ir_rvalue_visitor.o ../../src/hlslcc_lib/ir_track_image_access.o ../../src/hlslcc_lib/ir_unused_structs.o ../../src/hlslcc_lib/ir_validate.o ../../src/hlslcc_lib/ir_variable_refcount.o ../../src/hlslcc_lib/loop_analysis.o ../../src/hlslcc_lib/loop_controls.o ../../src/hlslcc_lib/loop_unroll.o ../../src/hlslcc_lib/lower_clip_distance.o ../../src/hlslcc_lib/lower_discard.o ../../src/hlslcc_lib/lower_if_to_cond_assign.o ../../src/hlslcc_lib/lower_instructions.o ../../src/hlslcc_lib/lower_jumps.o ../../src/hlslcc_lib/lower_mat_op_to_vec.o ../../src/hlslcc_lib/lower_noise.o ../../src/hlslcc_lib/lower_output_reads.o ../../src/hlslcc_lib/lower_texture_projection.o ../../src/hlslcc_lib/lower_variable_index_to_cond_assign.o ../../src/hlslcc_lib/lower_vec_index_to_cond_assign.o ../../src/hlslcc_lib/lower_vec_index_to_swizzle.o ../../src/hlslcc_lib/lower_vector.o ../../src/hlslcc_lib/opt_algebraic.o ../../src/hlslcc_lib/opt_array_splitting.o ../../src/hlslcc_lib/opt_constant_folding.o ../../src/hlslcc_lib/opt_constant_propagation.o ../../src/hlslcc_lib/opt_constant_variable.o ../../src/hlslcc_lib/opt_copy_propagation.o ../../src/hlslcc_lib/opt_copy_propagation_elements.o ../../src/hlslcc_lib/opt_dead_code.o ../../src/hlslcc_lib/opt_dead_code_local.o ../../src/hlslcc_lib/opt_dead_functions.o ../../src/hlslcc_lib/opt_discard_simplification.o ../../src/hlslcc_lib/opt_function_inlining.o ../../src/hlslcc_lib/opt_if_simplification.o ../../src/hlslcc_lib/opt_noop_swizzle.o ../../src/hlslcc_lib/opt_redundant_jumps.o ../../src/hlslcc_lib/opt_structure_splitting.o ../../src/hlslcc_lib/opt_swizzle_swizzle.o ../../src/hlslcc_lib/opt_tree_grafting.o ../../src/hlslcc_lib/OptValueNumbering.o ../../src/hlslcc_lib/PackUniformBuffers.o ../../src/hlslcc_lib/pp.o ../../src/hlslcc_lib/ralloc.o ../../src/hlslcc_lib/ShaderCompilerCommon.o ../../src/hlslcc_lib/strtod.o ../../src/hlslcc_lib/symbol_table.o ../../src/hlslcc_exe/main.o ../../lib/Linux/x86_64-unknown-linux-gnu/libhlslcc.a ../../bin/Linux/hlslcc_64
+ make -j4
clang++ -fPIC -Wno-switch -Wno-unused-value -I../../src/hlslcc_lib -fvisibility=hidden -O2 -std=c++11 -o ../../src/hlslcc_lib/ast_expr.o -c ../../src/hlslcc_lib/ast_expr.cpp
make: clang++: Command not found
make: *** ../../src/hlslcc_lib/ast_expr.o] Error 127


And finally this is the the github repository I cloned for this build:


git clone https://github.com/3dluvr/UnrealEnginebuilding LinuxNativeDialogs

I have tried reinstalling mono, with the same error coming up. Any help with this would be appreciated.

Are you on linux mint? A new, community-hosted Unreal Engine Wiki - Announcements and Releases - Unreal Engine Forums

Also, is your mono version 2 - it needs to be 3.1?

Sometimes the mono executables will crash, it is ok to just restart the process. So try restarting ./Setup.sh or ./GenerateProjectFiles.sh, whichever one crashes.

And as Salamanderrake said, clang-3.5 needs those symlinks made, too. :slight_smile:

I am running on Ubuntu 14.04, and with mono version 3.2.8. I will try it again with just restarting Setup.sh. Thanks for all the help!

Thank you, just rerunning Setup.sh worked!

A new question now. I am going through the tutorial at: Programming Quick Start | Unreal Engine Documentation and at some point it says to “Add Code to Project.” I go through these instructions, then it says Visual studio will pop up with the code. Obviously, running on Ubuntu I don’t have visual studio, so I was wondering how people wrote their code. What IDEs do people use and if possible, how can you link it to the Editor?

Thanks for all the help.

Check this wiki link: A new, community-hosted Unreal Engine Wiki - Announcements and Releases - Unreal Engine Forums

Right now KDevelop and Qt Creator are the two IDEs that work. Choose the one you prefer and follow the instructions to get the plugins added to the Editor.

In following those instructions for adding Qt Creator, I get the error shown in the attached file. Removing the two lines from the file “LinuxEngine.ini” file results in the same error popping up. Any ideas why the error would continue to show after those lines are removed?

LinuxEngine.ini already had a line added for KDevelop, and a corresponding file in the Developers directory in the Plugins directory. Why wouldn’t it have used KDevelop to open the file?

51ba2caf43aa158f8cc393636c844bc18f7f2952.png

You still need to recompile the Editor (make UE4Editor), so it creates the Qt plugin module.

Did you have KDevelop installed when you tried to open the file?

KDevelop works with CMakeLists.txt while Qt works with .pro files.