Error compiling 4.7.2 from source

Hi, I’m trying to compile UE 4.7.2 on OS X (Yosemite) but I’m getting following output when executing GenerateProjectFiles.command. What am I doing wrong?
Plus, am I forced to use Xcode 5.1 or can I also use more recent versions (6.1.1)?

UnrealEngine-4.7.2-release/GenerateProjectFiles.command ; exit;

Setting up Unreal Engine 4 project files…

Setting up Mono
Generating data for project indexing… 0%ERROR: Exception thrown while processing dependent modules of Launch

Exception thrown while processing dependent modules of Engine

Exception thrown while processing dependent modules of Landscape

Exception thrown while processing dependent modules of UnrealEd

Exception thrown while processing dependent modules of AnimGraph

Exception thrown while processing dependent modules of GraphEditor

Exception thrown while processing dependent modules of KismetWidgets

Exception thrown while processing dependent modules of BlueprintGraph

Exception thrown while processing dependent modules of KismetCompiler

Exception thrown while processing dependent modules of MovieSceneTools

Exception thrown while processing dependent modules of AssetTools

Exception thrown while processing dependent modules of TextureEditor

Exception thrown while processing dependent modules of MainFrame

Exception thrown while processing dependent modules of DeviceProfileEditor

Exception thrown while processing dependent modules of LevelEditor

Exception thrown while processing dependent modules of WebBrowser

Exception thrown while processing dependent modules of CEF3Utils

ERROR: Unable to instantiate instance of ‘CEF3’ object type from compiled assembly ‘ProjectFileGeneratorModuleRules’. Unreal Build Tool creates an instance of your module’s ‘Rules’ object in order to find out about your module’s requirements. CLR exception details may provide more information:
System.Reflection.TargetInvocationException: Exception has been thrown by target of an invocation. —> System.IO.DirectoryNotFoundException: Directory ‘ThirdParty/CEF3/cef_binary_3.1750.1805_macosx64/Release/locale’ not found.
at System.IO.Directory.ValidateDirectoryListing (System.String path, System.String searchPattern, System.Boolean& stop) [0x00000] in :0
at System.IO.Directory.GetFileSystemEntries (System.String path, System.String searchPattern, FileAttributes mask, FileAttributes attrs) [0x00000] in :0
at System.IO.Directory.GetFileSystemEntries (System.String path, System.String searchPattern) [0x00000] in :0
at CEF3…ctor (UnrealBuildTool.TargetInfo Target) [0x00000] in :0
at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00000] in :0
— End of inner exception stack trace —
at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00000] in :0
at System.Reflection.MonoCMethod.DoInvoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in :0
at System.Reflection.MonoCMethod.Invoke (BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in :0
at System.Activator.CreateInstance (System.Type type, BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x00000] in :0
at System.Activator.CreateInstance (System.Type type, System.Object[] args, System.Object[] activationAttributes) [0x00000] in :0
at System.Activator.CreateInstance (System.Type type, System.Object[] args) [0x00000] in :0
at UnrealBuildTool.RulesCompiler.CreateModuleRules (System.String ModuleName, UnrealBuildTool.TargetInfo Target, System.String& ModuleFileName) [0x00000] in :0

logout

by way, only required dependencies files I found are ones from 4.5.1. May this be problem?

Hi ,

setup since 4.5 has changed. When you get source, you need to run Setup.command before running GenerateProjectFiles.command. XCode 6.1 actually works much better, and I’m not 100% certain whether earlier versions will work with 4.7.

Creating by hand ThirdParty/CEF3/cef_binary_3.1750.1805_macosx64/Release/locale
fixes generation of Xcode project, but then compilation fails in Xcode with following output:


LogMac:Error: appError called: Assertion failed: Assertion failed: HasFoundDataDirectory [File:/Users/xxxxxxxx/Desktop/UnrealEngine-4.7.2-release/Engine/Source/Runtime/Core/Private/Internationalization/ICUInternationalization.cpp] [Line: 118]

ICU data directory was not discovered:

…/…/…/Engine/Programs/UnrealHeaderTool/Content/Internationalization

…/…/…/Engine/Content/Internationalization

Error: Failed to generate code for UE4Editor - error code: 134 (134)

UnrealHeaderTool failed for target ‘UE4Editor’ (platform: Mac, module info: /Users/xxxxxx/Desktop/UnrealEngine-4.7.2-release/Engine/Intermediate/Build/Mac/UE4Editor/Debug/UnrealHeaderTool.manifest).

Command /Users/xxxxxxx/Desktop/UnrealEngine-4.7.2-release/Engine/Build/BatchFiles/Mac/Build.sh failed with exit code 134

Thank you, fixed! You may want to update this page, information reported is a bit outdated:

By way, after following that instructions what am I supposed to do? manually launch editor from engine/binaries/mac folder or move files somewhere else?
Also, should I build editor in debug or not?

Finally, packaging my project for mac I had some issue because it couldn’t find UE4Game, are there further instructions about how to complete installation of editor?

I’ll let docs team know. It looks like that information was last checked for 4.5.

Once you’ve build engine from source, you can launch from binaries folder (or create a shortcut for your dock, which is what I normally do) or open up engine in Xcode using UE4.xcodeproj file and build/run through there. Some people prefer running in debug through Xcode, but generally if you don’t need to run in debug, I’d use binary for simplicity’s sake.

I’m not certain about packaging process not finding UE4Game… you should enter a new bug report for that so we can get right people looking into it. Just give us as many details as you can. Thanks!

It looks like we already have a task listed for that documentation page to get updated (UEDOC-836). We don’t have a timeline for it yet, but it’s something docs team is aware of.

Once editor is compiled, can I somehow clean build files in Xcode to reduce disk space used by build? cleaning whole project seems to prevent editor to start correctly, is this normal?

You can theoretically delete Engine > Intermediate folder after building, though I’ve only barely tested that. I’m not sure what you mean by cleaning whole project.

I mean through Xcode Product->Clean (in case there are temporary files no more necessary to editor)

I didn’t have any trouble. Did you rebuild after using Clean?

I rebuilt and it worked again, but my objective was to reduce disk size of whole engine (building from code occupies 13GB vs 8GB of binary engine, so I thought that cleaning project would leave me with just necessary executable and resources)

Ah, rebuilding probably recreated all that. Okay, your best bet is to lose stuff in Intermediate folder, then, and stick with using binary to launch. You can save your projects to an external drive, btw, if space on your SSD is a concern.

Exactly :slight_smile:

You can save your projects to an external drive → which folder do you mean?

Anywhere you choose. When you create a project, you can save it where you like, including an external drive. Might help save some space as project grows or you work with more than one.