Yocto 2.4.2 cannot do_rootfs because of dependent package - yocto

I am working with Yocto 2.4.2 (rocko), Ubuntu 14.04 LTS, Linux kernel LTSI 4.4, arm cortexA15. There are many issues while building core-image-weston. One of them is:
ERROR: core-image-weston-1.0-r0 do_rootfs: Unable to install packages. Command '/home/server-build/RZG_YoctoProject/build/tmp/work/iwg20m-poky-linux-gnueabi/core-image-weston/1.0-r0/recipe-sysroot-native/usr/bin/opkg --volatile-cache -f /home/server-build/RZG_YoctoProject/build/tmp/work/iwg20m-poky-linux-gnueabi/core-image-weston/1.0-r0/opkg.conf -t /home/server-build/RZG_YoctoProject/build/tmp/work/iwg20m-poky-linux-gnueabi/core-image-weston/1.0-r0/temp/ipktemp/ -o /home/server-build/RZG_YoctoProject/build/tmp/work/iwg20m-poky-linux-gnueabi/core-image-weston/1.0-r0/rootfs --force_postinstall --prefer-arch-to-version install
libkms1
run-postinsts
gstreamer1.0-plugins-good-video4linux2
weston
opkg
psplash
libclutter-1.0-examples
alsa-tools
gtk+3-demo
gles-user-module
packagegroup-core-boot
libdrm-tests
kernel-module-gles
alsa-utils
weston-init
packagegroup-base-extended
bash
packagegroup-core-ssh-dropbear'
returned 2:
Collected errors:
* Solver encountered 2 problem(s):
* Problem 1/2:
- nothing provides libgbm >= 1.0 needed by weston-2.0.0-r0.cortexa15hf-neon
* Solution 1:
- do not ask to install a package providing weston
* Problem 2/2:
- nothing provides libgbm >= 1.0 needed by weston-2.0.0-r0.cortexa15hf-neon
* Solution 1:
- do not ask to install a package providing weston-init
ERROR: core-image-weston-1.0-r0 do_rootfs: Function failed: do_rootfs
ERROR: Logfile of failure stored in: /home/server-build/RZG_YoctoProject/build/tmp/work/iwg20m-poky-linux-gnueabi/core-image-weston/1.0-r0/temp/log.do_rootfs.20697
ERROR: Task (/home/server-build/RZG_YoctoProject/build/../poky/meta/recipes-graphics/images/core-image-weston.bb:do_rootfs) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3411 tasks of which 3410 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
/home/server-build/RZG_YoctoProject/build/../poky/meta/recipes-graphics/images/core-image-weston.bb:do_rootfs
The packages weston and weston-init require libgbm >= 1.0. In our current system, libgbm.bb was already existent. And, I can build libgbm succesfully.
SUMMARY = "gbm library"
LICENSE = "MIT"
SECTION = "libs"
LIC_FILES_CHKSUM = "file://gbm.c;beginline=4;endline=22;md5=5cdaac262c876e98e47771f11c7036b5"
SRCREV = "84984e873a134ee67b4c99859f052bb42834245c"
SRC_URI = "git://github.com/thayama/libgbm;protocol=git;branch=master"
PV = "1.0"
S = "${WORKDIR}/git"
DEPENDS = "wayland-kms udev"
inherit autotools pkgconfig
PACKAGES = " \
${PN} \
${PN}-dev \
${PN}-dbg \
${PN}-staticdev \
"
FILES_${PN} = " \
${libdir}/libgbm.so.* \
${libdir}/gbm/libgbm_kms.so.* \
${libdir}/gbm/*.so \
${libdir}/*.so \
"
PROVIDES += "gbm"
FILES_${PN}-dev += "${libdir}/gbm/*.la"
FILES_${PN}-dbg += "${libdir}/gbm/.debug/*"
FILES_${PN}-staticdev += "${libdir}/gbm/*.a"
INSANE_SKIP_${PN} += "dev-so"
But the error happened. Could you help ? Thanks!

Related

Activating distro layer in Yocto

What are the required steps to use a distro layer in Yocto?
Currently, I have the following setup:
meta-my-distro-layer/conf/distro/mydistro.conf:
DISTROOVERRIDES =. "poky:"
require conf/distro/poky.conf
DISTRO = "mydistro"
DISTRO_NAME = "MyDistro"
DISTRO_VERSION = "1.0"
DISTRO_CODENAME = "one"
INIT_MANAGER = "systemd"
meta-my-distro-layer/conf/layer.conf
# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"
# We have recipes-* directories, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "meta-my-distro-layer"
BBFILE_PATTERN_meta-my-distro-layer = "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-my-distro-layer = "6"
LAYERDEPENDS_meta-my-distro-layer = "core"
LAYERSERIES_COMPAT_meta-my-distro-layer = "kirkstone"
meta-my-distro-layer/recipes-core/images/console-image.bb
DESCRIPTION = "A console-only image"
IMAGE_FEATURES += "ssh-server-openssh"
IMAGE_INSTALL = "\
packagegroup-core-boot \
packagegroup-core-full-cmdline \
${CORE_IMAGE_EXTRA_INSTALL} \
"
inherit core-image
IMAGE_INSTALL += "curl"
build/conf/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 ?= " \
/my-work-dir/poky/meta \
/my-work-dir/poky/meta-poky \
/my-work-dir/poky/meta-yocto-bsp \
/my-work-dir/poky/meta-my-distro-layer \
"
I can build the console image defined in that layer, but nothing set in mydistro.conf seems to have any effect on bitbake. According to bitbake -e, DISTRO and INIT_MANAGER never get set to my values and (consequently) trying to set INIT_MANAGER to systemd never takes effect. I can set INIT_MANAGER in conf/local.conf and it takes effect then, but I'd like to do that in a distro layer.
You need to set DISTRO to mydistro in local.conf

do_compile error while running bitbake on poky

