How to build package with uclibc with bitbake - Bitbake raises MultipleMatches exception while trying to build uclibc - linux

I am trying to build uclibc for arm7a architecture, via bitbake, but I get the following output
user#ubuntu:~/stuff$ bitbake -b uclibc
ERROR: Unable to match uclibc (19 matches found):
ERROR: /home/user/stuff/openembedded/recipes/uclibc/uclibc-initial_git.bb
ERROR: /home/user/stuff/openembedded/recipes/uclibc/uclibc_0.9.30.bb
ERROR: /home/user/stuff/openembedded/recipes/uclibc/uclibc_0.9.30.2.bb
ERROR: /home/user/stuff/openembedded/recipes/uclibc/bfin-uclibc_svn.bb
ERROR: /home/user/stuff/openembedded/recipes/uclibc/uclibc_0.9.31.bb
ERROR: /home/user/stuff/openembedded/recipes/uclibc/uclibc-initial_0.9.30.bb
ERROR: /home/user/stuff/openembedded/recipes/uclibc/uclibc_0.9.29.bb
ERROR: /home/user/stuff/openembedded/recipes/uclibc/uclibc-initial_0.9.30.2.bb
ERROR: /home/user/stuff/openembedded/recipes/uclibc/uclibc-initial_0.9.31.bb
ERROR: /home/user/stuff/openembedded/recipes/uclibc/uclibc-initial_0.9.29.bb
ERROR: /home/user/stuff/openembedded/recipes/uclibc/uclibc_git.bb
ERROR: /home/user/stuff/openembedded/recipes/uclibc/uclibc_0.9.28.bb
ERROR: /home/user/stuff/openembedded/recipes/uclibc/uclibc_0.9.30.1.bb
ERROR: /home/user/stuff/openembedded/recipes/uclibc/uclibc-initial_0.9.30.3.bb
ERROR: /home/user/stuff/openembedded/recipes/uclibc/uclibc-initial_0.9.28.bb
ERROR: /home/user/stuff/openembedded/recipes/uclibc++/uclibc++_git.bb
ERROR: /home/user/stuff/openembedded/recipes/uclibc/elf2flt_svn.bb
ERROR: /home/user/stuff/openembedded/recipes/uclibc/uclibc-initial_0.9.30.1.bb
ERROR: /home/user/stuff/openembedded/recipes/uclibc/uclibc_0.9.30.3.bb
ERROR: Command execution failed: Traceback (most recent call last):
File "/home/user/stuff/bitbake/lib/bb/command.py", line 102, in runAsyncCommand
commandmethod(self.cmds_async, self, options)
File "/home/user/stuff/bitbake/lib/bb/command.py", line 190, in buildFile
command.cooker.buildFile(bfile, task)
File "/home/user/stuff/bitbake/lib/bb/cooker.py", line 608, in buildFile
buildfile = self.matchFile(fn)
File "/home/user/stuff/bitbake/lib/bb/cooker.py", line 591, in matchFile
raise MultipleMatches
MultipleMatches
I am trying also to build a specific recipe (Am I doing it wrong?) but I get
user#ubuntu:~/stuff$ bitbake -b /home/user/stuff/openembedded/recipes/uclibc/uclibc_0.9.31.bb
ERROR: Command execution failed: Traceback (most recent call last):
File "/home/user/stuff/bitbake/lib/bb/command.py", line 102, in runAsyncCommand
commandmethod(self.cmds_async, self, options)
File "/home/user/stuff/bitbake/lib/bb/command.py", line 190, in buildFile
command.cooker.buildFile(bfile, task)
File "/home/user/stuff/bitbake/lib/bb/cooker.py", line 618, in buildFile
self.status.add_from_recipeinfo(vfn, info)
File "/home/user/stuff/bitbake/lib/bb/cache.py", line 583, in add_from_recipeinfo
for provide in info.provides:
TypeError: 'NoneType' object is not iterable
Thanks

I answer to my own question because of the lack of informations I've found searching for this argument. I hope it is not inappropriate. So..
First of all, bitbake should be called without -b option in order to calculate package dependencies
bitbake package
Then, there's no need to build uclibc directly because bitbake builds it automatically when necessary (for that you have to use bitbake without -b option). At this point it is not finished, because for my version of Angstrom distribution (2010.x) uclibc is not default library built by bitbake but eglibc is built. So you have to add to your stuff/build/conf/local.conf this line: ANGSTROMLIBC = "uclibc", found at this faq
In the end you can find all ipk packages and sources at your stuff/tmp/deploy/uclibc.

Related

How to Install playwright dependency in elastic beanstalk .ebextensions

