Windows 10 process argument limit issue

Michael Stahl mst at libreoffice.org
Wed Jun 26 09:41:18 UTC 2019


On 26.06.19 00:49, Austin Stephens wrote:
> I am trying to build LibreOffice and it does not appear to be working. 
> After a while of building I keep getting the following echoed to the 
> console constantly. Usually in-between build target echos:
> 
>> /usr/bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
>> /usr/bin/sh: -c: line 1: syntax error: unexpected end of file
> I looked into it using a shell override, the debug make flag, and a 
> script (which I used as the shell, source below)
>> #!/bin/sh
>> echo "$*" >&2
>> sh "$@"
> And determined that somehow, when 
> CreateProcess(D:\cygwin64\bin\sh.exe,D:/cygwin64/bin/sh.exe -c "printf 
> \"%s\n\" \"{gigantic list of space separated paths}\" >> 
> D:/cygwin64/tmp/gbuild.cgwaBE ",...) is called, the input "argument" is 
> getting truncated. I am assuming that things are not getting build due 
> to this. Does anyone know how to fix this? I am not proficient with c++ 
> build tools.

that's some good investigation :)

it's a well known problem, and it looks like for you the *workaround* 
for the problem doesn't work, which is odd ...

the command must be this from Tempfile.mk

> 	$(eval gb_var2file_helpervar := $(shell printf "%s\n" "$(gb_var2file_curblock)" >> $(1) )

... however: on Windows you should be using a GNU make 4.0 or newer, 
where Tempfile.mk would use the built-in $(file) function to write.

somehow you're using make 3.81 or 3.82, which does work on unixes but 
apparently not on Windows, and since we have LODE to download a newer 
make automatically it's not worth fixing that.

i think we should check for this in configure:
https://gerrit.libreoffice.org/#/c/74730/


More information about the LibreOffice mailing list