Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make failed, argument list too long #994

Open
shionryuu opened this issue Feb 2, 2024 · 4 comments
Open

Make failed, argument list too long #994

shionryuu opened this issue Feb 2, 2024 · 4 comments

Comments

@shionryuu
Copy link

I try to compile project with erlang.mk, but it failed with following error:

$ curl https://erlang.mk/erlang.mk -o erlang.mk
...
$ echo "include erlang.mk" > Makefile
$ make
...
make[1]: /bin/sh: Argument list too long
make[1]: *** [erlang.mk:4724: /home/user/workspace/erlang/project/.erlang.mk/last-makefile-change] Error 127
make: *** [erlang.mk:4498: app] Error 2
@essen
Copy link
Member

essen commented Feb 3, 2024

Try using it from a directory closer to /.

Some systems have weird limits, yours might, but you didn't provide which one you are using so I can only guess.

@shionryuu
Copy link
Author

I'm currently using Manjaro Linux.

Move close to / doesn't help, my project contain more than 6000 files. The file list of touch (line 4725) is too long.

4720 ifeq ($(IS_APP)$(IS_DEP),)
4721 ifneq ($(words $(ERL_FILES) $(CORE_FILES) $(ASN1_FILES) $(MIB_FILES) $(XRL_FILES) $(YRL_FILES)),0)
4722 # Rebuild everything when the Makefile changes.
4723 $(ERLANG_MK_TMP)/last-makefile-change: $(MAKEFILE_LIST) | $(ERLANG_MK_TMP)
4724 	$(verbose) if test -f $@; then \
4725 		touch $(ERL_FILES) $(CORE_FILES) $(ASN1_FILES) $(MIB_FILES) $(XRL_FILES) $(YRL_FILES); \
4726 		touch -c $(PROJECT).d; \
4727 	fi
4728 	$(verbose) touch $@

@essen
Copy link
Member

essen commented Feb 3, 2024

Ah understood. I guess that would be a problem. Would need to split into multiple commands instead of just one, with that many files.

What's the maximum command line size, do you know?

@essen
Copy link
Member

essen commented Feb 3, 2024

Otherwise figuring out an alternative way to do this might be even better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants