m-ab-s / media-autobuild_suite

This Windows Batchscript helps setup a Mingw-w64 compiler environment for building ffmpeg and other media tools under Windows.
GNU General Public License v3.0
1.54k stars 267 forks source link

Argument list too long #2782

Open FrontierDK opened 2 weeks ago

FrontierDK commented 2 weeks ago

logs.zip

Hi all.

I am trying to build the non-free x86 shared build, but despite running the latest version, I get this error: LD libavcodec/avcodec-61.dll /bin/sh: line 1: /mingw32/bin/ccache: Argument list too long make: *** [/build/ffmpeg-git/ffbuild/library.mak:119: libavcodec/avcodec-61.dll] Error 126

Log file(s) attached as per request.

When searching the web, some suggest putting the argument list into a file. More here: https://stackoverflow.com/questions/52391581/mingw32-bin-curl-argument-list-too-long

L4cache commented 2 weeks ago

Is this the time we finally reached the command line length limit (again?)? I guess deduplicate linking flags is implemented some time in the past the limit was reached?

Put argument list into a file is not a common feature I suppose, but luckily GCC and Clang both support flags in a text file, the tricky part is that FFmpeg, like many other projects, is using build system, which may require a lot more effort to change.

L4cache commented 2 weeks ago

I can't reproduce this issue though...

FrontierDK commented 2 weeks ago

L4cache, try asking for a full shared x86 build, including libfdk, libjxl etc.

1480c1 commented 1 week ago

Running the same configuration (mabs.ini, ffmpeg_options and mpv_options) resulted in the build passing for me. What is the folder path mabs is in? Perhaps your base path is too long?

L4cache commented 1 week ago

Oh yeah, and somehow the msys2 environment (the shell?) supports a single argument length up to nearly 12 MiB... and the total command line length limit is probably even longer. So no need to worry that in any forseeable future as well...

/bin/bash -c "/bin/echo $(perl -e 'print"a"x12582885')"

FrontierDK commented 6 days ago

Running the same configuration (mabs.ini, ffmpeg_options and mpv_options) resulted in the build passing for me. What is the folder path mabs is in? Perhaps your base path is too long?

This worked, thank you. I had just used the fill project name as a name for the root folder. Changing it to just "ffmpeg" enabled it to run all the way through :)