I need to download playwright dependency in my Elastic beanstalk. So, I am using this command in .ebextensions
.ebextensions/01_install_playwright.config
container_commands:
install_playwright:
command: "npx playwright install --with-deps chromium"
But it's getting error out. Here are the logs from cfn-init.log -
2022-09-29 05:16:17,188 [INFO] -----------------------Starting build-----------------------
2022-09-29 05:16:17,194 [INFO] Running configSets: Infra-EmbeddedPostBuild
2022-09-29 05:16:17,197 [INFO] Running configSet Infra-EmbeddedPostBuild
2022-09-29 05:16:17,200 [INFO] Running config postbuild_0_test_worker
2022-09-29 05:16:18,246 [ERROR] Command install_playwright (npx playwright install --with-deps chromium) failed
2022-09-29 05:16:18,246 [ERROR] Error encountered during build of postbuild_0_test_worker: Command install_playwright failed
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 576, in run_config
CloudFormationCarpenter(config, self._auth_config).build(worklog)
File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 276, in build
self._config.commands)
File "/usr/lib/python3.7/site-packages/cfnbootstrap/command_tool.py", line 127, in apply
raise ToolError(u"Command %s failed" % name)
cfnbootstrap.construction_errors.ToolError: Command install_playwright failed
2022-09-29 05:16:18,247 [ERROR] -----------------------BUILD FAILED!------------------------
2022-09-29 05:16:18,247 [ERROR] Unhandled exception during build: Command install_playwright failed
Traceback (most recent call last):
File "/opt/aws/bin/cfn-init", line 176, in <module>
worklog.build(metadata, configSets)
File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 137, in build
Contractor(metadata).build(configSets, self)
File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 564, in build
self.run_config(config, worklog)
File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 576, in run_config
CloudFormationCarpenter(config, self._auth_config).build(worklog)
File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 276, in build
self._config.commands)
File "/usr/lib/python3.7/site-packages/cfnbootstrap/command_tool.py", line 127, in apply
raise ToolError(u"Command %s failed" % name)
cfnbootstrap.construction_errors.ToolError: Command install_playwright failed
Am I missing something or any suggestion on how to run the npx command on .ebextensions.
The reason I am doing this is because of invalid character in Chinese language website screenshot and installing dependency is recommended in this thread for Amazon Linux, Ubuntu etc.
I also tried to SSH into EB to install manually, but that’s also failing.
I am not familiar with Playwright, but see it has a chromium dependency and you are using AWS Beanstalk. Chromium needs a few extra libraries to install correctly.
See this gist. It becomes an easier script if you are using AWS Linux 2, but past revisions of the script were for Linux1 (likely out of date at this point). In you SSH session there is an error about not having apt-get, and the Linux2 version of the script is handled solely with yum. This gist was created for Puppeteer, which also needed chromium, and it was chromium that needed a bunch of extra libraries.
On other thing to note is liberation-sans-fonts for my project. If there is another font/language library that includes your invalid Chinese character, and maybe you can handle it that way? See the command at the bottom of the file that refreshes the font cache. That's just an idea, the chromium libs are first concern.

Build Error python library, version issue: cannot find my_package.version

I have setup.cfg, I am able to build when I specify specific version inside setup.cfg:
[metadata]
version = 0.0.1
But when I specify inside version as variable inside setup.cfg: I am getting build error: unable to find my_package
version = attr: my_package.VERSION
Error messages:
Traceback (most recent call last):
File "/tmp/build-env-_y8qqaje/lib/python3.10/site-packages/setuptools/config.py", line 419, in _parse_attr
return getattr(StaticModule(module_name), attr_name)
File "/tmp/build-env-_y8qqaje/lib/python3.10/site-packages/setuptools/config.py", line 27, in __init__
with open(spec.origin) as strm:
AttributeError: 'NoneType' object has no attribute 'origin'
During handling of the above exception, another exception occurred:
....
ModuleNotFoundError: No module named 'my_package'
Above is my project structure:
Any help would be helpful, this is my first time building a package

enable BUILD_PYTHON in CMake

I was trying to use Openpose from windows using https://github.com/CMU-Perceptual-Computing-Lab/openpose. But while I run a .py file it returned an error message
Error: OpenPose library could not be found. Did you enable `BUILD_PYTHON` in CMake and have this Python script in the right folder?
No module named 'pyopenpose'
An exception has occurred, use %tb to see the full traceback.
Traceback (most recent call last):
File "C:\Users\Santanu\Desktop\openpose\python\01_body_from_image.py", line 19, in <module>
raise e
File "C:\Users\Santanu\Desktop\openpose\python\01_body_from_image.py", line 16, in <module>
import pyopenpose as op
ModuleNotFoundError: No module named 'pyopenpose'
During handling of the above exception, another exception occurred:
SystemExit: -1
It has suggested from the error text to enable 'BUILD_PYTHON' in CMake and also said here. But I have never used CMake before. How to enable 'BUILD_PYTHON' in CMake?

TypeError while running scons tests for Galsim installation on macOS 10.12 with anaconda

I am trying to install Galsim by following the instructions on https://github.com/GalSim-developers/GalSim/blob/master/INSTALL.md#0-overall-summary but keep getting the following typeerror when I reach the scons tests portion.
Starting python tests...
scons: *** [tests/tests.log] TypeError : write() argument must be str, not bytes
Traceback (most recent call last):
File "/Users/lorena/anaconda3/lib/scons-3.0.0/SCons/Action.py", line 1197, in execute
result = self.execfunction(target=target, source=rsources, env=env)
File "/Users/lorena/git/GalSim/tests/SConscript", line 81, in run_tests
sys.stdout.write(buf)
TypeError: write() argument must be str, not bytes
scons: building terminated because of errors.
I'm using python 3.6.

Error with Poky bs on vserver

i try to build an Image with yoctos poky on my vserver (Ubuntu 14.04 LTS minimal - Vserver 64bit)
With my own pc with the same ubuntu version i don't have any problems to build the image, but on my vserver i get a lot of errors like this one:
ERROR: Execution of event handler 'run_buildstats' failed
Traceback (most recent call last):
File "run_buildstats(e)", line 85, in run_buildstats(e=<bb.build.TaskSucceeded object at 0x7f5f79df6c10>)
File "buildstats.bbclass", line 2, in get_device(e=<bb.build.TaskSucceeded object at 0x7f5f79df6c10>)
IOError: [Errno 2] No such file or directory: '/home/yocto/yocto/poky/build-hd/tmp/buildstats//.device'
What can i do?
It is not your system error.but it was generate by bitbake and somewhere python scripting execution failed by bitbake.

Resources