Building issue yocto for arm 32 bit machine while installing Snapd

hello everybody,
I have a problem building yocto with meta-snappy
Build Configuration:
BB_VERSION = “1.36.0”
BUILD_SYS = “x86_64-linux”
NATIVELSBSTRING = “universal”
TARGET_SYS = “arm-fslc-linux-gnueabi”
MACHINE = “imx6ulevk”
DISTRO = “fslc-framebuffer”
DISTRO_VERSION = “2.4”
TUNE_FEATURES = “arm armv7a vfp thumb neon callconvention-hard”
TARGET_FPU = “hard”
meta
meta-poky
meta-yocto-bsp = “HEAD:9ed1178c87afce997d5a21cadae7461fb6bb48da”
meta-oe
meta-filesystems
meta-multimedia = “HEAD:352531015014d1957d6444d114f4451e241c4d23”
meta-freescale = “HEAD:a4158e3425a79720ddc4c02e76251d567bdceb51”
meta-freescale-3rdparty = “HEAD:a02324e27f7a7ac630dab616f46a8bad7fe2c071”
meta-freescale-distro = “HEAD:51756d1c2058139c8a21f89b86cfd8007b71b7f0”
meta-snappy = “master:0b97a631282b6b8350de10d0265d726e8c7d6f77”
meta-intel = “meta-intel-rocko-2.4:d68dda959b5bf6f90aa8e5c2f027be324bb68e14”

this is the Error:
ERROR: core-image-minimal-snapd-1.0-r0 do_rootfs: Could not invoke dnf. Command ‘////build/tmp/work/imx6ulevk-fslc-linux-gnueabi/core-image-minimal-snapd/1.0-r0/recipe-sysroot-native/usr/bin/dnf -y -c////build/tmp/work/imx6ulevk-fslc-linux-gnueabi/core-image-minimal-snapd/1.0-r0/rootfs/etc/dnf/dnf.conf --setopt=reposdir=////build/tmp/work/imx6ulevk-fslc-linux-gnueabi/core-image-minimal-snapd/1.0-r0/rootfs/etc/yum.repos.d --repofrompath=oe-repo,////build/tmp/work/imx6ulevk-fslc-linux-gnueabi/core-image-minimal-snapd/1.0-r0/oe-rootfs-repo --installroot=////build/tmp/work/imx6ulevk-fslc-linux-gnueabi/core-image-minimal-snapd/1.0-r0/rootfs --setopt=logdir=////build/tmp/work/imx6ulevk-fslc-linux-gnueabi/core-image-minimal-snapd/1.0-r0/temp --nogpgcheck install packagegroup-snapd snapd rpm apt bash openssh run-postinsts packagegroup-core-boot’ returned 1:
Added oe-repo repo from /home/gianpa/fsl-community-bsp/build/tmp/work/imx6ulevk-fslc-linux-gnueabi/core-image-minimal-snapd/1.0-r0/oe-rootfs-repo
Last metadata expiration check: 0:00:00 ago on Fri 03 Aug 2018 03:58:09 PM UTC.
Error:
Problem 1: conflicting requests

