Navigation Menu

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

ocamldep: Argument list too long #7011

Closed
vicuna opened this issue Oct 9, 2015 · 3 comments
Closed

ocamldep: Argument list too long #7011

vicuna opened this issue Oct 9, 2015 · 3 comments
Assignees
Milestone

Comments

@vicuna
Copy link

vicuna commented Oct 9, 2015

Original bug ID: 7011
Reporter: dhekir
Assigned to: @mshinwell
Status: resolved (set by @mshinwell on 2016-12-12T16:29:20Z)
Resolution: fixed
Priority: normal
Severity: feature
Version: 4.02.1
Target version: 4.05.0 +dev/beta1/beta2/beta3/rc1
Category: tools (ocaml{lex,yacc,dep,debug,...})
Child of: #7050
Monitored by: @gasche @diml "Julien Signoles"

Bug description

ocamldep expects all arguments to be given in the command line, but when there are too many of them, and the ARG_MAX value is low (e.g. 32-bit Cygwin has it set to 32000), it results in an "Argument list too long" error.

I couldn't find a workaround for this issue. It does not seem that I could split the argument list in several commands without altering the result. If there's a way to do so, I'd be interested to learn it.

Otherwise, adding an option such as "-f " could avoid this issue by allowing the user to add filenames one by one into a file, and then passing the file to ocamldep.

@vicuna
Copy link
Author

vicuna commented Nov 28, 2015

Comment author: @xavierleroy

See #7050 for work in progress on something similar to your "-f ".

This said, what is wrong with

xargs ocamldep [-I options] < listoffiles

?

@vicuna
Copy link
Author

vicuna commented Dec 2, 2015

Comment author: dhekir

Indeed, it is likely that xargs would work fine. I cannot reliably reproduce my environment now to test it again, but it should work.

My issue was that, because of the stack limitation under Cygwin, I tried emulating the same behavior using xargs on my Linux using ulimit -s 32, and xargs reported the same issue there ("Argument list too long"), so I assumed it would not work.

I just found out about xargs' "-s " argument (which I should have used on Cygwin as well), and it should allow xargs to properly construct the input without any problems.

Anyway, as soon as I am able to reconfigure my environment to retry it, I will report back. Otherwise, the -args feature of 0007050 should also work for me.

@vicuna
Copy link
Author

vicuna commented Dec 12, 2016

Comment author: @mshinwell

The recently-implemented response file support should fix this.

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

No branches or pull requests

2 participants