I'm trying to use the Infer tool to analyze my app code. I followed these steps and every time I'm trying to run infer -- gradle build I'm getting the below errors :
infer -- gradle build
Running and capturing gradle compilation...
Traceback (most recent call last):
File "/usr/local/bin/infer", line 183, in <module>
main()
File "/usr/local/bin/infer", line 147, in main
capture_exitcode = imported_module.gen_instance(args,cmd).capture()
File "/usr/local/Cellar/infer/0.8.1/libexec/infer/lib/python/inferlib/capture/gradle.py", line 87, in capture
cmds = self.get_infer_commands(util.get_build_output(self.build_cmd))
File "/usr/local/Cellar/infer/0.8.1/libexec/infer/lib/python/inferlib/capture/util.py", line 25, in get_build_output
proc = subprocess.Popen(build_cmd, stdout=subprocess.PIPE)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Any idea would be appreciated !!
I found that Infer is already included in the new android studio 2.2 where you can run it directly from Analyze->Infer Nullity then specify the scope.
Related
Getting errors as below, when I follow step 4 of the instruction from Getting Started with ARC Open Source on Linux. OS is Ubuntu 14.04 LTS running in Hyper-V.
UBUNTU14:~/arc$ ./configure
ERROR:root:While running
['third_party/tools/depot_tools/third_party/gsutil/gsutil', 'cp',
'gs://arc-build/naclports/builds/pepper_40/python.zip',
'/tmp/tmpUZ0IoK/naclports-python'] ERROR:root:GSResponseError:
status=403, code=None, reason=Forbidden.
ERROR:root:Try prodaccess, and if it does not solve the problem try rm
~/.devstore_token ###STEP_WARNINGS### ERROR:root:Retrying after 9 s
sleeping Traceback (most recent call last): File
"/home/fkiller/arc/src/build/build_common.py", line 938, in wrapper
return func(*args, **kwargs) File "/home/fkiller/arc/src/build/util/download_package_util.py", line 243,
in _download_package_with_retries
self._download_method(url, download_package_path) File "/home/fkiller/arc/src/build/util/download_package_util.py", line 119,
in _download
build_common.get_gsutil_executable(), 'cp', url, destination_path]) File
"/home/fkiller/arc/src/build/util/download_package_util.py", line 97,
in execute_subprocess
output = subprocess.check_output(cmd, cwd=cwd, stderr=subprocess.STDOUT) File "/usr/lib/python2.7/subprocess.py",
line 573, in check_output
raise CalledProcessError(retcode, cmd, output=output) CalledProcessError: Command
'['third_party/tools/depot_tools/third_party/gsutil/gsutil', 'cp',
'gs://arc-build/naclports/builds/pepper_40/python.zip',
'/tmp/tmpUZ0IoK/naclports-python']' returned non-zero exit status 1
Any idea to resolve this without changing build script? I may manually pointing python.zip from other sources such as https://naclports.storage.googleapis.com/builds/pepper_40/trunk-147-g49eb4c9/publish/python/pnacl/python.zip, but I want to build it as is without changing scripts.
I've already tried to setup gsutil and its authenticator, but it didn't fix the issue.
EDIT: After #elijah-taylor fixed ACL, now I'm getting errors below
Traceback (most recent call last): File "src/build/configure.py",
line 365, in
sys.exit(main()) File "src/build/configure.py", line 347, in main
_gclient_sync_third_party() File "src/build/configure.py", line 132, in _gclient_sync_third_party
subprocess.check_output(cmd, cwd=os.path.dirname(gclient_filename)) File
"/usr/lib/python2.7/subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs) File "/usr/lib/python2.7/subprocess.py", line 710, in init
errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception OSError: [Errno 2] No such file or directory
In the line 132,
File "src/build/configure.py", line 132, in _gclient_sync_third_party
subprocess.check_output(cmd, cwd=os.path.dirname(gclient_filename))
gclient_filename is "third_party/.gclient" and os.path.dirname(gclient_filename) is "thrid_party".
The problem was bad ACLs on the files. I reached out to #elijah-taylor for a fix, it should now work!
faced same issue..fixed after running the following.
apt-get install gsutil
apt-get install libwww-perl
chmod +x ./third_party/tools/depot_tools/third_party/gsutil/gsutil
I have created a pygame application. Now I want to create an APK and for that I need to install pygame_sdl2. However, when I try to install by running python setup.py install I get this error
Traceback (most recent call last):
File "C:\pygame_sdl2-master\setup.py", line 36, in <module>
parse_cflags([ "sh", "-c", "sdl2-config --cflags" ])
File "C:\pygame_sdl2-master\setuplib.py", line 93, in parse_cflags
output = subprocess.check_output(command, universal_newlines=True)
File "C:\Python27\lib\subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "C:\Python27\lib\subprocess.py", line 710, in __init__
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 958, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
Any help in this context would be appreciated.
Download the version you need here https://bitbucket.org/marcusva/py-sdl2/downloads
Exctract, open the cmd and navigate to the folder.
Run python setup.py install
Working for me this way.I downloaded PySDL2-0.9.3.zip file
I get an error when building Android from source which I have not tinkered with and it should really by all means work (I'm quite certain I've got all the libs installed, Java and Python in the correct version). Error messages go as follows:
> Traceback (most recent call last):
File "../../base/android/jni_generator/jni_generator.py", line 1065, in <module>
sys.exit(main(sys.argv))
File "../../base/android/jni_generator/jni_generator.py", line 1061, in main
options.optimize_generation)
File "../../base/android/jni_generator/jni_generator.py", line 996, in GenerateJNIHeader
jni_from_javap = JNIFromJavaP.CreateFromClass(input_file, namespace)
File "../../base/android/jni_generator/jni_generator.py", line 507, in CreateFromClass
stderr=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
make: *** [out/target/product/rk3066/obj/GYP/shared_intermediates/ui/gl/jni/Surface_jni.h] Error 1
make: *** Waiting for unfinished jobs....
I'm not really a specialist, so maybe the information I have provided is not complete. In this case - let me know.
At line 507 in file external/chromium_org/base/android/jni_generator/jni_generator.py
p = subprocess.Popen(args=['javap', class_name],
cwd=os.path.dirname(class_file),
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
It seems you don't have javap available in your PATH
If you have installed the jdk1.6.0_45 in usr/lib/jvm, then you can run this command
sudo update-alternatives --install /usr/bin/javap javap /usr/lib/jvm/jdk1.6.0_45/bin/javap 1
I'm trying to create an android app that can identify the object in the image and gives its name as result. I know caffe-library can be used for this but getting error when i run ./build.py .
command :
user_name#sysetm_name:~/caffe-android-lib$ ./build.py /bin/android-ndk-r10d/ndk-build
Error :
Traceback (most recent call last):
File "./build.py", line 102, in <module>
main(sys.argv[1:])
File "./build.py", line 94, in main
setup()
File "./build.py", line 24, in setup
call(['curl', '-O', PROTOBUF_URL])
File "/usr/lib/python2.7/subprocess.py", line 522, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Make sure that the clone is recursive to include the dependencies:
*** caffe-android-lib Dependency:
Boost-for-Android
protobuf
Eigen
E.g.:
git clone --recursive https://github.com/sh1r0/caffe-android-lib.git
cd caffe-android-lib
./build.py $(NDK_PATH)
Or have you tried to install the dependencies (especially protobuf) from source?
Given the dependencies are correctly installed, then you will have a successful caffe-android build:
E.g.:
https://gist.github.com/melvincabatuan/6b5e37444b77326ae7b3
...updated 10980 targets...
Done!
...
[armeabi-v7a] Install : libcaffe_jni.so => libs/armeabi-v7a/libcaffe_jni.so
I am trying to build unmodified Chromium following official instructions, but i am getting the following error, I tried reinstalling Ubuntu 8, 12 but no difference:
[10/6591] ACTION Creating jsr_305_javalib jar
FAILED: cd ../../third_party/jsr-305; python ../../build/android/jar.py "--classes-dir=../../out/Release/gen/jsr_305_javalib/classes" "--jar-path=../../out/Release/lib.java/jsr_305_javalib.jar" "--excluded-classes=\"*/R.class\" \"*/R##*.class\"" "--ignore=035ff3d8153c7ebb3e17803d6ec654de -"
Traceback (most recent call last):
File "../../build/android/jar.py", line 53, in <module>
sys.exit(main(sys.argv))
File "../../build/android/jar.py", line 46, in main
DoJar(options)
File "../../build/android/jar.py", line 30, in DoJar
subprocess.check_call(jar_cmd, cwd=jar_cwd)
File "/usr/lib/python2.7/subprocess.py", line 506, in check_call
retcode = call(*popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 493, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
I'd stopped at same error. Finally, I found my stupid mistake that I forgot to add PATH of jar command. The following command is needed in addition to the java set up guide in Chromium official build instructions.
sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_xx/bin/jar 50000
You must install the depot_tools package. Try this commands;
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=$PATH:/path/to/depot_tools