OSError: [Errno 7] Argument list too long
Traceback (most recent call last):
File "/Users/tianyutingxy/Android/github/infer/infer/bin/infer", line 168, in
still on Infer version git-712d27b5445da91cffad410ca71d31135f351259
Hello @tianyutingxy, can you please provide more information about how you are getting this problem?
Thanks.
Thanks @tianyutingxy for reporting this. It seems to me that the Gradle integration is creating javac command lines with a number of file exceeding the bash limit. The current Gradle integration is mostly a proof of concept to show that we can analyze Gradle projects with Infer but is very fragile. We are working on a much more robust way to integrate Infer with Java built systems. I will update this issue once it is ready.
The gradle integration reads the list of Java files to compile from a file, not from the command line, precisely to avoid this error (#131) . Without more information, it's hard to know what's wrong here, so I'm closing this task. Feel free to re-open with more info.
@jvillard @jeremydubreil @martinoluca I'm having this same issue running infer with ant, from a brew install in OSX. Here is the stack trace and the error:
Traceback (most recent call last):
File "/usr/local/Cellar/infer/0.15.0/lib/infer/infer/bin/../lib/python/infer.py", line 203, in <module>
main()
File "/usr/local/Cellar/infer/0.15.0/lib/infer/infer/bin/../lib/python/infer.py", line 185, in main
capture_exitcode = imported_module.gen_instance(args, cmd).capture()
File "/usr/local/Cellar/infer/0.15.0/lib/infer/infer/lib/python/inferlib/capture/ant.py", line 84, in capture
return util.run_compilation_commands(cmds)
File "/usr/local/Cellar/infer/0.15.0/lib/infer/infer/lib/python/inferlib/capture/util.py", line 46, in run_compilation_commands
if cmd.start() != os.EX_OK:
File "/usr/local/Cellar/infer/0.15.0/lib/infer/infer/lib/python/inferlib/jwlib.py", line 35, in start
raise e
OSError: [Errno 7] Argument list too long
Internal Error: /usr/local/Cellar/infer/0.15.0/lib/infer/infer/bin/../lib/python/infer.py
-j 4 --project-root /Users/my_user/my_project
--out /Users/my_user/my_project/infer-out -- ant
build_war:
exited with code 1
Error backtrace:
Raised at file "base/Die.ml" (inlined), line 25, characters 6-36
Called from file "base/Logging.ml", line 314, characters 58-80
Called from file "integration/Driver.ml", line 159, characters 2-16
Called from file "integration/Driver.ml", line 280, characters 6-420
Called from file "infer.ml", line 20, characters 2-36
Called from file "infer.ml", line 130, characters 8-54