I would like to get my project running on Linux (for end users). What is the “best” way for me to accomplish a Linux build? I work on Mac, mainly, with UE 4.10.4 currently.
I tried getting the Linux cross-compile working on Windows followingthese really crappy instructions and these pretty good instructions, but probably due to my complete unfamiliarity with Visual Studio combined with the guide’s assumptions that you know Visual Studio, I can’t get to the point where I can actually cross-compile my project. In that second guide I got all the way to step #3 under “Verify It Works By Compiling for Linux x86” … and Linux doesn’t show up in the menu. No errors on the previous steps.
I installed Ubuntu 15.04 (based on the info on this page) and cloned the UE repo, checked out the 4.10 branch, followed the linux instructions readme and it all seems to great until the very last step (running the editor), which core dumps with (I think the core error of)
_PlatformCreateOpenGLContextCore - Could not create OpenGL 3.2 context, SDL error: 'Could not create GL context: GLXBadFBConfig'
I’m soo close. But stuck. I just want to support Linux gaming. Help me out here!
Here’s the full Linux crash output:
$ ./UE4Editor
Using jemalloc.
Increasing per-process limit of core file size to infinity.
LogInit:Display: Running engine without a game
LogPlatformFile: Not using cached read wrapper
LogInit:Display: RandInit(1895939878) SRandInit(1895939887).
LogTaskGraph: Started task graph with 4 named threads and 9 total threads.
LogStats: Stats thread started at 0.057273
LogInit: Version: 4.11.0-0+UE4
LogInit: API Version: 0
LogInit: Compiled (64-bit): Feb 27 2016 21:41:06
LogInit: Compiled with Clang: 3.5.2 (tags/RELEASE_352/final)
LogInit: Build Configuration: Development
LogInit: Branch Name: UE4
LogInit: Command line:
LogInit: Base directory: /home//UnrealEngine/Engine/Binaries/Linux/
LogInit: Installed Engine Build: 0
LogInit: Using libcurl 7.46.0
LogInit: - built for x86_64-pc-linux-gnu
LogInit: - supports SSL with OpenSSL/1.0.2d
LogInit: - supports HTTP deflate (compression) using libz 1.2.5
LogInit: - other features:
LogInit: CURL_VERSION_SSL
LogInit: CURL_VERSION_LIBZ
LogInit: CURL_VERSION_IPV6
LogInit: CURL_VERSION_ASYNCHDNS
LogInit: CURL_VERSION_LARGEFILE
LogInit: CURL_VERSION_TLSAUTH_SRP
LogInit: Libcurl: checking if '/etc/pki/tls/certs/ca-bundle.crt' exists
LogInit: Libcurl: checking if '/etc/ssl/certs/ca-certificates.crt' exists
LogInit: CurlRequestOptions (configurable via config and command line):
LogInit: - bVerifyPeer = true - Libcurl will verify peer certificate
LogInit: - bUseHttpProxy = false - Libcurl will NOT use HTTP proxy
LogInit: - bDontReuseConnections = false - Libcurl will reuse connections
LogInit: - CertBundlePath = /etc/ssl/certs/ca-certificates.crt - Libcurl will set CURLOPT_CAINFO to it
LogInit: Presizing for max 16777216 objects, including 0 objects not considered by GC, pre-allocating 0 bytes for permanent pool.
LogInit: Object subsystem initialized
[2016.02.28-19.07.15:601] 0]LogInit: Initializing SDL.
[2016.02.28-19.07.15:916] 0]LogInit: Initialized SDL 2.0.4 (compiled against 2.0.4)
[2016.02.28-19.07.15:917] 0]LogInit: Display metrics:
[2016.02.28-19.07.15:917] 0]LogInit: PrimaryDisplayWidth: 2597
[2016.02.28-19.07.15:917] 0]LogInit: PrimaryDisplayHeight: 1856
[2016.02.28-19.07.15:917] 0]LogInit: PrimaryDisplayWorkAreaRect:
[2016.02.28-19.07.15:917] 0]LogInit: Left=65, Top=24, Right=2597, Bottom=1856
[2016.02.28-19.07.15:917] 0]LogInit: VirtualDisplayRect:
[2016.02.28-19.07.15:917] 0]LogInit: Left=65, Top=24, Right=2597, Bottom=1856
[2016.02.28-19.07.15:917] 0]LogInit: TitleSafePaddingSize: X=0.000 Y=0.000
[2016.02.28-19.07.15:917] 0]LogInit: ActionSafePaddingSize: X=0.000 Y=0.000
[2016.02.28-19.07.15:917] 0]LogInit: Number of monitors: 1
[2016.02.28-19.07.15:917] 0]LogInit: Monitor 0
[2016.02.28-19.07.15:917] 0]LogInit: Name: Virtual1
[2016.02.28-19.07.15:917] 0]LogInit: ID: display0
[2016.02.28-19.07.15:917] 0]LogInit: NativeWidth: 2597
[2016.02.28-19.07.15:917] 0]LogInit: NativeHeight: 1856
[2016.02.28-19.07.15:917] 0]LogInit: bIsPrimary: true
[2016.02.28-19.07.15:918] 0]LogLinux: Selected Device Profile: [Linux]
[2016.02.28-19.07.15:918] 0]LogInit: Applying CVar settings loaded from the selected device profile: [Linux]
[2016.02.28-19.07.15:930] 0]LogInit: Linux hardware info:
[2016.02.28-19.07.15:930] 0]LogInit: - we are the first instance of this executable
[2016.02.28-19.07.15:930] 0]LogInit: - this process' id (pid) is 24246, parent process' id (ppid) is 2134
[2016.02.28-19.07.15:930] 0]LogInit: - we are not running under debugger
[2016.02.28-19.07.15:930] 0]LogInit: - machine network name is 'ubuntu'
[2016.02.28-19.07.15:930] 0]LogInit: - user name is '' ()
[2016.02.28-19.07.15:930] 0]LogInit: - we're logged in locally
[2016.02.28-19.07.15:930] 0]LogInit: - Number of physical cores available for the process: 6
[2016.02.28-19.07.15:930] 0]LogInit: - Number of logical cores available for the process: 6
[2016.02.28-19.07.15:931] 0]LogInit: - Cache line size: 64
[2016.02.28-19.07.15:931] 0]LogInit: - Memory allocator used: jemalloc
[2016.02.28-19.07.15:931] 0]LogLinux: Benchmarking clocks
[2016.02.28-19.07.16:031] 0]LogLinux: - CLOCK_REALTIME (id=0) can sustain 57883886 (57884K, 58M) calls per second without zero deltas
[2016.02.28-19.07.16:131] 0]LogLinux: - CLOCK_MONOTONIC (id=1) can sustain 55155918 (55156K, 55M) calls per second without zero deltas
[2016.02.28-19.07.16:231] 0]LogLinux: - CLOCK_MONOTONIC_RAW (id=4) can sustain 18945520 (18946K, 19M) calls per second without zero deltas
[2016.02.28-19.07.16:334] 0]LogLinux: - CLOCK_MONOTONIC_COARSE (id=6) can sustain 160432873 (160433K, 160M) calls per second with 99.999838% zero deltas
[2016.02.28-19.07.16:334] 0]LogInit: Linux-specific commandline switches:
[2016.02.28-19.07.16:334] 0]LogInit: -nodwarf (currently OFF): suppress parsing of DWARF debug info (callstacks will be generated faster, but won't have line numbers)
[2016.02.28-19.07.16:334] 0]LogInit: -ansimalloc - use malloc()/free() from libc (useful for tools like valgrind and electric fence)
[2016.02.28-19.07.16:334] 0]LogInit: -jemalloc - use jemalloc for all memory allocation
[2016.02.28-19.07.16:334] 0]LogInit: -binnedmalloc - use binned malloc for all memory allocation
[2016.02.28-19.07.16:334] 0]LogInit: -httpproxy=ADDRESS:PORT - redirects HTTP requests to a proxy (only supported if compiled with libcurl)
[2016.02.28-19.07.16:334] 0]LogInit: -reuseconn - allow libcurl to reuse HTTP connections (only matters if compiled with libcurl)
[2016.02.28-19.07.16:334] 0]LogInit: -virtmemkb=NUMBER - sets process virtual memory (address space) limit (overrides VirtualMemoryLimitInKB value from .ini)
[2016.02.28-19.07.16:335] 0]LogInit: - Physical RAM available (not considering process quota): 17 GB (16511 MB, 16908268 KB, 17314066432 bytes)
[2016.02.28-19.07.16:347] 0]LogTextLocalizationManager: No specific translations for ('en-US') exist, so ('en') translations will be used.
[2016.02.28-19.07.16:735] 0]LogImageWrapper:Error: RLE compression of BMP images not supported
Fatal error: [File:/home//UnrealEngine/Engine/Source/Runtime/OpenGLDrv/Private/Linux/OpenGLLinux.cpp] [Line: 192]
_PlatformCreateOpenGLContextCore - Could not create OpenGL 3.2 context, SDL error: 'Could not create GL context: GLXBadFBConfig'
[2016.02.28-19.07.16:753] 0]LogLinux:Error: appError called: Assertion failed: Assertion failed: [File:/home//UnrealEngine/Engine/Source/Runtime/OpenGLDrv/Private/Linux/OpenGLLinux.cpp] [Line: 192]
_PlatformCreateOpenGLContextCore - Could not create OpenGL 3.2 context, SDL error: 'Could not create GL context: GLXBadFBConfig'
Signal 11 caught.
EngineCrashHandler: Signal=11
[2016.02.28-19.07.16:770] 0]LogLinux: === Critical error: ===
Unhandled Exception: SIGSEGV: invalid attempt to access memory at address 0x00000003
[2016.02.28-19.07.16:770] 0]LogLinux: Assertion failed: Assertion failed: [File:/home//UnrealEngine/Engine/Source/Runtime/OpenGLDrv/Private/Linux/OpenGLLinux.cpp] [Line: 192]
_PlatformCreateOpenGLContextCore - Could not create OpenGL 3.2 context, SDL error: 'Could not create GL context: GLXBadFBConfig'
[Callstack] 03 0x00007f02157f5580 CommonLinuxCrashHandler(FGenericCrashContext const&)
[Callstack] 04 0x00007f0220bc88e8 PlatformCrashHandler(int, siginfo_t*, void*)
[Callstack] 05 0x00007f022176dd10 /lib/x86_64-linux-gnu/libpthread.so.0(+0x10d10) [0x7f022176dd10]
[Callstack] 06 0x00007f0220ab3df2 FGenericPlatformMisc::RaiseException(unsigned int)
[Callstack] 07 0x00007f0220bd4f2a FOutputDeviceLinuxError::Serialize(wchar_t const*, ELogVerbosity::Type, FName const&)
[Callstack] 08 0x00007f0220c90f74 FOutputDevice::Logf(wchar_t const*, ...)
[Callstack] 09 0x00007f0220c82530 FDebug::AssertFailed(char const*, char const*, int, wchar_t const*, ...)
[Callstack] 10 0x00007f01f4847d16 /home//UnrealEngine/Engine/Binaries/Linux/libUE4Editor-OpenGLDrv.so(+0x4ed16) [0x7f01f4847d16]
[Callstack] 11 0x00007f01f4849ade PlatformInitOpenGL()
[Callstack] 12 0x00007f021afceb0c PlatformCreateDynamicRHI()
[Callstack] 13 0x00007f021afce655 RHIInit(bool)
[Callstack] 14 0x0000000000417a2f FEngineLoop::PreInit(wchar_t const*) [/home//UnrealEngine/Engine/Source/Runtime/Launch/Private/LaunchEngineLoop.cpp, line 1398]
[Callstack] 15 0x0000000000429e6f GuardedMain(wchar_t const*) [/home//UnrealEngine/Engine/Source/Runtime/Launch/Private/Launch.cpp, line 31]
[Callstack] 16 0x00007f02157f60be CommonLinuxMain(int, char**, int (*)(wchar_t const*))
[Callstack] 17 0x00007f02147e7a40 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f02147e7a40]
[Callstack] 18 0x0000000000413a39 ./UE4Editor(_start+0x29) [0x413a39]
[2016.02.28-19.07.16:779] 0]LogExit: Executing StaticShutdownAfterError
Starting ../../../Engine/Binaries/Linux/CrashReportClient
[2016.02.28-19.07.16:781] 0]LogHAL: FLinuxPlatformProcess::CreateProc: '/home//UnrealEngine/Engine/Binaries/Linux/CrashReportClient /home//UnrealEngine/Engine/Binaries/Linux/crashinfo--pid-24246-00047C9310020B1C0007030B71588778/'
[2016.02.28-19.07.16:786] 0]LogHAL: FLinuxPlatformProcess::CreateProc: spawned child 24268
Using jemalloc.
[2016.02.28-19.07.16:939] 0]LogModuleManager:Warning: ModuleManager: Module 'PakFile' not found - its StaticallyLinkedModuleInitializers function is null.
[2016.02.28-19.07.16:939] 0]LogModuleManager:Warning: ModuleManager: Module 'SandboxFile' not found - its StaticallyLinkedModuleInitializers function is null.
[2016.02.28-19.07.16:939] 0]LogInit:Display: RandInit(1898606509) SRandInit(1898606513).
[2016.02.28-19.07.16:939] 0]LogTaskGraph: Started task graph with 3 named threads and 5 total threads.
[2016.02.28-19.07.16:939] 0]LogInit: Version: 4.10.0-2649225+++depot+UE4
[2016.02.28-19.07.16:939] 0]LogInit: API Version: 2649225
[2016.02.28-19.07.16:939] 0]LogInit: Compiled (64-bit): Aug 10 2015 06:19:38
[2016.02.28-19.07.16:939] 0]LogInit: Compiled with Clang: 3.6.0 (tags/RELEASE_360/final)
[2016.02.28-19.07.16:939] 0]LogInit: Build Configuration: Shipping
[2016.02.28-19.07.16:939] 0]LogInit: Branch Name: ++depot+UE4
[2016.02.28-19.07.16:939] 0]LogInit: Command line: /home//UnrealEngine/Engine/Binaries/Linux/crashinfo--pid-24246-00047C9310020B1C0007030B71588778/
[2016.02.28-19.07.16:939] 0]LogInit: Base directory: /home//UnrealEngine/Engine/Binaries/Linux/
[2016.02.28-19.07.16:939] 0]LogInit: Rocket: 0
[2016.02.28-19.07.16:941] 0]LogInit: Presizing for 0 objects not considered by GC, pre-allocating 0 bytes.
[2016.02.28-19.07.16:941] 0]LogInit: Object subsystem initialized
[2016.02.28-19.07.16:941] 0]LogInit: Linux hardware info:
[2016.02.28-19.07.16:941] 0]LogInit: - this process' id (pid) is 24268, parent process' id (ppid) is 24246
[2016.02.28-19.07.16:941] 0]LogInit: - we are not running under debugger
[2016.02.28-19.07.16:941] 0]LogInit: - machine network name is 'ubuntu'
[2016.02.28-19.07.16:941] 0]LogInit: - we're logged in locally
[2016.02.28-19.07.16:941] 0]LogInit: - Number of physical cores available for the process: 3
[2016.02.28-19.07.16:941] 0]LogInit: - Number of logical cores available for the process: 6
[2016.02.28-19.07.16:941] 0]LogInit: - Memory allocator used: jemalloc
[2016.02.28-19.07.16:941] 0]LogInit: Linux-specific commandline switches:
[2016.02.28-19.07.16:941] 0]LogInit: -nodwarf (currently OFF): suppress parsing of DWARF debug info (callstacks will be generated faster, but won't have line numbers)
[2016.02.28-19.07.16:942] 0]LogInit: -ansimalloc - use malloc()/free() from libc (useful for tools like valgrind and electric fence)
[2016.02.28-19.07.16:942] 0]LogInit: -jemalloc - use jemalloc for all memory allocation
[2016.02.28-19.07.16:942] 0]LogInit: -binnedmalloc - use binned malloc for all memory allocation
[2016.02.28-19.07.16:942] 0]LogInit: -httpproxy=ADDRESS:PORT - redirects HTTP requests to a proxy (only supported if compiled with libcurl)
[2016.02.28-19.07.16:942] 0]LogInit: -reuseconn - allow libcurl to reuse HTTP connections (only matters if compiled with libcurl)
[2016.02.28-19.07.16:942] 0]LogInit: -virtmemkb=NUMBER - sets process virtual memory (address space) limit (overrides VirtualMemoryLimitInKB value from .ini)
[2016.02.28-19.07.16:942] 0]LogInit: Setting LC_NUMERIC to en_US
[2016.02.28-19.07.16:942] 0]LogInit: - Physical RAM available (not considering process quota): 17 GB (16511 MB, 16908268 KB, 17314066432 bytes)
[2016.02.28-19.07.16:942] 0]LogTextLocalizationManager: No translations for ('') exist, falling back to 'en' for localization and internationalization data.
[2016.02.28-19.07.16:942] 0]CrashReportClientLog: CrashReportReceiverIP: http://crashreporter.epicgames.com:57005
[2016.02.28-19.07.16:943] 0]CrashReportClientLog: Initial state = Unknown UploadState value
[2016.02.28-19.07.16:944] 0]LogInit: Using libcurl 7.38.0
[2016.02.28-19.07.16:944] 0]LogInit: - built for x86_64-unknown-linux-gnu
[2016.02.28-19.07.16:944] 0]LogInit: - supports SSL with OpenSSL/1.0.1i
[2016.02.28-19.07.16:944] 0]LogInit: - supports HTTP deflate (compression) using libz 1.2.5
[2016.02.28-19.07.16:944] 0]LogInit: - other features:
[2016.02.28-19.07.16:944] 0]LogInit: CURL_VERSION_SSL
[2016.02.28-19.07.16:944] 0]LogInit: CURL_VERSION_LIBZ
[2016.02.28-19.07.16:944] 0]LogInit: CURL_VERSION_IPV6
[2016.02.28-19.07.16:944] 0]LogInit: CURL_VERSION_ASYNCHDNS
[2016.02.28-19.07.16:944] 0]LogInit: CURL_VERSION_LARGEFILE
[2016.02.28-19.07.16:944] 0]LogInit: CURL_VERSION_TLSAUTH_SRP
[2016.02.28-19.07.16:944] 0]LogInit: Libcurl: checking if '/etc/pki/tls/certs/ca-bundle.crt' exists
[2016.02.28-19.07.16:945] 0]LogInit: Libcurl: checking if '/etc/ssl/certs/ca-certificates.crt' exists
[2016.02.28-19.07.16:945] 0]LogInit: CurlRequestOptions (configurable via config and command line):
[2016.02.28-19.07.16:945] 0]LogInit: - bVerifyPeer = true - Libcurl will verify peer certificate
[2016.02.28-19.07.16:945] 0]LogInit: - bUseHttpProxy = false - Libcurl will NOT use HTTP proxy
[2016.02.28-19.07.16:945] 0]LogInit: - bDontReuseConnections = false - Libcurl will reuse connections
[2016.02.28-19.07.16:945] 0]LogInit: - CertBundlePath = /etc/ssl/certs/ca-certificates.crt - Libcurl will set CURLOPT_CAINFO to it
[2016.02.28-19.07.16:945] 0]CrashReportClientLog: Sending HTTP request: http://crashreporter.epicgames.com:57005/CrashReporter/Ping
[2016.02.28-19.07.16:945] 0]CrashReportClientLog: Got 5 pending files to upload from 'crashinfo--pid-24246-00047C9310020B1C0007030B71588778'
[2016.02.28-19.07.17:284] 0]CrashReportClientLog: OnProcessRequestComplete(), State=PingingServer bSucceeded=1
[2016.02.28-19.07.17:284] 0]CrashReportClientLog: Proceeding to upload 5 pending files from 'crashinfo--pid-24246-00047C9310020B1C0007030B71588778'
[2016.02.28-19.07.17:285] 0]CrashReportClientLog: State change from PingingServer to CheckingReport
[2016.02.28-19.07.17:285] 0]CrashReportClientLog: Sending HTTP request: http://crashreporter.epicgames.com:57005/CrashReporter/CheckReport
[2016.02.28-19.07.17:285] 0]CrashReportClientLog: PostData Num: 53
[2016.02.28-19.07.17:418] 0]CrashReportClientLog: OnProcessRequestComplete(), State=CheckingReport bSucceeded=1
[2016.02.28-19.07.17:418] 0]CrashReportClientLog: Response->GetContentAsString(): '<CrashReporterResult bSuccess="true" ID="0" Message="" />'
[2016.02.28-19.07.17:418] 0]CrashReportClientLog: ResultNode->GetAttribute(TEXT("bSuccess")) = true
[2016.02.28-19.07.17:418] 0]CrashReportClientLog: State change from CheckingReport to CheckingReportDetail
[2016.02.28-19.07.17:419] 0]CrashReportClientLog: Sending HTTP request: http://crashreporter.epicgames.com:57005/CrashReporter/CheckReportDetail
[2016.02.28-19.07.17:419] 0]CrashReportClientLog: PostData Num: 1722
[2016.02.28-19.07.17:656] 0]CrashReportClientLog: OnProcessRequestComplete(), State=CheckingReportDetail bSucceeded=1
[2016.02.28-19.07.17:656] 0]CrashReportClientLog: Response->GetContentAsString(): '<CrashReporterResult bSuccess="true" ID="0" Message="" />'
[2016.02.28-19.07.17:656] 0]CrashReportClientLog: ResultNode->GetAttribute(TEXT("bSuccess")) = true
[2016.02.28-19.07.17:656] 0]CrashReportClientLog: State change from CheckingReportDetail to SendingFiles
[2016.02.28-19.07.17:656] 0]CrashReportClientLog: CompressAndSendData have 5 pending files
[2016.02.28-19.07.17:657] 0]CrashReportClientLog: CompressAndSendData compressing 4 bytes ('/home//UnrealEngine/Engine/Binaries/Linux/crashinfo--pid-24246-00047C9310020B1C0007030B71588778/minidump.dmp')
[2016.02.28-19.07.17:657] 0]CrashReportClientLog: CompressAndSendData compressing 1722 bytes ('/home//UnrealEngine/Engine/Binaries/Linux/crashinfo--pid-24246-00047C9310020B1C0007030B71588778/wermeta.xml')
[2016.02.28-19.07.17:658] 0]CrashReportClientLog: CompressAndSendData compressing 8706 bytes ('/home//UnrealEngine/Engine/Binaries/Linux/crashinfo--pid-24246-00047C9310020B1C0007030B71588778/UE4.log')
[2016.02.28-19.07.17:658] 0]CrashReportClientLog: CompressAndSendData compressing 1721 bytes ('/home//UnrealEngine/Engine/Binaries/Linux/crashinfo--pid-24246-00047C9310020B1C0007030B71588778/diagnostics.txt')
[2016.02.28-19.07.17:659] 0]CrashReportClientLog: CompressAndSendData compressing 1721 bytes ('/home//UnrealEngine/Engine/Binaries/Linux/crashinfo--pid-24246-00047C9310020B1C0007030B71588778/Diagnostics.txt')
[2016.02.28-19.07.17:660] 0]CrashReportClientLog: Sending HTTP request: http://crashreporter.epicgames.com:57005/CrashReporter/UploadReportFile
[2016.02.28-19.07.17:891] 0]CrashReportClientLog: OnProcessRequestComplete(), State=SendingFiles bSucceeded=1
[2016.02.28-19.07.17:891] 0]CrashReportClientLog: Sending HTTP request: http://crashreporter.epicgames.com:57005/CrashReporter/UploadComplete
[2016.02.28-19.07.17:891] 0]CrashReportClientLog: State change from SendingFiles to PostingReportComplete
[2016.02.28-19.07.20:995] 0]CrashReportClientLog: OnProcessRequestComplete(), State=PostingReportComplete bSucceeded=1
[2016.02.28-19.07.20:995] 0]CrashReportClientLog: State change from PostingReportComplete to CheckingReport
[2016.02.28-19.07.20:995] 0]CrashReportClientLog: All uploads done
[2016.02.28-19.07.20:996] 0]CrashReportClientLog: State change from CheckingReport to Finished
[2016.02.28-19.07.21:968] 0]LogGenericPlatformMisc: FPlatformMisc::RequestExit(0)
[2016.02.28-19.07.22:002] 0]CrashReportClientLog: Final state = Finished
[2016.02.28-19.07.22:002] 0]LogExit: Preparing to exit.
[2016.02.28-19.07.22:002] 0]LogExit: Object subsystem successfully closed.
[2016.02.28-19.07.22:006] 0]LogExit: Exiting.
[2016.02.28-19.07.22:008] 0]LogHAL: Child 24268 is no more running (zombie), Wait()ing immediately.
[2016.02.28-19.07.22:008] 0]LogGenericPlatformMisc: FPlatformMisc::RequestExit(1)
Aborted (core dumped)