Skip to content

Use a temp file for ARCOM to fix command line too long errors - #2033

Open
aaronfranke wants to merge 1 commit into
godotengine:masterfrom
aaronfranke:arcom-command-length
Open

Use a temp file for ARCOM to fix command line too long errors#2033
aaronfranke wants to merge 1 commit into
godotengine:masterfrom
aaronfranke:arcom-command-length

Conversation

@aaronfranke

@aaronfranke aaronfranke commented Jul 27, 2026

Copy link
Copy Markdown
Member

With my Godot fork, the added C++ modules are enough to push godot-cpp over the limit. The total length of all C++ files concatenated into the argument list is over 133 thousand bytes, which exceeds the 128 KiB limit of Linux argument lists:

Screenshot 2026-07-25 221339

This PR fixes the problem on godot-cpp's side by adding ARCOM, which allows SCons to write the arguments to a file, and then pass that file to ar, rather than trying to put everything into command line arguments.

I have verified that this works, because I pointed the failing dimensions-4.8 branch at aaronfranke/godot-cpp with branch 4.5-arcom-command-length, and now the "Linux / Editor w/ Mono (target=editor)" CI job that includes godot-cpp succeeds: https://github.com/godot-dimensions/godot/actions/runs/30248252906/job/89922634667

Note that this isn't a godot-dimensions specific issue: the same problem would've occurred with Godot itself in a matter of years as the engine size grows over time. My godot-dimensions fork merely encountered the problem sooner.

This should be cherry-picked to past branches. The cherry-picking is beneficial to forks. I have branches ready for this, here is the 4.5 branch: https://github.com/aaronfranke/godot-cpp/tree/4.5-arcom-command-length EDIT: I will update this branch with this PR's updated contents soon.

Corresponding engine PR: https://github.com/godotengine/godot/pull/96407/changes

Supersedes #1731

@aaronfranke
aaronfranke requested a review from a team as a code owner July 27, 2026 17:12
@aaronfranke
aaronfranke force-pushed the arcom-command-length branch from 109e394 to 40d0a91 Compare August 25, 2026 18:24
@dsnopek

dsnopek commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

As mentioned at the GDExtension team meeting, it would be good to check if we need the changes to methods.py from the upstream PR (in godot-cpp, that code is in tools/my_spawn.py)

@aaronfranke
aaronfranke force-pushed the arcom-command-length branch from 40d0a91 to 01da61e Compare August 25, 2026 18:55
@aaronfranke

aaronfranke commented Aug 25, 2026

Copy link
Copy Markdown
Member Author

Updated the PR to closely mirror the engine code, and use a unified place for the ARCOM logic across all platforms (just like the engine code does - ARCOM for all platforms, plus backslash-escaping code for Windows).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants