UE4.4.1 preview fails to compile on OSX

I know UE4 is not yet supported on 10.10, so I’m not sure whether I should be raising these issues or not. UE4.4.0 (and lower) compiled fine (though does have some other issues on 10.10), 4.4.1 preview does not compile in either Xcode 5 or 6 beta on 10.10 - this might affect 10.9 users as well, but unsure.

When attempting a compile of the editor, it gets a warning that ultimately terminates the build process: “LogModuleManager:Warning: Found module file /Users/Francois/Development/UnrealEngine-4.4.1-preview/Engine/Plugins/Script/ScriptGeneratorPlugin/Binaries/Mac/UnrealHeaderTool-ScriptGeneratorPlugin.dylib (API version 2255576), but it was incompatible with the current engine API version (0). This is likely a stale module that must be recompiled.”

It also pops up an additional dialog if you minimise Xcode, as per the attached image:

13572-screen+shot+2014-08-24+at+2.43.36+pm.png

I’ve gone back and compiled 4.4.0 and that definitely compiles fine. Reattempted to compile 4.4.1 preview and got the same issue again.

I’ve been looking into the issue and have figured out what it is. It has to do with the setting of the API version in 4.4.1. I noted that some pre-compiler magic was added in the latest version which was not present in the past, it appears that this is what’s causing problems.

The change to Engine/Source/Runtime/Core/Public/Modules/ModuleVersion.h in 4.4.1 looks like this:

#if BUILT_FROM_CHANGELIST > 0
#define MODULE_API_VERSION 2255576
#else
#define MODULE_API_VERSION 0
#endif

I’ve simplified it down to just defining MODULE_API_VERSION directly without the other ifs and stuff (the way it was done prior to 4.4.1:

#define MODULE_API_VERSION 2255576

This gets it building on Mac again. I’m pretty sure this won’t just be an issue on 10.10…

Okay, in that case I’ll do a pull request and hopefully someone will notice the change and include it in 4.4.1 before it gets released to the public.

You must have another problem that I don’t have… I’ve been building 4.4.0 and 4.4.1 (with my fix above of course). And it works in my experience.

It’s a bit hard to diagnose with the limited info you’ve provided, but a couple of things to looks out for, firstly, make sure you are using at least Xcode 5.1, and also make sure the app is named /Applications/Xcode - if it is installed anywhere but the default path, the compile fails.

You are correct, it also is a problem in 10.9, and changing it seems to fix it.

Well, atm 4.4 branch doesn’t build on mac. That make it go forward, but eventually it got an error simply saying Build.sh failed with exit code 2.

Seems to me that Mac builds are probably not done very often :frowning:

ATM seems that my issue is a problem with Oculus. Looking at LibOVR.build.cs I see that it is supposed to be looking at LibOVR_04/Lib, but that is in LibOVR/Lib. Seems like a bad move in git, according to commit 118bb4c). However, I don’t get why it would work for you…

Moving Lib to LibOVR_04/Lib only causes it to error with “Undefined symbols for architecture x86_64”

Ah, have you tried building without the optional dependencies?

Small correction, LibOVR/Lib comes from the required dependencies, not git.

I haven’t downloaded optional dependencies, only use the required stuff (which still appears to be the same version, 4.4.0-release).

EDIT: Are you sure you’re up to date on 4.4? commit 7acd717?

The actual problem was in UBT’s code that’s parsing ModuleVersion.h file in MacToolChain. I modified it to handle BUILT_WITH_CHANGELIST equal to 0, so the final 4.4.1 hotfix should build correctly. Sorry for inconvenience and many thanks for bringing this to our attention!

Ok, “fixed”. I saw that ATM you need to download the Oculus 0.4.1 SDK and copy it to LibOVR_04.

https://github.com/EpicGames/UnrealEngine/releases/tag/4.4.1-release should solve both issues (Module version error and missing Occulus libs)