Skip to content

make clean fails with /bin/sh: Argument list too long #13817

Description

@samsa1

Under certain conditions make clean fails on line

ocaml/Makefile.dev

Lines 47 to 48 in 25265d7

partialclean::
@rm -f $(AST_FILES)

With the error message make: /bin/sh: Argument list too long.

I tracked it back to those lines

ocaml/Makefile.dev

Lines 20 to 22 in 25265d7

SOURCE_FILES=$(shell git ls-files '*.ml' '*.mli' | grep -v boot/menhir/parser)
AST_FILES=$(addsuffix .ast,$(SOURCE_FILES))

that select too many values for bash.

The main culprit here is my version control system (https://github.com/jj-vcs/jj) which is not git but retrocompatible with it. When I have a conflict in my versions the command git ls-files '*.ml' '*.mli' returns 3 times more files (once for each prefix : .jjconflict-base-0, .jjconflict-side-0 and .jjconflict-side-1). This massive increase in number of files and total length of the names resulting in the error presented above.

No activity

Activity on this issue will appear here.

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions