Unable to setup WebRTC native android code on ubuntu instance - webrtc

Followed steps provided in this web page https://webrtc.org/native-code/android/
When I executed command "ninja -C out/Debug AppRTCMobile" I got following response
ninja: Entering directory `out/Debug'
ninja: fatal: chdir to 'out/Debug' - No such file or directory
I got stuck here and need help to continue in executing the next steps to complete the code setup.
Ubuntu version - 16.04.2
I have followed the same procedure once again to setup the code. This time I got a new error
Steps:
-> fetch --nohooks webrtc_android
-> gclient sync
-> gn gen out/Debug --args='target_os="android" target_cpu="arm"'
-> ninja -C out/Debug
ninja: Entering directory `out/Debug'
[1/8508] ACTION
//base:android_runtime_jni_headers__jni_Runtime(//build/toolchain/android:android_clang_arm)
FAILED: gen/android_runtime_jni_headers/base/jni/Runtime_jni.h python
../../base/android/jni_generator/jni_generator.py --depfile
gen/base/android_runtime_jni_headers__jni_Runtime.d --jar_file
../../third_party/android_tools/sdk/platforms/android-26/android.jar
--input_file java/lang/Runtime.class --ptr_type=long --output_dir gen/android_runtime_jni_headers/base/jni --includes
../../../../../../base/android/jni_generator/jni_generator_helper.h
--native_exports_optional
Traceback (most recent call last):
File "../../base/android/jni_generator/jni_generator.py", line 1428,
in
sys.exit(main(sys.argv))
File "../../base/android/jni_generator/jni_generator.py", line 1421,
in main
GenerateJNIHeader(input_file, output_file, options) File "../../base/android/jni_generator/jni_generator.py", line 1326, in
GenerateJNIHeader
jni_from_javap = JNIFromJavaP.CreateFromClass(input_file, options)
File "../../base/android/jni_generator/jni_generator.py", line 662,
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
[3/8508] CC obj/third_party/boringssl/boringssl/v3_ncons.o
ninja: build stopped: subcommand failed.
Someone please help me in resolving this issue.

You have to generate the projects using GN before trying to compile. You have the instructions here:
https://webrtc.org/native-code/android/

Related

Problem with building Chromium for Windows on Mac host

