Linux: QMake generates huge makefile > 850MB!

Hey,

I am trying to build a project of mine (with own c++ code). But onfortunally, building failed with the error message

execv: Argument list too long

After taking a look at the Compiler Output, I think the compiler is right :wink: The argument list for a single cpp file is extraordinary huge. And the whole makefile is about 859,4MB large :open_mouth:

My System:

  • Linux Mint (based on Ubuntu 14.04)
  • UE4 Version branch 4.10 (7957c3eba0f1703122df7de048c3cd6065ba4a7a)
  • Qt Creator 3.4.2
  • Qt 5.5

Can you use QtCreator for build it? I couldn’t do this :’(

Well, I tried to use qtcreator. And this bugreport is my best result so far :wink:

What IDE are you using?

CodeLite, but i have permission problems with build generated file :’(

qmake should not try to invoke the compiler directly, but instead it should run UBT with parameters (UBT will know how to pass them through response file). I would start investigating first why this does not happen for you. You .pro file should look roughly like this:

# UnrealEngine.pro generated by QMakefileGenerator.cs
# *DO NOT EDIT*

TEMPLATE = aux
CONFIG -= console
CONFIG -= app_bundle
CONFIG -= qt

TARGET = UE4

unrealRootPath=<your root path>
build=bash $$unrealRootPath/Engine/Build/BatchFiles/Linux/Build.sh
args=$(ARGS)

include(UE4Source.pri)
include(UE4Header.pri)
include(UE4Config.pri)
include(UE4Includes.pri)
include(UE4Defines.pri)

UE4Client-Linux-Debug.commands = $$build UE4Client Linux Debug  $$args
UE4Client-Linux-DebugGame.commands = $$build UE4Client Linux DebugGame  $$args
UE4Client-Linux-Shipping.commands = $$build UE4Client Linux Shipping  $$args
UE4Client-Linux-Test.commands = $$build UE4Client Linux Test  $$args
UE4Client.commands = $$build UE4Client Linux Development  $$args

[... etc ...]

Note that you would not be able to compile with g++ anyway (without changes at least) - we don’t use gcc but clang.

Hi,

thanks for your answer. I would say, that my .pro file look pretty the same:

# UnrealEngine.pro generated by QMakefileGenerator.cs
# *DO NOT EDIT*

TEMPLATE = aux
CONFIG -= console
CONFIG -= app_bundle
CONFIG -= qt

TARGET = UE4 

unrealRootPath=/home/robert/Software/SDKs/UnrealEngine
Ue4ToolkitSampleRootPath=/home/robert/WorkingCopies/ue4-toolkit-sample

gameProjectFile=/home/robert/WorkingCopies/ue4-toolkit-sample/Ue4ToolkitSample.uproject
build=mono $$unrealRootPath/Engine/Binaries/DotNET/UnrealBuildTool.exe

args=$(ARGS)

include(Ue4ToolkitSampleSource.pri)
include(Ue4ToolkitSampleHeader.pri)
include(Ue4ToolkitSampleConfig.pri)
include(Ue4ToolkitSampleIncludes.pri)
include(Ue4ToolkitSampleDefines.pri)

UE4Client-Linux-Debug.commands = $$build UE4Client Linux Debug  $$args
UE4Client-Linux-DebugGame.commands = $$build UE4Client Linux DebugGame  $$args
UE4Client-Linux-Shipping.commands = $$build UE4Client Linux Shipping  $$args
UE4Client-Linux-Test.commands = $$build UE4Client Linux Test  $$args
UE4Client.commands = $$build UE4Client Linux Development  $$args

How can I tell qtcreator/qmake to use clang instead of g++?

Make sure that you changed the build steps to invoke make as shown here: - YouTube

THanks for the link. I currently can’t reach youtube.com strangely.
I will give it it a second try on the next weekend :slight_smile: