Buildozer failed to execute the last command in Kivy - ubuntu-16.04

I'm making a simple apk using buildozer in kivy.
I tried re-installing two times android sdk ndk, but sdkmanager tools are not automatically installed.
# Apache ANT found at /home/shivam/.buildozer/android/platform/apache-ant-1.9.4
# Android SDK found at /home/shivam/.buildozer/android/platform/android-sdk
# Android NDK found at /home/shivam/.buildozer/android/platform/android-ndk-r17c
# Read available permissions from api-versions.xml
# Check application requirements
# Check garden requirements
# Compile platform
# Run '/usr/bin/python -m pythonforandroid.toolchain create --dist_name=firstapp --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/shivam/.buildozer/android/platform/build" --ndk-api=21'
# Cwd /home/shivam/.buildozer/android/platform/python-for-android
[INFO]: Will compile for the following archs: armeabi-v7a
[INFO]: Found Android API target in $ANDROIDAPI: 27
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/shivam/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1073, in
main()
File "/home/shivam/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1067, in main
ToolchainCL()
File "/home/shivam/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 576, in
__init__
getattr(self, args.subparser_name.replace('-', '_'))(args)
File "/home/shivam/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 144, in
wrapper_func
user_ndk_api=self.ndk_api)
File "pythonforandroid/build.py", line 236, in prepare_build_environment
avdmanager = sh.Command(join(sdk_dir, 'tools', 'bin', 'avdmanager'))
File "/home/shivam/.local/lib/python2.7/site-packages/sh.py", line 1202, in __init__
raise CommandNotFound(path)
sh.CommandNotFound: /home/shivam/.buildozer/android/platform/android-sdk/tools/bin/avdmanager
# Command failed: /usr/bin/python -m pythonforandroid.toolchain create --dist_name=firstapp --bootstrap=sdl2 –
requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-
dir="/home/shivam/.buildozer/android/platform/build" --ndk-api=21
#
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2

Related

Compile failed in VSCode for PlatformIO (Marlin) for 3D Printer TwoTrees Sapphire Plus

I have installed VSCode v. 1.55.2 recently downloaded.
Installed PlatformIO plugin v. 2.3.2.
Installed Auto Build Marlin plugin v. 2.1.32
When I open a fresh downloaded Marlin FW v. 2.0.7, edit it
according to this guide on the bespoke changes needed for the Sapphire Plus printer:
https://www.youtube.com/watch?v=GbHsNCDrTpY
and try to compile it for my MKS Robin Nano board (env: mks_robin_nano35) I get errors:
Verbose mode can be enabled via `-v, --verbose` option
In file included from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfig.h:34:0,
from buildroot/share/PlatformIO/scripts/common-dependencies.h:31:
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../pins/pins.h:525:12: fatal error: stm32f1/pins_MKS_ROBIN_NANO.h: No such file or directory
#include "stm32f1/pins_MKS_ROBIN_NANO.h" // STM32F1 env:mks_robin_nano35
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
CalledProcessError: Command 'arm-none-eabi-g++.exe -DTARGET_STM32F1 -D__MARLIN_FIRMWARE__ -DHAVE_SW_SERIAL -DMCU_STM32F103VE -DSS_TIMER=4 -D__MARLIN_DEPS__ -w -dM -E -x c++ buildroot/share/PlatformIO/scripts/common-dependencies.h' returned non-zero exit status 1.:
File "C:\Users\skjor\.platformio\penv\Lib\site-packages\platformio\builder\main.py", line 175:
env.SConscript(item, exports="env")
File "C:\Users\skjor\.platformio\packages\tool-scons\scons-local-4.1.0\SCons\Script\SConscript.py", line 591:
return _SConscript(self.fs, *files, **subst_kw)
File "C:\Users\skjor\.platformio\packages\tool-scons\scons-local-4.1.0\SCons\Script\SConscript.py", line 280:
exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
File "C:\Users\skjor\OneDrive\Documents\IT\_3D_Printer\_TwoTrees Sapphire Plus\Firmware\Marlin-2.0.x_SapphirePlus_FromScratch_AutoAlignZ_FromVideoAuroraTech_ColorTouchscreen\buildroot\share\PlatformIO\scripts\common-dependencies.py", line 286:
apply_features_config()
File "C:\Users\skjor\OneDrive\Documents\IT\_3D_Printer\_TwoTrees Sapphire Plus\Firmware\Marlin-2.0.x_SapphirePlus_FromScratch_AutoAlignZ_FromVideoAuroraTech_ColorTouchscreen\buildroot\share\PlatformIO\scripts\common-dependencies.py", line 118:
if not env.MarlinFeatureIsEnabled(feature):
File "C:\Users\skjor\.platformio\packages\tool-scons\scons-local-4.1.0\SCons\Util.py", line 658:
return self.method(*nargs, **kwargs)
File "C:\Users\skjor\OneDrive\Documents\IT\_3D_Printer\_TwoTrees Sapphire Plus\Firmware\Marlin-2.0.x_SapphirePlus_FromScratch_AutoAlignZ_FromVideoAuroraTech_ColorTouchscreen\buildroot\share\PlatformIO\scripts\common-dependencies.py", line 262:
load_marlin_features()
File "C:\Users\skjor\OneDrive\Documents\IT\_3D_Printer\_TwoTrees Sapphire Plus\Firmware\Marlin-2.0.x_SapphirePlus_FromScratch_AutoAlignZ_FromVideoAuroraTech_ColorTouchscreen\buildroot\share\PlatformIO\scripts\common-dependencies.py", line 250:
define_list = subprocess.check_output(cmd, shell=True).splitlines()
File "C:\Users\skjor\.platformio\python3\lib\subprocess.py", line 424:
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "C:\Users\skjor\.platformio\python3\lib\subprocess.py", line 528:
raise CalledProcessError(retcode, process.args,
Can anyone help. No help from the supplier TwoTrees.
try it without the underscores and spaces, also maybe try shortening the location?
C:\Users\skjor\OneDrive\Documents\IT\_3D_Printer\_TwoTrees Sapphire Plus\Firmware\Marlin-2.0.x_SapphirePlus_FromScratch_AutoAlignZ_FromVideoAuroraTech_ColorTouchscreen\buildroot\share\PlatformIO\scripts
to maybe
C:\MarlinFirmare\SapphirePlus\buildroot\share\PlatformIO\scripts

How Can I Solve "Failed To Source Bitbake" With Xilinx Petalinux SDK

I am running Ubuntu 16.04 with Xilinx Petalinux 2018.03 SDK. After a number of successful compilations I am now facing this error
$ petalinux-build
[INFO] building project
[INFO] sourcing bitbake
ERROR: Failed to source bitbake
ERROR: Failed to build project
How can I solved this issue?
Another reason to get the errors "ERROR: Failed to source bitbake" as well as "ERROR: Failed to build project" is a possible upgrade of Python on the build machine. The Petalinux SDK requires python v2 (>= 2.7.3) for the 2018.3 edition.
You can check under [YOUR_PROJECT]/build/build.log and you might see a log similar to this one below:
[INFO] building project
[INFO] sourcing bitbake
SDK environment now set up; additionally you may now run devtool to perform development tasks.
Run devtool --help for further details.
OpenEmbedded requires 'python' to be python v2 (>= 2.7.3), not python v3.
Please set up python v2 as your default 'python' interpreter.
ERROR: Failed to source bitbake
ERROR: Failed to build project
To remedy this issue remove the symbolic link under /usr/bin and make sure to create a new one that is pointing to Python 2.7:
sudo rm /usr/bin/python
sudo ln -s /usr/bin/python2.7 /usr/bin/python
First you need to investigate the error a little further, do this:
source /opt/pkg/petalinux/2018.3/settings.sh
It will return something similar to this below:
PetaLinux environment set to '/opt/pkg/petalinux/2018.3'
INFO: Checking free disk space
INFO: Checking installed tools
INFO: Checking installed development libraries
INFO: Checking network and other services
Source the environment setup:
source /opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/environment-setup-aarch64-xilinx-linux
followed by:
devtool --help
In my case I can see more about the actual error:
NOTE: Starting bitbake server...
ERROR: Unable to start bitbake server
ERROR: Last 10 lines of server log for this session (/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/bitbake-cookerdaemon.log):
Traceback (most recent call last):
File "/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/daemonize.py", line 77, in createDaemon
function()
File "/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/server/process.py", line 433, in _startServer
self.cooker = bb.cooker.BBCooker(self.configuration, self.featureset)
File "/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/cooker.py", line 178, in __init__
self.configwatcher = pyinotify.WatchManager()
File "/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/layers/core/bitbake/lib/pyinotify.py", line 1764, in __init__
raise OSError(err % self._inotify_wrapper.str_errno())
OSError: Cannot initialize new instance of inotify, Errno=Too many open files (EMFILE)
ERROR: Unable to start bitbake server
ERROR: Last 10 lines of server log for this session (/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/bitbake-cookerdaemon.log):
Traceback (most recent call last):
File "/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/daemonize.py", line 77, in createDaemon
function()
File "/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/server/process.py", line 433, in _startServer
self.cooker = bb.cooker.BBCooker(self.configuration, self.featureset)
File "/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/cooker.py", line 178, in __init__
self.configwatcher = pyinotify.WatchManager()
File "/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/layers/core/bitbake/lib/pyinotify.py", line 1764, in __init__
raise OSError(err % self._inotify_wrapper.str_errno())
OSError: Cannot initialize new instance of inotify, **Errno=Too many open files (EMFILE)**
This is pointing to the /proc/sys/fs/inotify/max_user_instances that need to be increased. In my case I went from 128 to 256 by doing this:
sudo su
echo 256 > /proc/sys/fs/inotify/max_user_instances
You need to become root with "su" and change the mac_user_instances.

bitbake-layers add-layer meta-python meta-raspberrypi failed

I have a Raspberry 4 model B and was trying to build Yocoto linux from Ubuntu for installation. I was following https://medium.com/#shantanoodesai/run-docker-on-a-raspberry-pi-4-with-yocto-project-551d6b615c0b instructions. At step
bitbake-layers add-layer ../layers/meta-openembedded/meta-python
bitbake-layers add-layer ../layers/meta-raspberrypi
I encountered the following errors
pi#raspberrypi:~/Yocto/RaspberryPi/build $ bitbake-layers add-layer ../layers/meta-openembedded/meta-python
NOTE: Starting bitbake server...
Traceback (most recent call last):
File "/home/pi/Yocto/RaspberryPi/layers/poky/bitbake/bin/bitbake-layers", line 93, in <module>
ret = main()
File "/home/pi/Yocto/RaspberryPi/layers/poky/bitbake/bin/bitbake-layers", line 61, in main
tinfoil.prepare(True)
File "/home/pi/Yocto/RaspberryPi/layers/poky/bitbake/lib/bb/tinfoil.py", line 408, in prepare
self.run_command('parseConfiguration')
File "/home/pi/Yocto/RaspberryPi/layers/poky/bitbake/lib/bb/tinfoil.py", line 466, in run_command
raise TinfoilCommandFailed(result[1])
bb.tinfoil.TinfoilCommandFailed: Traceback (most recent call last):
File "/home/pi/Yocto/RaspberryPi/layers/poky/bitbake/lib/bb/command.py", line 74, in runCommand
result = command_method(self, commandline)
File "/home/pi/Yocto/RaspberryPi/layers/poky/bitbake/lib/bb/command.py", line 275, in parseConfiguration
command.cooker.parseConfiguration()
File "/home/pi/Yocto/RaspberryPi/layers/poky/bitbake/lib/bb/cooker.py", line 427, in parseConfiguration
self.handleCollections(self.data.getVar("BBFILE_COLLECTIONS"))
File "/home/pi/Yocto/RaspberryPi/layers/poky/bitbake/lib/bb/cooker.py", line 1225, in handleCollections
raise CollectionError("Errors during parsing layer configuration")
bb.cooker.CollectionError: Errors during parsing layer configuration
pi#raspberrypi:~/Yocto/RaspberryPi/build $ bitbake-layers add-layer ../layers/meta-raspberrypi
NOTE: Starting bitbake server...
Traceback (most recent call last):
File "/home/pi/Yocto/RaspberryPi/layers/poky/bitbake/bin/bitbake-layers", line 93, in <module>
ret = main()
File "/home/pi/Yocto/RaspberryPi/layers/poky/bitbake/bin/bitbake-layers", line 61, in main
tinfoil.prepare(True)
File "/home/pi/Yocto/RaspberryPi/layers/poky/bitbake/lib/bb/tinfoil.py", line 408, in prepare
self.run_command('parseConfiguration')
File "/home/pi/Yocto/RaspberryPi/layers/poky/bitbake/lib/bb/tinfoil.py", line 466, in run_command
raise TinfoilCommandFailed(result[1])
bb.tinfoil.TinfoilCommandFailed: Traceback (most recent call last):
File "/home/pi/Yocto/RaspberryPi/layers/poky/bitbake/lib/bb/command.py", line 74, in runCommand
result = command_method(self, commandline)
File "/home/pi/Yocto/RaspberryPi/layers/poky/bitbake/lib/bb/command.py", line 275, in parseConfiguration
command.cooker.parseConfiguration()
File "/home/pi/Yocto/RaspberryPi/layers/poky/bitbake/lib/bb/cooker.py", line 427, in parseConfiguration
self.handleCollections(self.data.getVar("BBFILE_COLLECTIONS"))
File "/home/pi/Yocto/RaspberryPi/layers/poky/bitbake/lib/bb/cooker.py", line 1225, in handleCollections
raise CollectionError("Errors during parsing layer configuration")
bb.cooker.CollectionError: Errors during parsing layer configuration
Can anyone advise what should be fixed?
my gcc-multilib install also failed
sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsdl1.2-dev xterm python
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'git' instead of 'git-core'
Package gcc-multilib is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'gcc-multilib' has no installation candidate
I think there is an issue with bitbake-layers tool in warrior release here, so an alternative is to try to open conf/bblayers.conf file in an editor and delete the last entry/line ( probably one containing meta-networking ) in BBLAYERS variable and save the file. Now continue with the bitbake-layers add-layer
bitbake-layers add-layer ../layers/meta-openembedded/meta-networking
bitbake-layers add-layer ../layers/meta-openembedded/meta-python
bitbake-layers add-layer ../layers/meta-raspberrypi
Hope this helps
i got same error and solved with below methods
all layers should be on same branch. like meta-raspberripi , meta-openembedded , meta-poky should be on same zeus branch.
we can check we are on which branch by git branch.
we can mover to branch by git checkout zeus.
if you already got error their then open bblayers.conf and delete last added layers before adding new layers again (as suggested above).

#ckan PasteScript Error during CKan Migration from version 2.4 to 2.6

I'm upgrating from version 2.4 to version 2.6 using the documentation link
I'm getting the following paster error when executing the paster command
paster db upgrade -c /etc/ckan/default/production.ini
Traceback (most recent call last):
File "/usr/lib/ckan/default/bin/paster", line 7, in
from paste.script.command import run
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 54, in
dist = pkg_resources.get_distribution('PasteScript')
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 330, in get_distribution
if isinstance(dist,Requirement): dist = get_provider(dist)
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 209, in get_provider
return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 686, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 584, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: PasteScript
Any idea?
It looks like you didn't run the 'pip install' step (step 3)with an activated virtual environment. All these commands should be run with an activated virtual environment (step 1) so don't forget to do that again if you start a new terminal/shell.

Ansible error due to GMP package version on Centos6

I have a Dockerfile that builds an image based on CentOS (tag: centos6):
FROM centos
RUN rpm -iUvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
RUN yum update -y
RUN yum install ansible -y
ADD ./ansible /home/root/ansible
RUN cd /home/root/ansible;ansible-playbook -v -i hosts site.yml
Everything works fine until Docker hits the last line, then I get the following errors:
[WARNING]: The version of gmp you have installed has a known issue regarding
timing vulnerabilities when used with pycrypto. If possible, you should update
it (ie. yum update gmp).
PLAY [all] ********************************************************************
GATHERING FACTS ***************************************************************
Traceback (most recent call last):
File "/usr/bin/ansible-playbook", line 317, in <module>
sys.exit(main(sys.argv[1:]))
File "/usr/bin/ansible-playbook", line 257, in main
pb.run()
File "/usr/lib/python2.6/site-packages/ansible/playbook/__init__.py", line 319, in run
if not self._run_play(play):
File "/usr/lib/python2.6/site-packages/ansible/playbook/__init__.py", line 620, in _run_play
self._do_setup_step(play)
File "/usr/lib/python2.6/site-packages/ansible/playbook/__init__.py", line 565, in _do_setup_step
accelerate_port=play.accelerate_port,
File "/usr/lib/python2.6/site-packages/ansible/runner/__init__.py", line 204, in __init__
cmd = subprocess.Popen(['ssh','-o','ControlPersist'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "/usr/lib64/python2.6/subprocess.py", line 642, in __init__
errread, errwrite)
File "/usr/lib64/python2.6/subprocess.py", line 1234, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Stderr from the command:
package epel-release-6-8.noarch is already installed
I imagine that the cause of the error is the gmp package not being up to date.
There is a related issue on GitHub: https://github.com/ansible/ansible/issues/6941
But there doesn't seem to be any solutions at the moment ...
Any ideas ?
Thanks in advance !
My site.yml playbook:
- hosts: all
pre_tasks:
- shell: echo 'hello'
Make sure that the files site.yml and hosts are present in the directory you're adding to /home/root/ansible.
Side note, you can simplify your Dockerfile by using WORKDIR:
WORKDIR /home/root/ansible
RUN ansible-playbook -v -i hosts site.yml