Aw: Re: depot/extract: make: execvp: bash: Argument list too long

Uwe geno.de at public-files.de
Tue Jun 8 13:10:37 CEST 2021



> Gesendet: Dienstag, 08. Juni 2021 um 09:29 Uhr
> Von: "Christian Helmuth" <christian.helmuth at genode-labs.com>
> An: users at lists.genode.org
> Betreff: Re: depot/extract: make: execvp: bash: Argument list too long
>
> Hello Roman,
> 
> On Mon, Jun 07, 2021 at 21:48:31 CEST, Roman Iten wrote:
> > After some more debugging, I understand now what the actual problem is:
> > 
> > The arguments for the `make`-command assembled by the rule
> > `checked_ports_exists` can get quite long for many archives even though
> > it doesn't contain any duplicates. As a workaround for the CI pipeline,
> > I can just disable this check. Do you think it's worth creating a proper
> > fix that works without passing all input as command line parameter?
> 
> I did not encounter this issue before despite I use meta pkgs
> sometimes. Does this happen only with PREPARE_PORTS=1?
> 
> In my opinion a proper fix that prevents exceeding command line
> arguments is much appreciated and could serve as valuable blueprint in
> other places too. It sounds like the issue needs a mechanism similar
> to the xargs tool.
How about using exactly that, `xargs`? It should be easy to do some $(for ...)
in make to put the arguments in some temporary file, and xargs -1 can extract
them line by line. Or we could develop some patch for xargs that allows the
default behavior (split by blank until maximum command length) to prefer(!) to
terminate the command line at the last newline over the last blank.
Another good trick would be to prepare the temporary file to be a library in
the format supported by ar. Make can update the members indepently and `grep`
can extract all commands as needed or `xargs ar p` can extract exactly the
parts that are defined beforehand to not overflow. That definition is then
probably a manual task. 
> 
> Regards
> -- 
> Christian Helmuth
> Genode Labs
> 
> https://www.genode-labs.com/ · https://genode.org/
> https://twitter.com/GenodeLabs · /ˈdʒiː.nəʊd/
> 
> Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
> Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
> 
> _______________________________________________
> Genode users mailing list
> users at lists.genode.org
> https://lists.genode.org/listinfo/users



More information about the users mailing list