nothing provides kernel-module-squashfs needed by snapd-2.32.2-r0.armv7at2hf_neon
Problem 2: package packagegroup-snapd-1.0-r0.noarch requires snapd, but none of the providers can be installed
conflicting requests
nothing provides kernel-module-squashfs needed by snapd-2.32.2-r0.armv7at2hf_neon
ERROR: core-image-minimal-snapd-1.0-r0 do_rootfs: Function failed: do_rootfs
ERROR: Logfile of failure stored in: ////build/tmp/work/imx6ulevk-fslc-linux-gnueabi/core-image-minimal-snapd/1.0-r0/temp/log.do_rootfs.13830
ERROR: Task (////sources/meta-snappy/recipes-core/images/core-image-minimal-snapd.bb:do_rootfs) failed with exit code ‘1’

local.conf:

MACHINE ??= ‘imx6ulevk’
DISTRO ?= ‘fslc-framebuffer’
PACKAGE_CLASSES ?= “package_rpm”
EXTRA_IMAGE_FEATURES ?= “debug-tweaks”
USER_CLASSES ?= “buildstats image-mklibs image-prelink”
PATCHRESOLVE = “noop”
BB_DISKMON_DIRS ??= "
STOPTASKS,${TMPDIR},1G,100K
STOPTASKS,${DL_DIR},1G,100K
STOPTASKS,${SSTATE_DIR},1G,100K
STOPTASKS,/tmp,100M,100K
ABORT,${TMPDIR},100M,1K
ABORT,${DL_DIR},100M,1K
ABORT,${SSTATE_DIR},100M,1K
ABORT,/tmp,10M,1K"
PACKAGECONFIG_append_pn-qemu-native = " sdl"
PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
CONF_VERSION = “1”

DL_DIR ?= “${BSPDIR}/downloads/”
ACCEPT_FSL_EULA = “1”
DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager = “systemd”
DISTRO_FEATURES_BACKFILL_CONSIDERED = “sysvinit”
VIRTUAL-RUNTIME_initscripts = “”
ROOT_HOME = “/root”
INHERIT += “rm_work”

exclude snapd in case you want to develop snapd recipes
RM_WORK_EXCLUDE += “snapd”
CORE_IMAGE_EXTRA_INSTALL += “openssh”
SSTATE_MIRRORS ?= "
file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n
file://.* file:///some/local/dir/sstate/PATH \n
file://.* http://sstate.yoctoproject.org/dev/PATH;downloadfilename=PATH \n
file://.* http://sstate.yoctoproject.org/2.4/PATH;downloadfilename=PATH \n
file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH \n
"
please help me, I’ve been trying for the last week but no results

Can you check that snapd was indeed rebuilt? Can you bitbake -v snapd and inspect the log for any errors?

Hi, I’m having the same issue, I used the command

$ bitbake -v snapd

but I couldn’t notice any error. Below the full log. As an addictional info, I successfully compiled the same project for the target MACHINE qemux86.

kurako@kurako-udsk:~/fsl-community-bsp/build$ bitbake -v snapd
Loading cache: 100% |#######################################################################################################################################################################################################################################################################################################################################################################################################| Time: 0:00:00
Loaded 2309 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies
NOTE: selecting gcc-cross-arm to satisfy virtual/arm-fslc-linux-gnueabi-gcc due to PREFERRED_PROVIDERS
NOTE: selecting gcc-runtime to satisfy virtual/arm-fslc-linux-gnueabi-compilerlibs due to PREFERRED_PROVIDERS
NOTE: selecting binutils-cross-arm to satisfy virtual/arm-fslc-linux-gnueabi-binutils due to PREFERRED_PROVIDERS
NOTE: selecting pseudo-native to satisfy virtual/fakeroot-native due to PREFERRED_PROVIDERS
NOTE: selecting pkgconfig-native to satisfy pkgconfig-native due to PREFERRED_PROVIDERS
NOTE: selecting glibc to satisfy virtual/libc due to PREFERRED_PROVIDERS
NOTE: selecting systemd to satisfy udev due to PREFERRED_PROVIDERS
NOTE: selecting systemd to satisfy runtime systemd-extra-utils due to PREFERRED_PROVIDER_udev = systemd
NOTE: selecting glibc-locale to satisfy runtime glibc-gconv-euc-jp due to PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting glibc to satisfy runtime glibc due to PREFERRED_PROVIDER_virtual/libc = glibc
NOTE: selecting glibc to satisfy runtime libsegfault due to PREFERRED_PROVIDER_virtual/libc = glibc
NOTE: selecting glibc-locale to satisfy runtime glibc-charmap-cp1255 due to PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting glibc-locale to satisfy runtime glibc-gconv-iso8859-15 due to PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting linux-fslc-imx to satisfy runtime kernel-module-autofs4 due to PREFERRED_PROVIDER_virtual/kernel = linux-fslc-imx
NOTE: selecting make to satisfy runtime make due to PREFERRED_PROVIDER_virtual/make = make
NOTE: selecting linux-fslc-imx to satisfy runtime kernel-module-unix due to PREFERRED_PROVIDER_virtual/kernel = linux-fslc-imx
NOTE: selecting linux-fslc-imx to satisfy runtime kernel-module-squashfs due to PREFERRED_PROVIDER_virtual/kernel = linux-fslc-imx
NOTE: selecting linux-fslc-imx to satisfy runtime kernel-module-binfmt-misc due to PREFERRED_PROVIDER_virtual/kernel = linux-fslc-imx
NOTE: selecting systemd to satisfy runtime udev due to PREFERRED_PROVIDER_udev = systemd
NOTE: selecting glibc to satisfy runtime glibc-dev due to PREFERRED_PROVIDER_virtual/libc = glibc
NOTE: selecting systemd to satisfy runtime systemd due to PREFERRED_PROVIDER_udev = systemd
NOTE: selecting glibc-locale to satisfy runtime glibc-localedata-translit-cjk-variants due to PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting glibc-locale to satisfy runtime glibc-gconv-utf-7 due to PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting glibc-locale to satisfy runtime glibc-charmap-invariant due to PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting glibc-locale to satisfy runtime glibc-gconv-utf-16 due to PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting systemd to satisfy runtime systemd-dev due to PREFERRED_PROVIDER_udev = systemd
NOTE: selecting linux-fslc-imx to satisfy runtime kernel-module-ipv6 due to PREFERRED_PROVIDER_virtual/kernel = linux-fslc-imx
NOTE: selecting glibc-locale to satisfy runtime glibc-gconv-utf-32 due to PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting glibc-locale to satisfy runtime glibc-gconv-cp1255 due to PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting glibc-locale to satisfy runtime glibc-charmap-utf-8 due to PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting glibc-locale to satisfy runtime glibc-gconv-iso8859-1 due to PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting systemd to satisfy runtime systemd-vconsole-setup due to PREFERRED_PROVIDER_udev = systemd
NOTE: selecting systemd to satisfy runtime udev-hwdb due to PREFERRED_PROVIDER_udev = systemd
NOTE: selecting opkg-utils to satisfy virtual/update-alternatives due to PREFERRED_PROVIDERS
NOTE: selecting db-native to satisfy virtual/db-native due to PREFERRED_PROVIDERS
NOTE: selecting linux-libc-headers to satisfy linux-libc-headers due to PREFERRED_PROVIDERS
NOTE: selecting libgcc to satisfy libgcc due to PREFERRED_PROVIDERS
NOTE: selecting glibc-initial to satisfy virtual/arm-fslc-linux-gnueabi-libc-initial due to PREFERRED_PROVIDERS
NOTE: selecting opkg-utils-native to satisfy virtual/update-alternatives-native due to PREFERRED_PROVIDERS
NOTE: selecting glibc to satisfy virtual/libiconv due to PREFERRED_PROVIDERS
NOTE: selecting db to satisfy virtual/db due to PREFERRED_PROVIDERS
NOTE: selecting gcc-cross-arm to satisfy virtual/arm-fslc-linux-gnueabi-g++ due to PREFERRED_PROVIDERS
NOTE: selecting glibc to satisfy virtual/arm-fslc-linux-gnueabi-libc-for-gcc due to PREFERRED_PROVIDERS
NOTE: selecting openssl-native to satisfy openssl-native due to PREFERRED_PROVIDERS
NOTE: selecting openssl to satisfy openssl due to PREFERRED_PROVIDERS
NOTE: selecting glibc to satisfy virtual/libintl due to PREFERRED_PROVIDERS
NOTE: selecting gcc-cross-initial-arm to satisfy virtual/arm-fslc-linux-gnueabi-gcc-initial due to PREFERRED_PROVIDERS
NOTE: selecting linux-fslc-imx to satisfy runtime kernel-image-zimage due to PREFERRED_PROVIDER_virtual/kernel = linux-fslc-imx
NOTE: selecting openssl to satisfy runtime openssl-conf due to PREFERRED_PROVIDER_openssl = openssl
NOTE: selecting glibc-locale to satisfy runtime glibc-gconv-ebcdic-us due to PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting linux-fslc-imx to satisfy runtime kernel-base due to PREFERRED_PROVIDER_virtual/kernel = linux-fslc-imx
NOTE: selecting gcc-runtime to satisfy runtime libssp due to PREFERRED_PROVIDER_virtual/arm-fslc-linux-gnueabi-compilerlibs = gcc-runtime
NOTE: selecting linux-libc-headers to satisfy runtime linux-libc-headers-dev due to PREFERRED_PROVIDER_linux-libc-headers = linux-libc-headers
NOTE: selecting linux-fslc-imx to satisfy runtime kernel-image due to PREFERRED_PROVIDER_virtual/kernel = linux-fslc-imx
NOTE: selecting make to satisfy runtime make-dev due to PREFERRED_PROVIDER_virtual/make = make
NOTE: selecting glibc-locale to satisfy runtime locale-base-fr-fr due to PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting gettext to satisfy runtime gettext due to PREFERRED_PROVIDER_virtual/gettext = gettext
NOTE: selecting opkg-utils to satisfy runtime update-alternatives-opkg due to PREFERRED_PROVIDER_virtual/update-alternatives = opkg-utils
NOTE: selecting db to satisfy runtime db due to PREFERRED_PROVIDER_virtual/db = db
NOTE: selecting glibc-locale to satisfy runtime glibc-gconvs due to PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting libgcc to satisfy runtime libgcc due to PREFERRED_PROVIDER_libgcc = libgcc
NOTE: selecting openssl to satisfy runtime openssl-dev due to PREFERRED_PROVIDER_openssl = openssl
NOTE: selecting gettext to satisfy runtime gettext-dev due to PREFERRED_PROVIDER_virtual/gettext = gettext
NOTE: selecting glibc-locale to satisfy runtime glibc-localedatas due to PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting glibc-locale to satisfy runtime glibc-gconv-ibm1141 due to PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting openssl to satisfy runtime openssl-misc due to PREFERRED_PROVIDER_openssl = openssl
NOTE: selecting openssl to satisfy runtime openssl due to PREFERRED_PROVIDER_openssl = openssl
NOTE: selecting glibc-locale to satisfy runtime locale-base-de-de due to PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting glibc-locale to satisfy runtime glibc-charmaps due to PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting glibc-locale to satisfy runtime glibc-gconv-iso8859-5 due to PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting db to satisfy runtime db-dev due to PREFERRED_PROVIDER_virtual/db = db
NOTE: selecting glibc-locale to satisfy runtime locale-base-ru-ru due to PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale

Build Configuration:
BB_VERSION           = "1.36.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "arm-fslc-linux-gnueabi"
MACHINE              = "imx6ulevk"
DISTRO               = "fslc-framebuffer"
DISTRO_VERSION       = "2.4"
TUNE_FEATURES        = "arm armv7a vfp thumb neon callconvention-hard"
TARGET_FPU           = "hard"
meta
meta-poky            = "HEAD:9ed1178c87afce997d5a21cadae7461fb6bb48da"
meta-oe
meta-filesystems
meta-multimedia      = "HEAD:352531015014d1957d6444d114f4451e241c4d23"
meta-freescale       = "HEAD:a4158e3425a79720ddc4c02e76251d567bdceb51"
meta-freescale-3rdparty = "HEAD:a02324e27f7a7ac630dab616f46a8bad7fe2c071"
meta-freescale-distro = "HEAD:51756d1c2058139c8a21f89b86cfd8007b71b7f0"
meta-snappy          = "master:0b97a631282b6b8350de10d0265d726e8c7d6f77"

NOTE: Marking Active Tasks###################################################################################################################################################################                                                                                                                                                                                                                               | ETA:  0:00:02
NOTE: Pruned 3078 inactive tasks, 2060 left###################################################################################################################################################                                                                                                                                                                                                                              | ETA:  0:00:02
NOTE: Assign Weightings
NOTE: Compute totals (have 1 endpoint(s))######################################################################################################################################################                                                                                                                                                                                                                             | ETA:  0:00:02
Initialising tasks: 100% |##################################################################################################################################################################################################################################################################################################################################################################################################| Time: 0:00:03
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 2060 tasks of which 2060 didn't need to be rerun and all succeeded.
NOTE: Writing buildhistory
+ buildhistory_commit
+ [ ! -d /home/kurako/fsl-community-bsp/build/buildhistory ]

+ cat

+ cd /home/kurako/fsl-community-bsp/build/buildhistory/
+ [ !
 -e .git ]
+ git tag -f build-minus-3 build-minus-2

+ git tag -f build-minus-2 build-minus-1

+ git tag -f build-minus-1

+ check_git_config
+ git config user.email

+ git config user.name

+ git status --porcelain

+ grep -v  metadata-revs$

+ repostatus=

+ hostname

+ HOSTNAME=kurako-udsk
+ CMDLINE=bitbake -v snapd
+ [
  !=  ]
+ buildhistory_single_commit bitbake -v snapd kurako-udsk
+ [  =  ]
+ commitopts=/home/kurako/fsl-community-bsp/build/buildhistory/ --allow-empty
+ shortlogprefix=No changes:
+ [ 0 = 0 ]
+ result=succeeded
+ mktemp

+ commitmsgfile=/tmp/tmp.iLhhbeE93V

+ cat

+ cat /home/kurako/fsl-community-bsp/build/buildhistory/metadata-revs

+ git commit /home/kurako/fsl-community-bsp/build/buildhistory/ --allow-empty -F /tmp/tmp.iLhhbeE93V --author buildhistory <buildhistory@fslc-framebuffer>

+ rm /tmp/tmp.iLhhbeE93V

+ [  !=  ]

+ ret=0
+ trap  0
+ exit 0

Unfortunately in the attached log does not contain any relevant output, snapd must have been built before that.

I’d start by checking the bitbake -e snapd and inspecting build/configure log files in $WORKDIR.
Also bitbake -c cleansstate snapd will drop the current build artifacts and bitbake -v snapd will do the actual build starting from scratch.

The first log provided by @edo.red suggests that snapd was not rebuilt for the target. IIRC there’s nothing stopping that from working, so it might be something between the Go support in OE-core and BSP layers you use or some missing dependency.

Also note, that snaps are squashfs, so squashfs kernel modules is needed. You may need to update RDEPENDS for your target.

there is building RDEPENDS missing, here is the error i get after running your commands and trying to rebuild:

Error:
Problem 1: conflicting requests

  • nothing provides kernel-module-squashfs needed by snapd-2.32.2-r0.armv7at2hf_neon
    Problem 2: package packagegroup-snapd-1.0-r0.noarch requires snapd, but none of the providers can be installed
  • conflicting requests
  • nothing provides kernel-module-squashfs needed by snapd-2.32.2-r0.armv7at2hf_neon

how can i update the RDEPENDS so it can find the module that is looking for?

You need to enable squashfs in your kernel configuration.

I took a look at meta-fsl-arm (which has been abandoned ~2 years ago and is part of meta-freescale now), the linux-imx kernel defconfig does not enable the squashfs module. You will need to update the kernel configuration yourself. I do not recall linux-imx packages using configuration fragments like linux-yocto does, so you will have to add a linux-imx_%.bbappend file and update the configration there.

The meta-snappy layer contains a defconfig for linux-yocto right here https://github.com/morphis/meta-snappy/blob/master/recipes-kernel/linux/files/snappy.cfg you can use it as reference to figure out what needs to be enabled in your kernel. Not everything listed there is needed. I’d say the most important settings are: CONFIG_SQUASHFS (with CONFIG_SQUASHFS_XZ), CONFIG_*_NS, CONFIG_CGROUPS and CONFIG_SECCOMP. There is some additional information about kernel requirements and configuration of sample kernels right here https://github.com/snapcore/sample-kernels/tree/master.

Thank you for your help, adding CONFIG_SQUASHFS and all the other relevant configuration made our build succeed

thanks again

thank you so much for your support, it actually worked