bitbake swupdate fails with following error: log: DEBUG: Executing shell function do_compile NOTE: make -j 2 V=1 ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- SKIP_STRIP=y swupdate_unstripped ERROR: oe_runmake failed make -f /home/admin/rzgb/poky/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/swupdate/2016.10-r0/git/Makefile silentoldconfig make -f scripts/Makefile.build obj=scripts/basic mkdir -p include/linux include/config make -f scripts/Makefile.build obj=scripts/kconfig silentoldconfig mkdir -p include/config include/generated scripts/kconfig/conf --silentoldconfig Kconfig make -f scripts/Makefile.build obj=core make -f scripts/Makefile.build obj=handlers make -f scripts/Makefile.build obj=archival make -f scripts/Makefile.build obj=corelib make -f scripts/Makefile.build obj=ipc make -f scripts/Makefile.build obj=mongoose make -f scripts/Makefile.build obj=parser arm-poky-linux-gnueabi-gcc -march=armv7ve -marm -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=/home/admin/rzgb/poky/build/tmp/sysroots/raspberrypi3 -Wp,-MD,mongoose/.mongoose.o.d -Iinclude -include include/generated/autoconf.h -std=gnu99 -D_GNU_SOURCE -DNDEBUG -D"SWU_VER=KBUILD_STR(2016.10.0)" -Wall -Wshadow -Wwrite-strings -Wundef -Wstrict-prototypes -Wunused -Wunused-parameter -Wunused-function -Wunused-value -Wmissing-prototypes -Wmissing-declarations -Wno-format-security -Wold-style-definition -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections -fno-guess-branch-probability -funsigned-char -static-libgcc -falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -fno-unwind-tables -fno-asynchronous-unwind-tables -Os -DNO_SSL_DL -DUSE_LUA -DUSE_IPV6 -D"KBUILD_STR(s)=#s" -c -o mongoose/mongoose.o mongoose/mongoose.c make -f scripts/Makefile.build obj=suricatta rm -f mongoose/lib.a; arm-poky-linux-gnueabi-ar rcs mongoose/lib.a mongoose/mongoose.o mongoose/mongoose_interface.o /home/admin/rzgb/poky/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/swupdate/2016.10-r0/git/scripts/trylink "swupdate_unstripped" "arm-poky-linux-gnueabi-gcc -march=armv7ve -marm -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=/home/admin/rzgb/poky/build/tmp/sysroots/raspberrypi3" " -Wall -Wshadow -Wwrite-strings -Wundef -Wstrict-prototypes -Wunused -Wunused-parameter -Wunused-function -Wunused-value -Wmissing-prototypes -Wmissing-declarations -Wno-format-security -Wold-style-definition -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections -fno-guess-branch-probability -funsigned-char -static-libgcc -falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -fno-unwind-tables -fno-asynchronous-unwind-tables -Os -DNO_SSL_DL -DUSE_LUA -DUSE_IPV6 " " -Wl,-E" "core/built-in.o handlers/built-in.o" "archival/lib.a corelib/lib.a ipc/lib.a mongoose/lib.a parser/lib.a suricatta/lib.a" "pthread lua m dl config crypto ssl ubi mtd z z ubootenv " Trying libraries: pthread lua m dl config crypto ssl ubi mtd z ubootenv Failed: -Wl,--start-group -lpthread -llua -lm -ldl -lconfig -lcrypto -lssl -lubi -lmtd -lz -lubootenv -Wl,--end-group Output of: arm-poky-linux-gnueabi-gcc -march=armv7ve -marm -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=/home/admin/rzgb/poky/build/tmp/sysroots/raspberrypi3 -Wall -Wshadow -Wwrite-strings -Wundef -Wstrict-prototypes -Wunused -Wunused-parameter -Wunused-function -Wunused-value -Wmissing-prototypes -Wmissing-declarations -Wno-format-security -Wold-style-definition -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections -fno-guess-branch-probability -funsigned-char -static-libgcc -falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -fno-unwind-tables -fno-asynchronous-unwind-tables -Os -DNO_SSL_DL -DUSE_LUA -DUSE_IPV6 -Wl,-E -o swupdate_unstripped -Wl,--sort-common -Wl,--sort-section,alignment -Wl,--gc-sections -Wl,--start-group core/built-in.o handlers/built-in.o archival/lib.a corelib/lib.a ipc/lib.a mongoose/lib.a parser/lib.a suricatta/lib.a -Wl,--end-group -Wl,--start-group -lpthread -llua -lm -ldl -lconfig -lcrypto -lssl -lubi -lmtd -lz -lubootenv -Wl,--end-group ========== /home/admin/rzgb/poky/build/tmp/sysroots/raspberrypi3/usr/lib/libubootenv.a(fw_env.o): In function `getenvsize': /usr/src/debug/u-boot-fw-utils/v2016.03+gitAUTOINC+df61a74e68-r0/git/tools/env/fw_env.c:131: undefined reference to `common_args' /usr/src/debug/u-boot-fw-utils/v2016.03+gitAUTOINC+df61a74e68-r0/git/tools/env/fw_env.c:131: undefined reference to `common_args' /home/admin/rzgb/poky/build/tmp/sysroots/raspberrypi3/usr/lib/libubootenv.a(fw_env.o): In function `env_aes_cbc_crypt': /usr/src/debug/u-boot-fw-utils/v2016.03+gitAUTOINC+df61a74e68-r0/git/tools/env/fw_env.c:968: undefined reference to `common_args' /home/admin/rzgb/poky/build/tmp/sysroots/raspberrypi3/usr/lib/libubootenv.a(fw_env.o): In function `fw_getenv': /usr/src/debug/u-boot-fw-utils/v2016.03+gitAUTOINC+df61a74e68-r0/git/tools/env/fw_env.c:161: undefined reference to `common_args' /usr/src/debug/u-boot-fw-utils/v2016.03+gitAUTOINC+df61a74e68-r0/git/tools/env/fw_env.c:161: undefined reference to `common_args' /home/admin/rzgb/poky/build/tmp/sysroots/raspberrypi3/usr/lib/libubootenv.a(fw_env.o):/usr/src/debug/u-boot-fw-utils/v2016.03+gitAUTOINC+df61a74e68-r0/git/tools/env/fw_env.c:187: more undefined references to `common_args' follow /home/admin/rzgb/poky/build/tmp/sysroots/raspberrypi3/usr/lib/libubootenv.a(fw_env.o): In function `fw_printenv': /usr/src/debug/u-boot-fw-utils/v2016.03+gitAUTOINC+df61a74e68-r0/git/tools/env/fw_env.c:260: undefined reference to `printenv_args' /usr/src/debug/u-boot-fw-utils/v2016.03+gitAUTOINC+df61a74e68-r0/git/tools/env/fw_env.c:260: undefined reference to `printenv_args' /usr/src/debug/u-boot-fw-utils/v2016.03+gitAUTOINC+df61a74e68-r0/git/tools/env/fw_env.c:290: undefined reference to `common_args' /usr/src/debug/u-boot-fw-utils/v2016.03+gitAUTOINC+df61a74e68-r0/git/tools/env/fw_env.c:290: undefined reference to `common_args' /usr/src/debug/u-boot-fw-utils/v2016.03+gitAUTOINC+df61a74e68-r0/git/tools/env/fw_env.c:246: undefined reference to `common_args' /usr/src/debug/u-boot-fw-utils/v2016.03+gitAUTOINC+df61a74e68-r0/git/tools/env/fw_env.c:246: undefined reference to `common_args' collect2: error: ld returned 1 exit status Makefile:372: recipe for target 'swupdate_unstripped' failed make: *** [swupdate_unstripped] Error 1 WARNING: exit code 1 from a shell command. ERROR: Function failed: do_compile (log file is located at /home/admin/rzgb/poky/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/swupdate/2016.10-r0/temp/log.do_compile.14408)
This appears to be meta-swupdate[1] not meta-swupd[2]. We don't formally track meta-swupdate bugs in this issue tracker but as Stefano (the swupdate developer) is a registered user of this bugzilla, let's try assigning the bug to him. 1. https://github.com/sbabic/meta-swupdate/ 2. http://git.yoctoproject.org/cgit/cgit.cgi/meta-swupd
Resolving this issue as invalid as meta-swupdate bugs aren't tracked in Yocto Bugzilla. The layer README at https://github.com/sbabic/meta-swupdate/ suggests questions can be sent to swupdate@googlegroups.com
Confirmed that this is related to SWUpdate and it has nothing to do with swupd. I report for the history my answer to SWUpdate's ML: This is a known issue that happens with u-boot < 2016.07, when the patch for the library were not yet integrated. Later versions are not affected by this problem. From log it seems you are using krogoth, and u-boot 2016.3 does not support the library. You have to ways: - you could take patches for tools/env from current u-boot (even 2017.01) and add them to your u-boot-fw-utils_%.bbappend - you could update u-boot-fw-utils to a newer version. In both cases, it is very important you set U-Boot's machine to build the library for the *right* machine (a raspi in your case). This guarantees that you do not brick the board if no environment is stored on the board and you run SWUpdate with default environment. Building u-boot-fw-utils with the correct machine lets the default environment to be stored inside the library, and SWUpdate can successful save a new environment even if nothing is stored in the flash.