I am trying to cross build chromium on mac host. I have followed the instructions from https://chromium.googlesource.com/chromium/src.git/+/HEAD/docs/win_cross.md and everything seems fine. But when I run autoninja -C out/win chrome I face with the following error. Any help would be appreciated.
ninja: Entering directory `out/win'
[0/1] Regenerating ninja files
ERROR at //build/config/win/visual_studio_version.gni:27:7: Script returned non-zero exit code.
exec_script("../../vs_toolchain.py", [ "get_toolchain_dir" ], "scope")
^----------
Current dir: /chromium/src/out/win/
Command: python3 /chromium/src/build/vs_toolchain.py get_toolchain_dir
Returned 1.
stderr:
Traceback (most recent call last):
File "/chromium/src/build/vs_toolchain.py", line 587, in <module>
sys.exit(main())
File "/chromium/src/build/vs_toolchain.py", line 583, in main
return commands[sys.argv[1]](*sys.argv[2:])
File "/chromium/src/build/vs_toolchain.py", line 561, in GetToolchainDir
win_sdk_dir = SetEnvironmentAndGetSDKDir()
File "/chromium/src/build/vs_toolchain.py", line 554, in SetEnvironmentAndGetSDKDir
return NormalizePath(os.environ['WINDOWSSDKDIR'])
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/os.py", line 679, in __getitem__
raise KeyError(key) from None
KeyError: 'WINDOWSSDKDIR'
See //third_party/angle/gni/angle.gni:35:5: whence it was imported.
import("//build/config/win/visual_studio_version.gni")
^----------------------------------------------------
See //chrome/elevation_service/BUILD.gn:7:1: whence it was imported.
import("//build/toolchain/win/midl.gni")
^--------------------------------------
See //BUILD.gn:660:7: which caused the file to be included.
"//chrome/elevation_service:elevation_service_unittests",
^-------------------------------------------------------
FAILED: build.ninja
../../buildtools/mac/gn --root=../.. -q --ide=vs --regeneration gen .
ninja: error: rebuilding 'build.ninja': subcommand failed

CalledProcessError while installing Tensorflow using Bazel

I am trying to install Tensorflow from source using Bazel on Raspberry pi. I am following the official documentation as given here. When I run the ./configure in Tensorflow directory after completing all the steps written for Bazel, I get the following error
/home/cvit/bin/bazel: line 88: /home/cvit/.bazel/bin/bazel-real: cannot execute binary file: Exec format error
/home/cvit/bin/bazel: line 88: /home/cvit/.bazel/bin/bazel-real: Success
Traceback (most recent call last):
File "./configure.py", line 1552, in <module>
main()
File "./configure.py", line 1432, in main
check_bazel_version('0.15.0')
File "./configure.py", line 450, in check_bazel_version
curr_version = run_shell(['bazel', '--batch', '--bazelrc=/dev/null', 'version'])
File "./configure.py", line 141, in run_shell
output = subprocess.check_output(cmd)
File "/usr/lib/python2.7/subprocess.py", line 223, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['bazel', '--batch', '--bazelrc=/dev/null', 'version']' returned non-zero exit status 1
I didn't put the user flag in the bazel installation. So, I think this might be bazelrc error so I tried to set $PATH=$BAZEL/bin but nothing happened.
Please give any suggestion !!
Probably the problem is that the non appropriate version of bazel is installed.
Run bazel version in the tensorflow directory, and see if there is an error.
If there is a problem with bazel version, then check out the .baselversion file, and if it contains a version that isn't installable with apt, then dowload the installer from https://github.com/bazelbuild/bazel/releases then install it, else install with apt.
After that everything should work fine.

Tensorflow build error : Cannot find cudnn.h under ~

I am trying to build tensorflow r1.12 using bazel 0.15 on Redhat 7.5 ppc64le.
I am stuck with the following error.
[u0017649#sys-97184 tensorflow]$ bazel build --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package
...
ERROR: error loading package 'tensorflow/tools/pip_package': Encountered error while reading extension file 'cuda/build_defs.bzl': no such package
'#local_config_cuda//cuda': Traceback (most recent call last):
File
"/home/u0017649/files/tensorflow/third_party/gpus/cuda_configure.bzl", line 1447
_create_local_cuda_repository(repository_ctx)
File
"/home/u0017649/files/tensorflow/third_party/gpus/cuda_configure.bzl", line 1187, in _create_local_cuda_repository
_get_cuda_config(repository_ctx)
File
"/home/u0017649/files/tensorflow/third_party/gpus/cuda_configure.bzl", line 911, in _get_cuda_config
_cudnn_version(repository_ctx, cudnn_install_base..., ...)
File
"/home/u0017649/files/tensorflow/third_party/gpus/cuda_configure.bzl", line 582, in _cudnn_version
_find_cudnn_header_dir(repository_ctx, cudnn_install_base...)
File
"/home/u0017649/files/tensorflow/third_party/gpus/cuda_configure.bzl", line 869, in _find_cudnn_header_dir
auto_configure_fail(("Cannot find cudnn.h under %s" ...))
File
"/home/u0017649/files/tensorflow/third_party/gpus/cuda_configure.bzl", line 317, in auto_configure_fail
fail(("\n%sCuda Configuration Error:%...)))
Cuda Configuration Error: Cannot find cudnn.h under /usr/local/cuda-9.2/targets/ppc64le-linux/lib
I do have a soft link for cudnn.h under /usr/local/cuda-9.2/targets/ppc64le-linux/lib as below.
[u0017649#sys-97184 tensorflow]$ ls -l /usr/local/cuda-9.2/targets/ppc64le-linux/lib/cudnn.h
lrwxrwxrwx. 1 root root 57 Feb 20 10:15 /usr/local/cuda-9.2/targets/ppc64le-linux/lib/cudnn.h -> /usr/local/cuda-9.2/targets/ppc64le-linux/include/cudnn.h
Any comments, pls ?
After reading tensorflow/third_party/gpus/cuda_configure.bzl, I could solve this by the following.
$ sudo ln -sf /usr/local/cuda-9.2/targets/ppc64le-linux/include/cudnn.h /usr/include/cudnn.h

Buildroot - installing of the "pytest-runner" package fails

Buildroot version: 2017-02
I need to integrate python package 'chardet' to my build. The chardet require the 'pytest-runner'package.
Case 1
The 'chardet' is marked to be integrated into build. The 'pytest-runner' is not pre-feteched and the 'chardet' package updated to the latest version (3.0.3) before the build with the scanpypi script. When the make is run the following error message is shown indicating problems with the 'pytest-runner':
>>> python-chardet 3.0.3 Building
(cd /home/nnnn/bldr_lab/buildroot/output/build/python-chardet-3.0.3//;
PATH="/home/nnnn/bldr_lab/buildroot/output/host/bin:/home/nnnn/bldr_lab
/buildroot/output/host/sbin:/home/nnnn/bldr_lab/buildroot/output/host/usr
/bin:/home/nnnn/bldr_lab/buildroot/output/host/usr/sbin:/home/nnnn/x-tools
/arm-cortex_a8-linux-gnueabihf/bin:/home/nnnn/bin:/home/nnnn/.local
/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr
/games:/usr/local/games" PYTHONPATH="/home/nnnn/bldr_lab/buildroot/output
/target/usr/lib/python2.7/sysconfigdata/:/home/nnnn/bldr_lab/buildroot
/output/target/usr/lib/python2.7/site-packages/" _python_sysroot=/home
/nnnn/bldr_lab/buildroot/output/host/usr/arm-buildroot-linux-gnueabihf
/sysroot _python_prefix=/usr _python_exec_prefix=/usr /home/nnnn/bldr_lab
/buildroot/output/host/usr/bin/python setup.py build )
Download error on https://pypi.python.org/simple/pytest-runner/: unknown
url type: https -- Some packages may not be found!
Couldn't find index page for 'pytest-runner' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: unknown url type: https
-- Some packages may not be found!
No local packages or download links found for pytest-runner
Traceback (most recent call last):
File "setup.py", line 52, in <module>
['chardetect = chardet.cli.chardetect:main']})
File "/home/nnnn/bldr_lab/buildroot/output/host/usr/lib/python2.7
/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 268, in
__init__
File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 313, in
fetch_build_eggs
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 846, in resolve
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 1091, in best_match
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 1103, in obtain
File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 380, in fetch_build_egg
File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 633, in easy_install
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('pytest-runner')
package/pkg-generic.mk:216: recipe for target '/home/nnnn/bldr_lab
/buildroot/output/build/python-chardet-3.0.3/.stamp_built' failed
make[1]: *** [/home/nnnn/bldr_lab/buildroot/output/build/python-chardet-
3.0.3/.stamp_built] Error 1
Makefile:79: recipe for target '_all' failed
make: *** [_all] Error 2
case 2 When I try to create the 'pytest-runner' with the scanpypi the following error message is shown:
nnnn#xxxx:~/bldr2/buildroot$ ./support/scripts/scanpypi pytest-runner -o package
buildroot package name for pytest-runner: python-pytest-runner
Package: python-pytest-runner
Fetching package pytest-runner
Downloading package pytest-runner from https://pypi.python.org/packages/9e/4d/08889e5e27a9f5d6096b9ad257f4dea1faabb03c5ded8f665ead448f5d8a/pytest-runner-2.11.1.tar.gz...
Error: Could not install package pytest-runner
When I download the 'pytest-runner-2.11.1.tar.gz' from pypi manually it looks as normal pypi tar file. Any idea what is root cause and how to solve the problem?
-timo-

Unable to run ckanext-qa extension

I'm using CKAN as my open data portal and have successfully installed CKAN Quality Assurance Extension according to instructions at https://github.com/ckan/ckanext-qa/. I'm currently facing some problem with this step:
This step can be performed by running the associated paster command
from the ckanext-qa directory.
$ paster qa update|clean [package name/id] --config=<path to ckan config file>
I am getting this error:
/usr/lib/ckan/default/src/ckanext-qa-master$ paster qa update|clean --config=/etc/ckan/default
No command 'clean' found, did you mean:
Command 'uclean' from package 'svn-buildpackage' (universe)
Command 'clear' from package 'ncurses-bin' (main)
clean: command not found
Traceback (most recent call last):
File "/usr/lib/ckan/default/bin/paster", line 9, in <module>
load_entry_point('PasteScript==1.7.5', 'console_scripts', 'paster')()
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 104, in run
invoke(command, command_name, options, args[1:])
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 143, in invoke
exit_code = runner.run(args)
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 238, in run
result = self.command()
File "/usr/lib/ckan/default/src/ckanext-qa-master/ckanext/qa/commands.py", line 50, in command
self._load_config()
File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 91, in _load_config
conf = self._get_config()
File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 86, in _get_config
raise AssertionError('Config filename %r does not exist.' % self.filename)
AssertionError: Config filename '/usr/lib/ckan/default/src/ckanext-qa-master/development.ini' does not exist.
My ckanext-qa directory is /usr/lib/ckan/default/src/ckanext-qa-master and my ckan config file is located at /etc/ckan/default. Did I run the command correctly?
The command that you have run has 2 mistakes in it. First of all "update|clean" stands for "update or clean". Also, you didn't the specify the correct config file path. See the correct update and clean commands below:
paster qa update --config=/etc/ckan/default/development.ini
paster qa clean --config=/etc/ckan/default/development.ini
Additionally, there are 2 ways to run extension specific paster commands:
Navigate to ckanext-qa directory and execute the command:
paster qa update --config=/etc/ckan/default/development.ini
Explicitly specify the extension name and then run the command
paster --plugin=ckanext-qa qa update --config=/etc/ckan/default/development.ini