iam using poky to build a BSP for my imxsabreauto board. i got the following error. please help me on this.
error log:
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: Function failed: do_compile (log file is located at /home/viswanath/SabreAuto_error/build-wayland/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/busybox/1.22.1-r32/temp/log.do_compile.15410)
ERROR: Logfile of failure stored in: /home/viswanath/SabreAuto_error/build-wayland/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/busybox/1.22.1-r32/temp/log.do_compile.15410
| DEBUG: SITE files ['endian-little', 'bit-32', 'arm-common', 'common-linux', 'common-glibc', 'arm-linux', 'arm-linux-gnueabi', 'common']
| DEBUG: Executing shell function do_compile
| grep: .config: No such file or directory
| cp: cannot stat '.config': No such file or directory
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /home/viswanath/SabreAuto_error/build-wayland/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/busybox/1.22.1-r32/temp/log.do_compile.15410)
ERROR: Task 2086 (/home/viswanath/SabreAuto_error/sources/poky/meta/recipes-core/busybox/busybox_1.22.1.bb, do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2014 tasks of which 16 didn't need to be rerun and 1 failed.
Waiting for 0 running tasks to finish:
Summary: 1 task failed:
/home/viswanath/SabreAuto_error/sources/poky/meta/recipes-core/busybox/busybox_1.22.1.bb, do_compile
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
bitbake file:
require busybox.inc
PR = "r32"
SRC_URI =
"http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://get_header_tar.patch \
file://busybox-appletlib-dependency.patch \
file://busybox-udhcpc-no_deconfig.patch \
file://find-touchscreen.sh \
file://busybox-cron \
file://busybox-httpd \
file://busybox-udhcpd \
file://default.script \
file://simple.script \
file://hwclock.sh \
file://mount.busybox \
file://syslog \
file://syslog-startup.conf \
file://syslog.conf \
file://busybox-syslog.default \
file://mdev \
file://mdev.conf \
file://umount.busybox \
file://defconfig \
file://busybox-syslog.service.in \
file://busybox-klogd.service.in \
file://fail_on_no_media.patch \
file://run-ptest \
file://inetd.conf \
file://inetd \
file://login-utilities.cfg \
file://0001-build-system-Specify-nostldlib-when-linking-to-.o-fi.patch \
file://recognize_connmand.patch \
file://busybox-cross-menuconfig.patch \
"
SRC_URI[tarball.md5sum] = "337d1a15ab1cb1d4ed423168b1eb7d7e"
SRC_URI[tarball.sha256sum] = "ae0b029d0a9e4dd71a077a790840e496dd838998e4571b87b60fed7462b6678b"
EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y"
do_install_ptest () {
cp -r ${B}/testsuite ${D}${PTEST_PATH}/
cp ${B}/.config ${D}${PTEST_PATH}/
ln -s /bin/busybox ${D}${PTEST_PATH}/busybox
}
inherit autotools gettext
the error seems to there is no ".config file".
if you need p-test click the link p-test yocto
for busybox see the link busybox.bb

Creating Yocto Mender for Raspberrypi 3

I need help creating Mender for Raspberry Pi3. I can create the image, but when using Win32Image to burn the Disk Image it doesn't boot.
Here is my additional conf.log
MENDER_ARTIFACT_NAME = "release-1"
INHERIT += "mender-full"
MACHINE ?= "raspberrypi3"
RPI_USE_U_BOOT = "1"
MENDER_PARTITION_ALIGNMENT_KB = "4096"
MENDER_BOOT_PART_SIZE_MB = "40"
IMAGE_INSTALL_append = " kernel-image kernel-devicetree"
IMAGE_FSTYPES_remove += " rpi-sdimg"
DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_initscripts = ""
IMAGE_FSTYPES = "ext4"
and bblayers
POKY_BBLAYERS_CONF_VERSION = "2"
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS ?= " \
/home/ubuntu/pyro/poky/meta \
/home/ubuntu/pyro/poky/meta-poky \
/home/ubuntu/pyro/poky/meta-yocto-bsp \
/home/ubuntu/pyro/openembedded-core/meta \
/home/ubuntu/pyro/meta-openembedded/meta-oe \
/home/ubuntu/pyro/meta-openembedded/meta-python \
/home/ubuntu/pyro/meta-openembedded/meta-networking \
/home/ubuntu/pyro/meta-raspberrypi \
/home/ubuntu/pyro/meta-mender/meta-mender-core \
/home/ubuntu/pyro/meta-mender/meta-mender-demo \
/home/ubuntu/pyro/meta-mender/meta-mender-raspberrypi \
"
I can create the rpi-basic image as follows:
ubuntu#ip-172-31-6-3:~/pyro/build$ bitbake rpi-basic-image
Parsing recipes: 100% |######################################################################################| Time: 0:00:54
Parsing of 870 .bb files complete (0 cached, 870 parsed). 1347 targets, 71 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.34.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "arm-poky-linux-gnueabi"
MACHINE = "raspberrypi3"
DISTRO = "poky"
DISTRO_VERSION = "2.3.2"
TUNE_FEATURES = "arm armv7ve vfp thumb neon vfpv4 callconvention-hard cortexa7"
TARGET_FPU = "hard"
meta
meta-poky
meta-yocto-bsp = "pyro:2021e95bcd986e5bcfe457da5c3e16d60241d050"
meta-raspberrypi = "pyro:40447de4782d76f1e23e67ba05e272c27f6ec250"
meta-mender-core
meta-mender-raspberrypi = "pyro:b40f05c82ebc97c18ddf8ac426af4657ddba9425"
Initialising tasks: 100% |###################################################################################| Time: 0:00:04
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 2976 tasks of which 2953 didn't need to be rerun and all succeeded.
ubuntu#ip-172-31-6-3:~/pyro/build$
Maybe I am missing some steps?
The pyro branch of meta-raspberrypi does not support the RPI_USE_U_BOOT setting. For that (and older) branches you need to use 'KERNEL_IMAGETYPE_rpi = "uImage"' instead.

Postgresql extension Makefile returning error

I wrote a SQL extension following the instructions on PGXN, but I always get a make install error as following:
/bin/mkdir -p '/usr/share/postgresql/9.5/extension'
/bin/mkdir -p '/usr/share/postgresql/9.5/extension'
/bin/mkdir -p '/usr/share/doc/postgresql-doc-9.5/extension'
/usr/bin/install -c -m 644 .//myextname.control '/usr/share/postgresql/9.5/extension/'
/usr/bin/install -c -m 644 .//sql/myextname--1.0.0.sql .//sql/myextname--1.0.0.sql '/usr/share/postgresql/9.5/extension/'
/usr/bin/install: will not overwrite just-created ‘/usr/share/postgresql/9.5/extension/myextname--1.0.0.sql’ with ‘.//sql/myextname--1.0.0.sql’
make: *** [install] Error 1
My Makefile is as following:
EXTENSION = myextname
EXTVERSION = $(shell grep default_version $(EXTENSION).control | \
sed -e "s/default_version[[:space:]]*=[[:space:]]*'\([^']*\)'/\1/")
DATA = $(filter-out $(wildcard sql/*--*.sql),$(wildcard sql/*.sql))
TESTS = $(wildcard test/sql/*.sql)
REGRESS = $(patsubst test/sql/%.sql,%,$(TESTS))
REGRESS_OPTS = --inputdir=test
DOCS = $(wildcard doc/*.md)
MODULES = $(patsubst %.c,%,$(wildcard src/*.c))
PG_CONFIG = pg_config
PG91 = $(shell $(PG_CONFIG) --version | grep -qE " 8\\.| 9\\.0" && echo no || echo yes)
ifeq ($(PG91),yes)
all: sql/$(EXTENSION)--$(EXTVERSION).sql
sql/$(EXTENSION)--$(EXTVERSION).sql: $(strip sql/tables.sql \
sql/types.sql \
sql/domains.sql \
)
cat $^ > $#
DATA = $(wildcard sql/*--*.sql) sql/$(EXTENSION)--$(EXTVERSION).sql
EXTRA_CLEAN = sql/$(EXTENSION)--$(EXTVERSION).sql
endif
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
This blog says this error is caused by this line:
DATA = $(wildcard sql/*--*.sql) sql/$(EXTENSION)--$(EXTVERSION).sql
which evaluates into the same filename twice (and /usr/bin/install refuses to overwrite the first instance of the file).
But how can I fix it?
You seem to have copied the Makefile from PGXN, and it is probably much more complicated than you need.
For example, do you target PostgreSQL versions below 9.1?
You'll be much better off with a small, simple custom tailored Makefile like this:
MODULES = src/myextname
EXTENSION = myextname
DATA = sql/myextname--1.0.sql
DOCS = doc/myextname.md
REGRESS = myextname
REGRESS_OPTS = --inputdir=test
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
This (untested) Makefile sticks with the file organization suggested by PGXN.

Compile a static version of pngquant

I'm trying to create a statically linked version of pngquant in Oracle Linux Server release 7.1. I've compiled the static version of zlib and the static version of libpng.
Then, when I configure pngquant, I always get the information that it will be linked with a shared version of zlib.
$ ./configure --with-libpng=../libpng-1.6.21 --extra-cflags="-I../zlib-1.2.8" --extra-ldflags="../zlib-1.2.8/libz.a"
Compiler: gcc
Debug: no
SSE: yes
OpenMP: no
libpng: static (1.6.21)
zlib: shared (1.2.7)
lcms2: no
If I execute make, in the output it seems that the options are correctly passed to the compiler. However, the resulting binary requires libz.so to be executed. It seems that my directives are ignored or that the installed version always takes precedence.
Is there any way of forcing pngquant to be compiled with the static version of zlib?
I'm not sure, if I got it right, but here's a patch to pngquant's configure that worked for me. configure now accepts --with-zlib=<dir> as parameter. Store it to pngquant.patch and apply it with patch -uN -p1 -i pngquant.patch.
diff -ur pngquant-2.9.0/configure pngquant-2.9.0.fixed/configure
--- pngquant-2.9.0/configure 2017-03-06 09:37:30.000000000 +0100
+++ pngquant-2.9.0.fixed/configure 2017-03-07 09:57:20.246012152 +0100
## -48,6 +48,7 ##
help "--with-cocoa/--without-cocoa use Cocoa framework to read images"
fi
help "--with-libpng=<dir> search for libpng in directory"
+ help "--with-zlib=<dir> search for zlib in directory"
echo
help "CC=<compiler> use given compiler command"
help "CFLAGS=<flags> pass options to the compiler"
## -97,6 +98,9 ##
--with-libpng=*)
LIBPNG_DIR=${i#*=}
;;
+ --with-zlib=*)
+ ZLIB_DIR=${i#*=}
+ ;;
--prefix=*)
PREFIX=${i#*=}
;;
## -238,6 +242,19 ##
echo "${MAJ}${MIN}"
}
+# returns full zlib.h version string
+zlibh_string() {
+ echo "$(grep -m1 "define ZLIB_VERSION" "$1" | \
+ grep -Eo '"[^"]+"' | grep -Eo '[^"]+')"
+}
+
+# returns major minor version numbers from png.h
+zlibh_majmin() {
+ local MAJ=$(grep -m1 "define ZLIB_VER_MAJOR" "$1" | grep -Eo "[0-9]+")
+ local MIN=$(grep -m1 "define ZLIB_VER_MINOR" "$1" | grep -Eo "[0-9]+")
+ echo "${MAJ}${MIN}"
+}
+
error() {
status "$1" "error ... $2"
echo
## -420,11 +437,42 ##
error "libpng" "not found (try: $LIBPNG_CMD)"
fi
-# zlib
-if ! find_library "zlib" "z" "zlib.h" "libz.a" "libz.$SOLIBSUFFIX*"; then
- error "zlib" "not found (please install zlib-devel package)"
+# try if given flags are enough for zlib
+HAS_ZLIB=0
+if echo "#include \"zlib.h\"
+ int main(){
+ uLong test = zlibCompileFlags();
+ return 0;
+}" | "$CC" -xc -std=c99 -o /dev/null $CFLAGS $LDFLAGS - &> /dev/null; then
+ status "zlib" "custom flags"
+ HAS_ZLIB=1
fi
+if [ "$HAS_ZLIB" -eq 0 ]; then
+ # try static in the given directory
+ ZLIBH=$(find_h "$ZLIB_DIR" "zlib.h")
+ if [ -n "$ZLIBH" ]; then
+ ZLIBH_STRING=$(zlibh_string "$ZLIBH")
+ ZLIBH_MAJMIN=$(zlibh_majmin "$ZLIBH")
+ if [[ -n "$ZLIBH_STRING" && -n "$ZLIBH_MAJMIN" ]]; then
+ ZLIBA=$(find_f "$ZLIB_DIR" "libz${ZLIBH_MAJMIN}.a")
+ if [ -z "$ZLIBA" ]; then
+ ZLIBA=$(find_f "$ZLIB_DIR" "libz.a")
+ fi
+ if [ -n "$ZLIBA" ]; then
+ cflags "-I${ZLIBH%/*}"
+ lflags "${ZLIBA}"
+ status "zlib" "static (${ZLIBH_STRING})"
+ HAS_ZLIB=1
+ fi
+ fi
+ fi
+fi
+# zlib
+if ! find_library "zlib" "z" "zlib.h" "libz.a" "zlib.$SOLIBSUFFIX*"; then
+ error "zlib" "not found (please install zlib-devel package)"
+fi
+
# lcms2
if [ "$LCMS2" != 0 ]; then
if find_library "lcms2" "lcms2" "lcms2.h" "liblcms2.a" "liblcms2.$SOLIBSUFFIX*"; then
Sorry, the configure script does not support it. It shouldn't be too hard to modify configure to pass appropriate flags to pkg-config or do the same workaround it does for libpng.