bitbake rpi-test-image with MACHINE=raspberrypi3-64 failing to build on the zeus release of yocto - raspberry-pi3

I'm following the readthedocs instructions for the meta-raspberrypi layer and trying to build the rpi-test-image image for the raspberrypi3-64 machine contained in the meta-raspberrypi layer using the zeus release of yocto.
I added this to conf/local.conf:
MACHINE ??= "raspberrypi3-64"
ENABLE_UART = "1"
My bblayers.conf file looks like this:
/opt/yocto/workspace/rpi3-64-build/conf[master]☢ ☠$ cat bblayers.conf
# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
POKY_BBLAYERS_CONF_VERSION = "2"
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS ?= " \
/opt/yocto/workspace/sources/poky/meta \
/opt/yocto/workspace/sources/poky/meta-poky \
/opt/yocto/workspace/sources/poky/meta-yocto-bsp \
/opt/yocto/workspace/sources/meta-openembedded/meta-oe \
/opt/yocto/workspace/sources/meta-openembedded/meta-multimedia \
/opt/yocto/workspace/sources/meta-openembedded/meta-networking \
/opt/yocto/workspace/sources/meta-openembedded/meta-python \
/opt/yocto/workspace/sources/meta-raspberrypi \
"
I added the 4 items from meta-openembeeded as a work-around for ERROR: Nothing RPROVIDES 'bigbuckbunny-480p':
This enables the build to run but it exits with the following errors:
/opt/yocto/workspace/rpi3-64-build/conf[master]☢ ☠$ bitbake rpi-test-image
Parsing recipes: 100% |#########################################################################################################################################| Time: 0:02:49
Parsing of 2340 .bb files complete (0 cached, 2340 parsed). 3464 targets, 133 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.44.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "ubuntu-16.04"
TARGET_SYS = "aarch64-poky-linux"
MACHINE = "raspberrypi3-64"
DISTRO = "poky"
DISTRO_VERSION = "3.0.2"
TUNE_FEATURES = "aarch64 cortexa53 crc"
TARGET_FPU = ""
meta
meta-poky
meta-yocto-bsp = "zeus:74f229160c7f4037107c1dad8f0d02128c080a7e"
meta-oe
meta-multimedia
meta-networking
meta-python = "zeus:9e60d30669a2ad0598e9abf0cd15ee06b523986b"
meta-raspberrypi = "zeus:0e05098853eea77032bff9cf81955679edd2f35d"
Initialising tasks: 100% |######################################################################################################################################| Time: 0:00:06
Sstate summary: Wanted 1338 Found 0 Missed 1338 Current 0 (0% match, 0% complete)
NOTE: Executing Tasks
NOTE: Setscene tasks completed
WARNING: icu-native-64.2-r0 do_fetch: Checksum mismatch for local file /opt/yocto/cache/downloads/icu4c-64_2-src.tgz
Cleaning and trying again.
WARNING: icu-native-64.2-r0 do_fetch: Renaming /opt/yocto/cache/downloads/icu4c-64_2-src.tgz to /opt/yocto/cache/downloads/icu4c-64_2-src.tgz_bad-checksum_abb12cb25a05198ad8f4c1e6f668fa05
WARNING: icu-native-64.2-r0 do_fetch: Checksum failure encountered with download of http://download.icu-project.org/files/icu4c/64.2/icu4c-64_2-src.tgz - will attempt other sources if available
ERROR: rpi-test-image-1.0-r0 do_rootfs: Could not invoke dnf. Command '/opt/yocto/workspace/rpi3-64-build/tmp/work/raspberrypi3_64-poky-linux/rpi-test-image/1.0-r0/recipe-sysroot-native/usr/bin/dnf -v --rpmverbosity=info -y -c /opt/yocto/workspace/rpi3-64-build/tmp/work/raspberrypi3_64-poky-linux/rpi-test-image/1.0-r0/rootfs/etc/dnf/dnf.conf --setopt=reposdir=/opt/yocto/workspace/rpi3-64-build/tmp/work/raspberrypi3_64-poky-linux/rpi-test-image/1.0-r0/rootfs/etc/yum.repos.d --installroot=/opt/yocto/workspace/rpi3-64-build/tmp/work/raspberrypi3_64-poky-linux/rpi-test-image/1.0-r0/rootfs --setopt=logdir=/opt/yocto/workspace/rpi3-64-build/tmp/work/raspberrypi3_64-poky-linux/rpi-test-image/1.0-r0/temp --repofrompath=oe-repo,/opt/yocto/workspace/rpi3-64-build/tmp/work/raspberrypi3_64-poky-linux/rpi-test-image/1.0-r0/oe-rootfs-repo --nogpgcheck install psplash-raspberrypi packagegroup-core-boot packagegroup-base-extended run-postinsts packagegroup-rpi-test locale-base-en-us locale-base-en-gb' returned 1:
DNF version: 4.2.2
cachedir: /opt/yocto/workspace/rpi3-64-build/tmp/work/raspberrypi3_64-poky-linux/rpi-test-image/1.0-r0/rootfs/var/cache/dnf
Added oe-repo repo from /opt/yocto/workspace/rpi3-64-build/tmp/work/raspberrypi3_64-poky-linux/rpi-test-image/1.0-r0/oe-rootfs-repo
repo: using cache for: oe-repo
not found other for:
not found modules for:
not found deltainfo for:
not found updateinfo for:
oe-repo: using metadata from Thu 30 Apr 2020 09:25:08 PM UTC.
Last metadata expiration check: 0:00:02 ago on Thu 30 Apr 2020 09:25:11 PM UTC.
No module defaults found
--> Starting dependency resolution
--> Finished dependency resolution
Error:
Problem: package packagegroup-base-wifi-1.0-r83.raspberrypi3_64 requires wireless-regdb-static, but none of the providers can be installed
- package wireless-regdb-2019.06.03-r0.noarch conflicts with wireless-regdb-static provided by wireless-regdb-static-2019.06.03-r0.noarch
- package packagegroup-base-1.0-r83.raspberrypi3_64 requires packagegroup-base-wifi, but none of the providers can be installed
- package packagegroup-rpi-test-1.0-r0.noarch requires wireless-regdb, but none of the providers can be installed
- package packagegroup-base-extended-1.0-r83.raspberrypi3_64 requires packagegroup-base, but none of the providers can be installed
- conflicting requests
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
ERROR: Logfile of failure stored in: /opt/yocto/workspace/rpi3-64-build/tmp/work/raspberrypi3_64-poky-linux/rpi-test-image/1.0-r0/temp/log.do_rootfs.23419
ERROR: Task (/opt/yocto/workspace/sources/meta-raspberrypi/recipes-core/images/rpi-test-image.bb:do_rootfs) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3511 tasks of which 1 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
/opt/yocto/workspace/sources/meta-raspberrypi/recipes-core/images/rpi-test-image.bb:do_rootfs
Summary: There were 3 WARNING messages shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
/opt/yocto/workspace/rpi3-64-build/conf[master]☢ ☠$
I'm not even sure how to go about debugging it.
I've tried googling the warnings and error messages but was not able to find anything the might be causing the problem.
2 questions:
1: What might the problem be in this particular instance?
2: What is a good general procedure for debugging failed builds like this?
UPDATE: "bitbake core-image-base" does successfully build the image, but it is still unclear to me why "bitbake rpi-test-image" failed.

Related

Build Docker Images with Bazel targets Built

I have a (1) Dockerfile and a (2) C++ project with Bazel
I want to create a docker image that has Bazel targets pre-built within the image, so as to when I power up new containers the Bazel targets are pre-built and I just do Bazel run //hello:hello_world from the container bash.
Dockerfile
# Copy my project with Bazel files to a Docker image, and the
...
RUN bazel --output_user_root=/tmp/hello_project/bazel build //...
...
Within the execution of the Dockerfile, I get the following output which is expected
Loading:
Loading: 0 packages loaded
Analyzing: 2 targets (1 packages loaded, 0 targets configured)
Analyzing: 2 targets (11 packages loaded, 18 targets configured)
INFO: Analyzed 2 targets (15 packages loaded, 60 targets configured).
INFO: Found 2 targets...
[0 / 11] [Prepa] BazelWorkspaceStatusAction stable-status.txt
INFO: Elapsed time: 6.333s, Critical Path: 0.37s
INFO: 11 processes: 6 internal, 5 processwrapper-sandbox.
INFO: Build completed successfully, 11 total actions
INFO: Build completed successfully, 11 total actions
When I run a new container form the Docker Image built previously and then on the container I run
bazel run //hello:hello_world
Instead of using existing pre-built targets it re-builds the targets, which is not required.
Result I expect (not get): Everything is pre-built and just needs to run
INFO: Analyzed target //hello:hello_world (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target //hello:hello_world up-to-date:
bazel-bin/hello/hello_world
INFO: Elapsed time: 0.163s, Critical Path: 0.01s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Build completed successfully, 1 total action
Hello World!
Result I get: I re-builds the binaries
[root#4a6bdb57fd79 test-rc]# bazel run //hello:hello_world
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
INFO: Analyzed target //hello:hello_world (15 packages loaded, 60 targets configured).
INFO: Found 1 target...
Target //hello:hello_world up-to-date:
bazel-bin/hello/hello_world
INFO: Elapsed time: 6.255s, Critical Path: 0.38s
INFO: 7 processes: 4 internal, 3 processwrapper-sandbox.
INFO: Build completed successfully, 7 total actions
INFO: Build completed successfully, 7 total actions
Hello World!
How can I make sure, the the bazel run uses same pre-built targets and not build them again before run.
This sounds like non-determinism - in the second execution of Bazel, something is different causing a cache miss.
Some things that can cause it:
different options passed to bazel build vs. bazel test - check your .bazelrc file
actions that include VCS info or a timestamp - make sure you have rules_docker 0.22.0 or later to pick up https://github.com/bazelbuild/rules_docker/commit/2b35b2dd56f0be6cc6b8df957332a31435f6b3ce
One step to diagnose is to use the --explain=log.txt and --verbose_explanations flags to Bazel, then the log file will say why it was rebuilt. However it doesn't have much detail, just something like "a source file has changed".
If you want the power tool for this, there is a way to find out exactly why Bazel didn't get a cache hit - read https://georgi.hristozov.net/til/2020/04/20/compare-bazel-execlogs-to-find-non-deterministic-parts-of-the-build

Cannot build go_proto_library with gRPC

I'm getting started with bazel and trying to generate the protobuf code for golang for an RPC service.
When I try to build it I get the following error:
bazel-out/k8-fastbuild/bin/examples/grpc/protos/helloworld_go_proto_/examples/grpc/protos/helloworld.pb.go:229:7: undefined: grpc.ClientConnInterface
bazel-out/k8-fastbuild/bin/examples/grpc/protos/helloworld_go_proto_/examples/grpc/protos/helloworld.pb.go:233:11: undefined: grpc.SupportPackageIsVersion6
bazel-out/k8-fastbuild/bin/examples/grpc/protos/helloworld_go_proto_/examples/grpc/protos/helloworld.pb.go:243:5: undefined: grpc.ClientConnInterface
bazel-out/k8-fastbuild/bin/examples/grpc/protos/helloworld_go_proto_/examples/grpc/protos/helloworld.pb.go:246:26: undefined: grpc.ClientConnInterface
Full build log: https://app.buildbuddy.io/invocation/c3773978-22dd-44c8-b977-13967a1953b7
Here is the code: https://github.com/juanique/example-go-grpc. I'm trying to include the least possible amount of code to make that target work.
Since the BUILD file was generated by gazelle I suspect the issue is in the WORKSPACE file: https://raw.githubusercontent.com/juanique/example-go-grpc/main/WORKSPACE. I'm just doing what I found in https://github.com/bazelbuild/rules_go
UPDATE: it looks surely a version issue: https://github.com/grpc/grpc-go#compiling-error-undefined-grpcsupportpackageisversion
Not a bazel user, but after hours' test, I found your rpc version should be higher:
go_repository(
name = "org_golang_google_grpc",
- build_file_proto_mode = "disable",
importpath = "google.golang.org/grpc",
- sum = "h1:J0UbZOIrCAl+fpTOf8YLs4dJo8L/owV4LYVtAXQoPkw=",
- version = "v1.22.0",
+ sum = "h1:f+PlOh7QV4iIJkPrx5NQ7qaNGFQ3OTse67yaDHfju4E=",
+ version = "v1.41.0",
)
Then you can build it:
~/code/example-go-grpc (main*) [09:45:55]
p1gd0g$ bazel build //examples/grpc/protos:helloworld_go_proto
INFO: Analyzed target //examples/grpc/protos:helloworld_go_proto (49 packages loaded, 306 targets configured).
INFO: Found 1 target...
Target //examples/grpc/protos:helloworld_go_proto up-to-date:
bazel-bin/examples/grpc/protos/helloworld_go_proto.a
INFO: Elapsed time: 41.180s, Critical Path: 1.20s
INFO: 29 processes: 1 internal, 28 linux-sandbox.
INFO: Build completed successfully, 29 total actions
And I recommend using gazelle with go.mod to generate WORKSPACE. A demo: https://github.com/p1gd0g/helloworld

Bitbake tries to fetch sources from unavailable URL and they fail

I'm currently trying to set up an environment for Yocto project for my personal study.
I was clueless about where to start Yocto so I bought the book Embedded Linux Projects Using Yocto Project Cookbook but it keeps failing to build the environment.
I've run only simple commands. I ran source oe-init-build-env <dir name> to make a directory and ran bitbake core-image-minimal.
But bitbake command keeps giving me errors like this. This is the log.
WARNING: Host distribution "Ubuntu-18.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Parsing recipes: 100%
|#################################################################################| Time: 00:00:25Parsing of 891 .bb files complete (0 cached, 891 parsed). 1287 targets, 61 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.24.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "Ubuntu-18.04"
TARGET_SYS = "arm-poky-linux-gnueabi"
MACHINE = "qemuarm"
DISTRO = "poky"
DISTRO_VERSION = "1.7.3"
TUNE_FEATURES = "arm armv5 thumb dsp"
TARGET_FPU = "soft"
meta
meta-yocto
meta-yocto-bsp = "dizzy:58863ad092c9a279e305c841dbb4353de2ecfae8"
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: Failed to fetch URL http://www.zlib.net/zlib-1.2.8.tar.xz, attempting MIRRORS if available
WARNING: Failed to fetch URL http://www.multiprecision.org/mpc/download/mpc-1.0.2.tar.gz, attempting MIRRORS if available
WARNING: Failed to fetch URL ftp://ftp.gmplib.org/pub/gmp-6.0.0/gmp-6.0.0a.tar.bz2, attempting MIRRORS if available
WARNING: Failed to fetch URL http://ymorin.is-a-geek.org/download/kconfig-frontends/kconfig-frontends-3.12.0.0.tar.xz, attempting MIRRORS if available
WARNING: Failed to fetch URL http://download.gna.org/cryptodev-linux/cryptodev-linux-1.6.tar.gz, attempting MIRRORS if available
WARNING: Checksum failure encountered with download of http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz - will attempt other sources if available
WARNING: Renaming /opt/yocto/poky/qemuarm/downloads/bzip2-1.0.6.tar.gz to /opt/yocto/poky/qemuarm/downloads/bzip2-1.0.6.tar.gz_bad-checksum_2ae3e6c958d83d2855a37f13fe29fd95
WARNING: Failed to fetch URL http://gnome-build-stage-1.googlecode.com/files/uuid-1.6.2.tar.gz, attempting MIRRORS if available
WARNING: Checksum failure encountered with download of http://rpm5.org/files/popt/popt-1.16.tar.gz - will attempt other sources if available
WARNING: Renaming /opt/yocto/poky/qemuarm/downloads/popt-1.16.tar.gz to /opt/yocto/poky/qemuarm/downloads/popt-1.16.tar.gz_bad-checksum_9e09d0bf772649c5ba385c48ba2d3547
WARNING: Failed to fetch URL http://zlib.net/pigz/pigz-2.3.1.tar.gz, attempting MIRRORS if available
WARNING: Checksum failure encountered with download of http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.14-0.20131024.src.rpm;extract=rpm-5.4.14.tar.gz - will attempt other sources if available
WARNING: Renaming /opt/yocto/poky/qemuarm/downloads/rpm-5.4.14-0.20131024.src.rpm to /opt/yocto/poky/qemuarm/downloads/rpm-5.4.14-0.20131024.src.rpm_bad-checksum_6a8d9bc6a7e0162d7ff72fefc9e841e5
WARNING: Failed to fetch URL http://downloads.sourceforge.net/expat/expat-2.1.0.tar.gz, attempting MIRRORS if available
WARNING: Failed to fetch URL ftp://invisible-island.net/byacc/byacc-20140422.tgz, attempting MIRRORS if available
WARNING: Failed to fetch URL http://pkg-shadow.alioth.debian.org/releases/shadow-4.2.1.tar.xz, attempting MIRRORS if available
I checked the URLs in the log and it turned out they are all 404 pages. And most importantly, it terminates by showing this message.
ERROR: Error executing a python function in /opt/yocto/poky/meta/recipes-devtools/gcc/gcc-source_4.9.bb:
The stack trace of python calls that resulted in this exception/failure was:
File: 'do_preconfigure', lineno: 12, function: <module>
0008: cmd = d.expand("sed -i 's/BUILD_INFO=info/BUILD_INFO=/' /opt/yocto/poky/qemuarm/tmp/work-shared/gcc-4.9.1-r0/gcc-4.9.1/gcc/configure")
0009: subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
0010:
0011:
*** 0012:do_preconfigure(d)
0013:
File: 'do_preconfigure', lineno: 5, function: do_preconfigure
0001:
0002:def do_preconfigure(d):
0003: import subprocess
0004: cmd = d.expand('PATH=/opt/yocto/poky/scripts:/opt/yocto/poky/qemuarm/tmp/sysroots/x86_64-linux/usr/bin/arm-poky-linux-gnueabi:/opt/yocto/poky/qemuarm/tmp/sysroots/qemuarm/usr/bin/crossscripts:/opt/yocto/poky/qemuarm/tmp/sysroots/x86_64-linux/usr/sbin:/opt/yocto/poky/qemuarm/tmp/sysroots/x86_64-linux/usr/bin:/opt/yocto/poky/qemuarm/tmp/sysroots/x86_64-linux/sbin:/opt/yocto/poky/qemuarm/tmp/sysroots/x86_64-linux/bin:/opt/yocto/poky/scripts:/opt/yocto/poky/bitbake/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files/WindowsApps/CanonicalGroupLimited.Ubuntu18.04onWindows_1804.2020.824.0_x64__79rhkp1fndgsc:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Users/kimth/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/kimth/AppData/Local/Programs/MiKTeX 2.9/miktex/bin/x64/:/mnt/c/Users/kimth/AppData/Roaming/TinyTeX/bin/win32:/snap/bin cd /opt/yocto/poky/qemuarm/tmp/work-shared/gcc-4.9.1-r0/gcc-4.9.1 && gnu-configize')
*** 0005: subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
0006: # See 0044-gengtypes.patch, we need to regenerate this file
0007: bb.utils.remove(d.expand("/opt/yocto/poky/qemuarm/tmp/work-shared/gcc-4.9.1-r0/gcc-4.9.1/gcc/gengtype-lex.c"))
0008: cmd = d.expand("sed -i 's/BUILD_INFO=info/BUILD_INFO=/' /opt/yocto/poky/qemuarm/tmp/work-shared/gcc-4.9.1-r0/gcc-4.9.1/gcc/configure")
0009: subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
File: '/usr/lib/python2.7/subprocess.py', lineno: 223, function: check_output
0219: if retcode:
0220: cmd = kwargs.get("args")
0221: if cmd is None:
0222: cmd = popenargs[0]
*** 0223: raise CalledProcessError(retcode, cmd, output=output)
0224: return output
0225:
0226:
0227:def list2cmdline(seq):
Exception: CalledProcessError: Command 'PATH=/opt/yocto/poky/scripts:/opt/yocto/poky/qemuarm/tmp/sysroots/x86_64-linux/usr/bin/arm-poky-linux-gnueabi:/opt/yocto/poky/qemuarm/tmp/sysroots/qemuarm/usr/bin/crossscripts:/opt/yocto/poky/qemuarm/tmp/sysroots/x86_64-linux/usr/sbin:/opt/yocto/poky/qemuarm/tmp/sysroots/x86_64-linux/usr/bin:/opt/yocto/poky/qemuarm/tmp/sysroots/x86_64-linux/sbin:/opt/yocto/poky/qemuarm/tmp/sysroots/x86_64-linux/bin:/opt/yocto/poky/scripts:/opt/yocto/poky/bitbake/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files/WindowsApps/CanonicalGroupLimited.Ubuntu18.04onWindows_1804.2020.824.0_x64__79rhkp1fndgsc:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Users/kimth/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/kimth/AppData/Local/Programs/MiKTeX 2.9/miktex/bin/x64/:/mnt/c/Users/kimth/AppData/Roaming/TinyTeX/bin/win32:/snap/bin cd /opt/yocto/poky/qemuarm
I feel like I need to modify conf files to fetch available URLs but I'm new to Yocto and Bitbake so I'm very lost now. I would appreciate if anyone could tell me where to find solutions. Thank you and stay safe everyone.
You seem to use quite an old yocto version 1.7.3 while there is already 3.3 released. This means also you try to build recipes for some packages that are also old and hence some URLs might be unavailable. Might it be an option for you to use a newer version?
If this is no option for you, one thing to try would be setting MIRROR (see [1]) to a mirror [2] where those packages are still available. But this approach I would not prefer.
[1] https://www.yoctoproject.org/docs/1.7/bitbake-user-manual/bitbake-user-manual.html#var-MIRRORS
[2] could be: http://downloads.yoctoproject.org/mirror/sources/
1.7.3 is a very old release of the project, originally released in 2015 with a last point release in 2016. The fetcher warnings you see aren't the problem, they're warnings but it will fall back to the project mirrors. If it hadn't fallen back correctly, it would have shown errors as well as the warnings. The bigger problem is in fact this:
WARNING: Host distribution "Ubuntu-18.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Since Ubuntu 18.04 is three years newer than the project release you're using, there is no way it would be compatible with that release. You need to use a host OS from the era of the release, so Ubuntu 16.04 may work better. This is because the host OS provides gcc used to build the cross tools and the newer gcc versions don't tend to work with 100% of old code without tweaks.
So in short, use an older distro if you want to try and get that to build.

Yocto: gstreamer1.0-plugins-bad_1.16.3.bb:do_configure in yocto

I am always facing a problem if i wanted to build yocto or the qt toolchain.
for example in the first run i have give the following command where the issue occurs the first time:
bitbake meta-toolchain-qt5
following error message occurs:
Build Configuration:
BB_VERSION = "1.46.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "arm-poky-linux-gnueabi"
MACHINE = "raspberrypi3"
DISTRO = "poky"
DISTRO_VERSION = "3.1.6"
TUNE_FEATURES = "arm vfp cortexa7 neon vfpv4 thumb callconvention-hard"
TARGET_FPU = "hard"
meta = "dunfell:9ee329c18fbe0c42eaf3d43657ea30591f79143b"
meta-oe = "dunfell:346681e7bf9c78008a845fc89031be4fd4ceb3a1"
meta-poky
meta-yocto-bsp = "dunfell:9ee329c18fbe0c42eaf3d43657ea30591f79143b"
meta-qt5 = "dunfell:0d8eb956015acdea7e77cd6672d08dce18061510"
meta-raspberrypi = "dunfell:77190af02d48adc2b28216775e6318e9eeda571c"
meta-multimedia
meta-python
meta-networking = "dunfell:346681e7bf9c78008a845fc89031be4fd4ceb3a1"
Initialising tasks: 100% |##################################################################################################################################################################| Time: 0:00:02
Sstate summary: Wanted 0 Found 0 Missed 0 Current 329 (0% match, 100% complete)
NOTE: Executing Tasks
ERROR: gstreamer1.0-plugins-bad-1.16.3-r0 do_configure: meson failed
-------------------------------------------------------------------------------------------
| Run-time dependency gstreamer-sdp-1.0 found: YES 1.16.3
| Run-time dependency gstreamer-tag-1.0 found: YES 1.16.3
| Run-time dependency gstreamer-video-1.0 found: YES 1.16.3
| Run-time dependency gstreamer-check-1.0 found: YES 1.16.3
| Found CMake: NO
| Run-time dependency gstreamer-gl-1.0 found: NO (tried pkgconfig and cmake)
| Looking for a fallback subproject for the dependency gstreamer-gl-1.0
|
| meson.build:283:0: ERROR: Subproject directory not found and gst-plugins-base.wrap file not found
|
How can i solve this problem any ideas?
Thanks in advance
I encountered this issue as well and was able to track down the cause (though it probably doesn't apply to the original query if it was resolved by a clean build). In my case, I was building for an ELGFS Qt based system. There's a check in the meson.build file in gstreamer1.0-plugins-base that will disable the gstgl library build if an OpenGL Window system isn't found, and this was being triggered for me. gstreamer 1.16 does not support EGL as the window system but 1.18 does. Yocto upgraded to gstreamer 1.18 with the hardknott release, but we were relying on multiple supporting 3rd party recipes that were still on dunfell and couldn't upgrade.
In our case, gstreamer had been included as a dependency from qtmultimedia, but this was determined to be extraneous and could be resolved by excluding qtmultimedia or using a .bbappend file to remove gstreamer from the PACKAGECONFIG. If gstreamer is actually needed then the options are:
Use a windowing system (e.g., weston, or a custom wayland compositor), or
See if the gstreamer 1.18 recipe from hardknott can be made to work in the existing project, or
See if the entire project can be upgraded to use the hardknott release, so that gstreamer 1.18 is used by default.

Why do I get undeclared inclusion error when using the lib as external library?

I am trying to include an external library (glm) in my bazel build, but I get undeclared inclusion the thing is I don't understand how to fix it and why, Because if I use the same BUILD script when I extract manually the library it builds fine.
I managed to make a very small repro of this problem, both the working case and the not working.
The not working example
My folder structure
glmExtBuild
WORKSPACE
externals
glm.BUILD
This is my WORKSPACE file
new_http_archive(
name = "glmExt",
url = "https://github.com/g-truc/glm/archive/0.9.9.0.tar.gz",
sha256 = "514dea9ac0099dc389cf293cf1ab3d97aff080abad55bf79d4ab7ff6895ee69c",
strip_prefix = "glm-0.9.9.0",
build_file = "externals/glm.BUILD",
)
This is my glm.BUILD file
package(default_visibility = ["//visibility:public"])
cc_library(
name= "glm",
defines= ["GLM_ENABLE_EXPERIMENTAL", "GLM_FORCE_RADIANS",
"GLM_FORCE_DEPTH_ZERO_TO_ONE"],
srcs=glob(["glm/**/*.cpp"]) + ["glm/detail/_fixes.hpp"],
hdrs=glob(["glm/**/*.hpp"])+glob(["glm/**/*.h"]),
includes = ["glm"],
textual_hdrs = glob(["glm/**/*.inl"]),
visibility = ["//visibility:public"],
)
And this is the errors that I get when I run
bazel build #glmExt//:glm --verbose_failures --sandbox_debug
ERROR: C:/users/...../external/glmExt/BUILD.bazel:121:1: undeclared inclusion(s) in rule '#glmExt//:glm':
this rule is missing dependency declarations for the following files included by 'external/glmExt/glm/detail/glm.cpp':
'external/glmext/glm/detail/_fixes.hpp'
'external/glmext/glm/detail/setup.hpp'
'external/glmext/glm/simd/platform.h'
'external/glmext/glm/fwd.hpp'
'external/glmext/glm/detail/setup.hpp'
'external/glmext/glm/detail/type_int.hpp'
'external/glmext/glm/detail/setup.hpp'
'external/glmext/glm/detail/type_float.hpp'
...
The working example:
My folder structure
glmBuild2
WORKSPACE
BUILD
glmSrc
https://github.com/g-truc/glm/archive/0.9.9.0.tar.gz extracted here
My WORKSPACE file is empty
And this is my BUILD file
package(default_visibility = ["//visibility:public"])
cc_library(
name= "glm",
defines= ["GLM_ENABLE_EXPERIMENTAL", "GLM_FORCE_RADIANS", "GLM_FORCE_DEPTH_ZERO_TO_ONE"],
srcs=glob(["glmSrc/glm/**/*.cpp"]) + ["glmSrc/glm/detail/_fixes.hpp"],
hdrs=glob(["glmSrc/glm/**/*.hpp"])+glob(["glmSrc/glm/**/*.h"]),
includes = ["glmSrc"],
textual_hdrs = glob(["glmSrc/glm/**/*.inl"]),
visibility = ["//visibility:public"],
)
Then when running the build command it finished successfully.
PS D:\......\glmBuild2> bazel build :glm --verbose_failures --sandbox_debug
INFO: Analysed target //:glm (1 packages loaded).
INFO: Found 1 target...
INFO: From Compiling glmSrc/glm/detail/glm.cpp:
glmSrc/glm/detail/glm.cpp(4): warning C4005: 'GLM_ENABLE_EXPERIMENTAL': macro redefinition
glmSrc/glm/detail/glm.cpp(4): note: command-line arguments: see previous definition of 'GLM_ENABLE_EXPERIMENTAL'
Target //:glm up-to-date:
C:/users/.../execroot/__main__/bazel-out/x64_windows-fastbuild/bin/libglm.a
INFO: Elapsed time: 1.830s, Critical Path: 1.30s
INFO: 3 processes, local.
INFO: Build completed successfully, 4 total actions
Does anybody have an idea?
Thanks
Update:
bazel version
Build label: 0.14.0
Build target: bazel-out/x64_windows-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Fri Jun 1 13:06:29 2018 (1527858389)
Build timestamp: 1527858389
Build timestamp as int: 1527858389
Bazel issue:
https://github.com/bazelbuild/bazel/issues/5485
I tried the first example on linux, with bazel 0.15.0, and all worked once I added "." into includes attribute of glm. Do you have a possibility to test it on linux? Is it windows-only issue then? Which bazel version do you use?
Thanks for clarifications.

Resources