Why can't I compile the Unreal Tournament source code on my Mac?

Hi,

I’m trying to compile the UnrealTournament project but i can’t get it to work. I’ve downloaded and compiled UnrealEngine 4.1.1 and when I open the editor and browse to the “UnrealTournament.uproject” file i get the following error:

After finding these answers: Why can't I generate XCode files? - Platform & Builds - Epic Developer Community Forums. I tried to generate the xcode files for “UnrealTournament.uproject”. With the following command:

-:Mac [4.1] $ pwd
/Users/danielz/Projects/UnrealEngine/Engine/Build/BatchFiles/Mac
-:Mac [4.1] $ ./GenerateProjectFiles.sh -project="/Users/danielz/Projects/UnrealEngine/Engine/Source/UnrealTournament.uproject" -game

Setting up Unreal Engine 4 project files...

Setting up Mono
Discovering modules, targets and source code for game...
Generating project file...
Found 7 targets!
Saving updated project file...

This however creates a “UnrealTournament.xcodeproj” file at path: /Users/danielz/Projects/UnrealEngine/Engine/Source. But when I open this file in xcode and then try to build it like this:

I get the following error:

Then I tried moving the “UnrealTournament.xcodeproj” to the UnrealTournament project folder but that gives me the same build error: SBTarget is invalid.

How can I fix this issue?

Thanks,
Daniël


#Update

Thanks for your reply. I deleted everything and begon from scratch. I redownloaded and recompiled the UnrealEngine at path ~/Unreal/UnrealEngine. Then I redownloaded my fork and when I tried to Right mouse on the .uproject file > Services > Generate Xcode project nothing happened. So then I proceeded with this:

-:Mac [4.1] $ ./RocketGenerateProjectFiles.sh -project="/Users/danielz/Unreal/UnrealTournament/UnrealTournament/UnrealTournament.uproject" -game

Setting up Unreal Engine 4 project files...

Setting up Mono

Discovering modules, targets and source code for game...
Binding IntelliSense data... 100%
Generating project file...
Found 8 targets!
Saving updated project file...

But when I open the xcode project file there are some things missing:


Next I tried to compile unreal tournament : Product > Build for > Running. But it crashes with the following error:

enter code hereSetting up Mono
Building UnrealTournament...
Compiling with Mac SDK 10.9
Parsing headers for UnrealTournament
Code generation finished for UnrealTournament and took 2.734
Compile UnrealTournament.h
Compile UELinkerFixupsName.h
Compile UELinkerFixups.cpp
Compile UTCharacter.cpp
Compile UTGameMode.cpp
Compile UTHUD.cpp
Compile UTProjectile.cpp
Compile UnrealTournament.cpp
Link UnrealTournament-Mac-DebugGame
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-Launch.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-Core.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-Projects.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-CoreUObject.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-SandboxFile.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-Sockets.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-Networking.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-InputCore.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-Slate.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-VectorVM.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-Messaging.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-NullDrv.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-ShaderCore.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-ImageWrapper.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-OpenGLDrv.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-RHI.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-RenderCore.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-AssetRegistry.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-EngineMessages.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-EngineSettings.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-SynthBenchmark.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-MovieSceneCore.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-MovieSceneCoreTypes.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-HeadMountedDisplay.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-Analytics.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-HTTP.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-AnalyticsET.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-ImageCore.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-OnlineSubsystem.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-Voice.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-OnlineSubsystemUtils.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-CrashTracker.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-Engine.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-MoviePlayer.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-PakFile.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-SlateRHIRenderer.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-NetworkFile.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-StreamingFile.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-AutomationMessages.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-AutomationWorker.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-SessionMessages.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-SessionServices.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-Renderer.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-Settings.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-TargetPlatform.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-EditorStyle.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-TaskGraph.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-RealtimeProfiler.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-ProfilerMessages.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-ProfilerService.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Binaries/Mac/UE4Game-Redist-CoreAudio.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Plugins/Messaging/UdpMessaging/Binaries/Mac/UdpMessaging-Static.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Plugins/Runtime/AppleMoviePlayer/Binaries/Mac/AppleMoviePlayer-Static.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Plugins/Runtime/CableComponent/Binaries/Mac/CableComponent-Static.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Plugins/Runtime/CustomMeshComponent/Binaries/Mac/CustomMeshComponent-Static.a'
clang: error: no such file or directory: '/Users/danielz/Unreal/UnrealEngine/Engine/Plugins/Runtime/ExampleDeviceProfileSelector/Binaries/Mac/ExampleDeviceProfileSelector-Static.a'
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: /Users/danielz/Unreal/UnrealTournament/UnrealTournament/Binaries/Mac/UnrealTournament-Mac-DebugGame.app/Contents/MacOS/UnrealTournament-Mac-DebugGame (No such file or directory)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: /Users/danielz/Unreal/UnrealTournament/UnrealTournament/Binaries/Mac/UnrealTournament-Mac-DebugGame.app/Contents/MacOS/UnrealTournament-Mac-DebugGame (No such file or directory)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: /Users/danielz/Unreal/UnrealTournament/UnrealTournament/Binaries/Mac/UnrealTournament-Mac-DebugGame.app/Contents/MacOS/UnrealTournament-Mac-DebugGame (No such file or directory)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: /Users/danielz/Unreal/UnrealTournament/UnrealTournament/Binaries/Mac/UnrealTournament-Mac-DebugGame.app/Contents/MacOS/UnrealTournament-Mac-DebugGame (No such file or directory)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: /Users/danielz/Unreal/UnrealTournament/UnrealTournament/Binaries/Mac/UnrealTournament-Mac-DebugGame.app/Contents/MacOS/UnrealTournament-Mac-DebugGame (No such file or directory)
-------- End Detailed Actions Stats -----------------------------------------------------------
ERROR: UBT ERROR: Failed to produce item: /Users/danielz/Unreal/UnrealTournament/UnrealTournament/Binaries/Mac/UnrealTournament-Mac-DebugGame.app/Contents/MacOS/UnrealTournament-Mac-DebugGame
Cumulative action seconds (8 processors): 0.00 building projects, 50.19 compiling, 0.00 creating app bundles, 0.00 generating debug info, 0.10 linking, 0.00 other
UBT execution time: 33.98 seconds

