{"action":"opened","issue":{"url":"https://api.github.com/repos/facebook/infer/issues/864","repository_url":"https://api.github.com/repos/facebook/infer","labels_url":"https://api.github.com/repos/facebook/infer/issues/864/labels{/name}","comments_url":"https://api.github.com/repos/facebook/infer/issues/864/comments","events_url":"https://api.github.com/repos/facebook/infer/issues/864/events","html_url":"https://github.com/facebook/infer/issues/864","id":295996619,"number":864,"title":"[Error] Infer needs a working compilation command to run (javac fails)","user":{"login":"cldrn","id":191724,"avatar_url":"https://avatars1.githubusercontent.com/u/191724?v=4","gravatar_id":"","url":"https://api.github.com/users/cldrn","html_url":"https://github.com/cldrn","followers_url":"https://api.github.com/users/cldrn/followers","following_url":"https://api.github.com/users/cldrn/following{/other_user}","gists_url":"https://api.github.com/users/cldrn/gists{/gist_id}","starred_url":"https://api.github.com/users/cldrn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cldrn/subscriptions","organizations_url":"https://api.github.com/users/cldrn/orgs","repos_url":"https://api.github.com/users/cldrn/repos","events_url":"https://api.github.com/users/cldrn/events{/privacy}","received_events_url":"https://api.github.com/users/cldrn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-09T20:09:00Z","updated_at":"2018-02-09T20:09:00Z","closed_at":null,"author_association":"NONE","body":"Hey,\r\n\r\nI'm having trouble running infer on a project and I think this might be a bug. The project builds correctly without infer but it complains about javac not getting a valid flag from a file generated by infer. \r\n\r\nIs this bug or how can I fix this to run infer on this project?\r\n\r\nThanks.\r\n\r\n Infer version v0.13.1 \r\n\r\ninfer-out/toplevel.log\r\n \r\n```\r\n[INFO] output of locale.getdefaultlocale(): ('en_US', 'UTF-8')\r\n[INFO] encoding we chose in the end: UTF-8\r\n[INFO] Running command /usr/local/Cellar/infer/0.13.1/lib/infer/infer/bin/../lib/python/infer.py --analyzer checkers -j 8 --project-root /Users/cldrn/Documents/workbench/client/clientAndroid-services-appointment-fix-gps-1cdc3e717f8514cae8e9ebe0e2d7593ac589191a --out /Users/cldrn/Documents/workbench/client/clientAndroid-services-appointment-fix-gps-1cdc3e717f8514cae8e9ebe0e2d7593ac589191a/infer-out -- ./gradlew build\r\n[INFO] Path to infer script /usr/local/Cellar/infer/0.13.1/lib/infer/infer/bin/../lib/python/infer.py (/usr/local/Cellar/infer/0.13.1/lib/infer/infer/lib/python/infer.py)\r\n[INFO] Platform: Darwin-17.4.0-x86_64-i386-64bit\r\n[INFO] PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/usr/local/MacGPG2/bin:/tools:/platform-tools:/Users/cldrn/Library/Android/sdk/tools:/Users/cldrn/Library/Android/sdk/platform-tools\r\n[INFO] SHELL=/bin/bash\r\n[INFO] PWD=/Users/cldrn/Documents/workbench/client/clientAndroid-services-appointment-fix-gps-1cdc3e717f8514cae8e9ebe0e2d7593ac589191a\r\n[INFO] Running with:\r\n\r\n------------------------------------------------------------\r\nGradle 3.5\r\n------------------------------------------------------------\r\n\r\nBuild time:   2017-04-10 13:37:25 UTC\r\nRevision:     b762622a185d59ce0cfc9cbc6ab5dd22469e18a6\r\n\r\nGroovy:       2.4.10\r\nAnt:          Apache Ant(TM) version 1.9.6 compiled on June 29 2015\r\nJVM:          1.8.0_152 (Oracle Corporation 25.152-b16)\r\nOS:           Mac OS X 10.13.3 x86_64\r\n\r\n```\r\n\r\n$ ./gradlew clean && OCAMLRUNPARAM=b infer -- ./gradlew build\r\n\r\n```\r\nNDK is missing a \"platforms\" directory.\r\nIf you are using NDK, verify the ndk.dir is set to a valid NDK directory.  It is currently set to /Users/cldrn/Library/Android/sdk/ndk-bundle.\r\nIf you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.\r\n\r\nNDK is missing a \"platforms\" directory.\r\nIf you are using NDK, verify the ndk.dir is set to a valid NDK directory.  It is currently set to /Users/cldrn/Library/Android/sdk/ndk-bundle.\r\nIf you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.\r\n\r\nNDK is missing a \"platforms\" directory.\r\nIf you are using NDK, verify the ndk.dir is set to a valid NDK directory.  It is currently set to /Users/cldrn/Library/Android/sdk/ndk-bundle.\r\nIf you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.\r\n\r\n:clean\r\n:ResideMenu:clean\r\n:app:clean\r\n:volley:clean\r\n\r\nBUILD SUCCESSFUL\r\n\r\nTotal time: 2.376 secs\r\nCapturing in gradle mode...\r\nRunning and capturing gradle compilation...\r\n13:51:25.125 [ERROR] [system.err] Note: Some input files use or override a deprecated API.\r\n13:51:25.125 [ERROR] [system.err] Note: Recompile with -Xlint:deprecation for details.\r\n13:51:25.353 [ERROR] [system.err] Note: Some input files use or override a deprecated API.\r\n13:51:25.353 [ERROR] [system.err] Note: Recompile with -Xlint:deprecation for details.\r\n13:51:26.312 [ERROR] [system.err] Note: Some input files use or override a deprecated API.\r\n13:51:26.312 [ERROR] [system.err] Note: Recompile with -Xlint:deprecation for details.\r\n13:51:26.312 [ERROR] [system.err] Note: /Users/cldrn/Documents/workbench/client/clientAndroid-services-appointment-fix-gps-1cdc3e717f8514cae8e9ebe0e2d7593ac589191a/volley/src/main/java/com/android/volley/RequestQueue.java uses unchecked or unsafe operations.\r\n13:51:26.313 [ERROR] [system.err] Note: Recompile with -Xlint:unchecked for details.\r\n13:51:37.853 [ERROR] [system.err] Note: Some input files use or override a deprecated API.\r\n13:51:37.853 [ERROR] [system.err] Note: Recompile with -Xlint:deprecation for details.\r\n13:51:37.854 [ERROR] [system.err] Note: Some input files use unchecked or unsafe operations.\r\n13:51:37.854 [ERROR] [system.err] Note: Recompile with -Xlint:unchecked for details.\r\n13:52:14.807 [ERROR] [system.err] Note: Some input files use or override a deprecated API.\r\n13:52:14.807 [ERROR] [system.err] Note: Recompile with -Xlint:deprecation for details.\r\n13:52:14.807 [ERROR] [system.err] Note: Some input files use unchecked or unsafe operations.\r\n13:52:14.807 [ERROR] [system.err] Note: Recompile with -Xlint:unchecked for details.\r\n13:53:01.971 [ERROR] [system.err] Note: Some input files use or override a deprecated API.\r\n13:53:01.971 [ERROR] [system.err] Note: Recompile with -Xlint:deprecation for details.\r\n13:53:01.971 [ERROR] [system.err] Note: /Users/cldrn/Documents/workbench/client/clientAndroid-services-appointment-fix-gps-1cdc3e717f8514cae8e9ebe0e2d7593ac589191a/volley/src/main/java/com/android/volley/RequestQueue.java uses unchecked or unsafe operations.\r\n13:53:01.971 [ERROR] [system.err] Note: Recompile with -Xlint:unchecked for details.\r\nUsage Error: \r\n*** Failed to execute compilation command: exited with code 2\r\n*** Command: 'javac' '@/Users/cldrn/Documents/workbench/client/clientAndroid-services-appointment-fix-gps-1cdc3e717f8514cae8e9ebe0e2d7593ac589191a/infer-out/filelists/gradle_9aS6Un.txt' '@/var/folders/lq/flnbxflx72d5lspr_gl_0knc0000gn/T/args_.tmp.b1b2bb'\r\n*** Output:\r\njavac: invalid flag: /Users/cldrn/Documents/workbench/client/clientAndroid-services-appointment-fix-gps-1cdc3e717f8514cae8e9ebe0e2d7593ac589191a/volley/build/generated/source/apt/release\r\nUsage: javac <options> <source files>\r\nuse -help for a list of possible options\r\n\r\n*** Infer needs a working compilation command to run.\r\n\r\n\r\nFailed to execute: /usr/local/Cellar/infer/0.13.1/lib/infer/infer/lib/python/inferlib/../../../bin/infer capture --continue -- javac -source 1.7 -target 1.7 -d /Users/cldrn/Documents/workbench/client/clientAndroid-services-appointment-fix-gps-1cdc3e717f8514cae8e9ebe0e2d7593ac589191a/volley/build/intermediates/classes/release -encoding UTF-8 -bootclasspath /Users/cldrn/Library/Android/sdk/platforms/android-22/android.jar -g -sourcepath -proc:none -XDuseUnsharedTable=true -classpath -s /Users/cldrn/Documents/workbench/client/clientAndroid-services-appointment-fix-gps-1cdc3e717f8514cae8e9ebe0e2d7593ac589191a/volley/build/generated/source/apt/release @/Users/cldrn/Documents/workbench/client/clientAndroid-services-appointment-fix-gps-1cdc3e717f8514cae8e9ebe0e2d7593ac589191a/infer-out/filelists/gradle_9aS6Un.txt\r\nTraceback (most recent call last):\r\n  File \"/usr/local/Cellar/infer/0.13.1/lib/infer/infer/bin/../lib/python/infer.py\", line 186, in <module>\r\n    main()\r\n  File \"/usr/local/Cellar/infer/0.13.1/lib/infer/infer/bin/../lib/python/infer.py\", line 168, in main\r\n    capture_exitcode = imported_module.gen_instance(args, cmd).capture()\r\n  File \"/usr/local/Cellar/infer/0.13.1/lib/infer/infer/lib/python/inferlib/capture/gradle.py\", line 217, in capture\r\n    return util.run_compilation_commands(cmds, clean_cmd)\r\n  File \"/usr/local/Cellar/infer/0.13.1/lib/infer/infer/lib/python/inferlib/capture/util.py\", line 46, in run_compilation_commands\r\n    if cmd.start() != os.EX_OK:\r\n  File \"/usr/local/Cellar/infer/0.13.1/lib/infer/infer/lib/python/inferlib/jwlib.py\", line 37, in start\r\n    raise e\r\nsubprocess.CalledProcessError: Command '[u'/usr/local/Cellar/infer/0.13.1/lib/infer/infer/lib/python/inferlib/../../../bin/infer', u'capture', u'--continue', u'--', u'javac', u'-source', u'1.7', u'-target', u'1.7', u'-d', u'/Users/cldrn/Documents/workbench/client/clientAndroid-services-appointment-fix-gps-1cdc3e717f8514cae8e9ebe0e2d7593ac589191a/volley/build/intermediates/classes/release', u'-encoding', u'UTF-8', u'-bootclasspath', u'/Users/cldrn/Library/Android/sdk/platforms/android-22/android.jar', u'-g', u'-sourcepath', u'-proc:none', u'-XDuseUnsharedTable=true', u'-classpath', u'-s', u'/Users/cldrn/Documents/workbench/client/clientAndroid-services-appointment-fix-gps-1cdc3e717f8514cae8e9ebe0e2d7593ac589191a/volley/build/generated/source/apt/release', u'@/Users/cldrn/Documents/workbench/client/clientAndroid-services-appointment-fix-gps-1cdc3e717f8514cae8e9ebe0e2d7593ac589191a/infer-out/filelists/gradle_9aS6Un.txt']' returned non-zero exit status 1\r\n\r\nError backtrace:\r\nRaised at file \"integration/Driver.ml\", line 310, characters 16-78\r\nCalled from file \"integration/Driver.ml\", line 184, characters 2-16\r\nCalled from file \"backend/infer.ml\", line 23, characters 2-36\r\nCalled from file \"backend/infer.ml\", line 112, characters 6-52\r\nUncaught error: (\"InferModules__Driver.Infer_error(\\\"exited with code 1\\\")\")\r\n\r\nRun the command again with `--keep-going` to try and ignore this error.\r\n\r\n```\r\n\r\n"}}
{"actor":{"display_login":"cldrn"}}