Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

UnrealBuildTool: The filename or extension is too long

Hi there.

error: The filename or extension is too long

caused by: D:/android-ndk-r13\toolchains/llvm\prebuilt/windows\bin/clang++.exe



Some people say that setting flag LOCAL_SHORT_COMMANDS in android.mk could help... But how to set this flag without changing engine source? As is know UE generates makefile dynamically?

Any fix?

Product Version: UE 4.14
log.txt (43.7 kB)
more ▼

asked Dec 23 '16 at 02:57 PM in Packaging & Deployment

avatar image

21 1 2 3

avatar image Matthew J Dec 23 '16 at 03:49 PM

Hello -link-,

Could you upload the full log file from the packaging process itself? This can be found in the project's directory under Saved/Logs. It should be a .txt file with the same name as the project. This could just be an asset whose name is over the limit allowed.

avatar image -link- Dec 26 '16 at 06:10 AM

Hello Matthew,

log file

cubitu.log (65.2 kB)
avatar image Matthew J Dec 27 '16 at 06:40 PM

It doesn't seem like the error is being listed in this log. It may of been on this line but it doesn't seem like it's picking up the special characters: UnrealBuildTool: ����ࠡ�⠭��� �᪫�祭��:

Could you upload the log that it suggests taking a look at? You can find that information on this line:

[2016.12.26-06.07.38:008][319]UATHelper: Packaging (Android (ETC2)): Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.CommandUtils+CommandFailedException: Command failed (Result:-532462766): D:\Program Files (x86)\Epic Games\4.14\Engine\Binaries\DotNET\UnrealBuildTool.exe Cubitu Android Development -Project=C:\Projects\Cubitu\Cubitu.uproject C:\Projects\Cubitu\Cubitu.uproject -remoteini="C:\Projects\Cubitu" -noxge -NoHotReload -ignorejunk. See logfile for details: 'UnrealBuildTool-2016.12.26-09.07.23.txt'

avatar image -link- Dec 28 '16 at 07:28 AM

File contains the same special characters).

Running UnrealBuildTool with arguments from log file under debugger gives me error "The filename or extension is too long".

avatar image -link- Dec 28 '16 at 11:25 AM

After some search ive discovered that UnrealBuildTool generates bundle of commands that do compile/link/other actions. When command (witch is just a string that passed to shell execute) exeeds 32767 characters it fails.

Partial workaround - reduce paths. But what about large projects?

avatar image Matthew J Dec 29 '16 at 05:56 PM

This seems like a more than reasonable length. It would require a lot of nested folders with very long names to reach a 32,767 character length. Our internal game projects don't even come close to this limit so it's something you'll just need to account for.

avatar image skyphyr Feb 11 '17 at 10:27 PM

I don't have particularly deep projects and hit the same issue. The commands required just get huge. There's got to be a fix that can be implemented for this. Project name is 7 characters. I've just got Project/Source/UnrealProj (tokens not actual names, it's shorter than that. So by the time you hit a non-root directory, the rest of the depth comes from Unreal project setup.

avatar image skyphyr Feb 11 '17 at 10:28 PM

oh, and the bulk of the length comes from the unreal engine install directory. "C:/Program Files/Epic Games/4.14/Engine/Binaries/Android", "C:/Program Files/Epic Games/4.14/Engine/Source/ThirdParty/" plus additional directories on those take up by far the bulk of the command.

avatar image skyphyr Feb 12 '17 at 12:37 AM

So, changing the install to a shorter path wasn't it for this case. After the change it was <8000 characters and still failing hitting an exception in the windows APIs about file length. Building the engine from source to get a proper callstack to look through and narrow it down.

avatar image Matthew J Feb 13 '17 at 03:40 PM

Hello skyphyr,

File path length didn't end up being this user's issue, as shown in his answer below, this was caused by him having dependencies referencing UnrealEd, which is an editor-only module. This blocks you from being able to package. If you're experiencing the same issue, can you check to see if you have the same problem? If not, please feel free to make your own post with more information.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Matthew, my wrong.

One of my plugins was declared as runtime but in build dependencies it had reference to UnrealEd.

more ▼

answered Dec 29 '16 at 07:13 PM

avatar image

21 1 2 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question