I’m quite lost now…

I’m not sure how it is don in xcode, but did you try to switch to “Development Editor” instead of “Debug”?

Unfortunately this doesn’t solve the problem. I can compile, but can’t import the .uproject in the editpr. It exists with the following message: “The game module ‘UnrealTournament’ could not be found. Please ensure that this module exists and that it is compiled.”

I think the problem is that you merged the UnrealTournament files with engine files.

You should not have /Users/danielz/Projects/UnrealEngine/Engine/Source/UnrealTournament.uproject, but copy the UnrealTournament folder from GitHub to /Users/danielz/Projects/UnrealEngine/, so the the .uproject is at /Users/danielz/Projects/UnrealEngine/UnrealTournament/UnrealTournament.uproject

Thanks for your reply, I updated my original answer with new information!

The new problem is because you used RocketGenerateProjectFiles.sh instead of GenerateProjectFiles.sh - Rocket one generates project for use with binary version of UE4, non-Rocket generates files for GitHub version.

Two more things:

  • if you intend to open the .uproject in the editor, you need to build UnrealTournamentEditor target
  • in general, the configuration (Debug, Development) of the UnrealTournamentEditor target you build must match the configuration of the editor you built (although you can run editor in Development with UnrealTournamentEditor in Debug if you use -debug param when launching the editor)

And also, I’d like to figure out why the Services commands don’t work for you. Could you, for starters, go to System Preferences->Keyboard->Shortcuts->Services, find one of Unreal services on the list, right-click on it, select Show in Finder and see what happens? It should open some folder and select a UE4EditorServices.app. Does it? What is this app’s version? Thanks!

It’s good to know the difference between RocketGenerateProjectFile and GenerateProjectFile. First I need to mention that out of frustration I deleted the source code, plist files and other entries in ~/Library. Then I re-downloaded and re-compiled the UnrealEngine source from Github. But it takes really long to load. Side note: I haven’t installed version 4.1.0 or 4.0.2 through the installer. Is it recommended to use the 4.1.0 version through the downloader of 4.1.1 version compiled from the source code? I just want to code and build levels to contribute to the UT development process.

The “Generate Xcode Project” was working before however after the “reinstall” it isn’t working anymore. The service points to UE4EditorServices, and it’s version 1.3.

I compiled UnrealTournamentEditor, and loaded the .uproject and it works! Do I need to do this everytime I want to make maps? And which targets do I need to build when I’m changing code? And how can I run that code? Do I need to do this through the editor?

Thanks,
Daniël

Glad it’s finally working!

Most of the time you can recompile your code within the Unreal Editor. And if your goal is to work on UT only, I think you may get better results if you use the binary UE4, downloaded with the Launcher, instead of compiling the editor etc. from GitHub by yourself.

Great, thanks again! I’ll be updating the Readme shortly!

Just one last thing, I just installed the binary through the sownloader. When I try to load the UnrealTournament.uproject it halts with the same error message: “The game module ‘UnrealTournament’ could not be found. Please ensure that this module exists and that it is compiled.”. Is this because I compiled UnrealTournamentEditor with the compiled UnrealEngine? If so then I need to recompile it with the binary, but the “Generate Xcode project” isn’t working anymore. How can I recompile UT using the binary?

Open terminal, go to /Users/Shared/UnrealEngine/4.1/Engine/Build/BatchFiles/Mac and use RocketGenerateProjectFiles.sh like you’ve tried before. Then open the Xcode project, switch to UnrealTournamentEditor and use Product->Build for->Profiling to build the game’s editor libs in Development config.

I would very much like to solve this non working services problem, though. Could you please create a separate AnswerHub topic for that and gather some more data for me once I figure out what could you check to help narrowing this down? Many thanks!

Great, works like a charm. I’ll open a new thread, I’ll keep you posted. update: Generate Xcode Project service not working - Programming & Scripting - Epic Developer Community Forums