Hi,
I need anbox on my Yocto build for IMX8mp. is there any reference guide to build anbox into Yocto Build?
Is it possible to add anbox?
#NXP #ANDROID #YOCTO
As i am trying with the below recipe
1 SUMMARY = "Anbox - Android in a Box"
2 LICENSE = "GPL-3.0-only"
3 LIC_FILES_CHKSUM = "file://${WORKDIR}/git/COPYING.GPL;md5=f27defe1e96c2e1ecd4e0c9be8967949"
4 SRC_URI = "git://github.com/anbox/anbox.git;branch=master;protocol=https \
5 file://0001-myCMake.patch"
6 SRCREV = "${AUTOREV}"
7 S = "${WORKDIR}/git"
8
9 DEPENDS += "cmake lxc protobuf libsdl2 libcap mesa boost expat systemd libsdl2 python3 egl-gbm boost-sml"
10
11 inherit cmake
12 BOOST_VERSION = "1.81.0"
13
14 do_configure() {
15 mkdir -p ${S}/build
16 cd ${S}/build
17 cmake \
18 -DEGL_INCLUDE_DIR=${STAGING_INCDIR_NATIVE}/egl \
19 -DEGL_LIBRARY_DIRS=${STAGING_LIBDIR_NATIVE} \
20 -DGLESv2_INCLUDE_DIR=${STAGING_INCDIR_NATIVE}/GLES2 \
21 -DGLESv2_LIBRARY_DIRS=${STAGING_LIBDIR_NATIVE} \
22 -DBoost_INCLUDE_DIR=${STAGING_INCDIR_NATIVE} \
23 -DBoost_LIBRARY_DIRS=${STAGING_LIBDIR_NATIVE} \
24 -DProtobuf_INCLUDE_DIR=${STAGING_INCDIR_NATIVE}/protobuf \
25 -DProtobuf_LIBRARY_DIRS=${STAGING_LIBDIR_NATIVE} \
26 ..
27 }
28
29 do_compile() {
30 cd ${S}/build
31 oe_runmake
32 }
33
34 do_install() {
35 cd ${S}/build
36 oe_runmake DESTDIR=${D} install
37 }
38
39 FILES_${PN} += "/usr/bin /usr/lib /etc /data"
Getting Error as mentioned,
lab3@daikokunw-Server:~/dkk/imx-yocto-bsp/build$ bitbake anbox
Loading cache: 100% |###############################################################################################################################################################################| Time: 0:00:00
Loaded 5656 entries from dependency cache.
Parsing recipes: 100% |#############################################################################################################################################################################| Time: 0:00:00
Parsing of 3669 .bb files complete (3668 cached, 1 parsed). 5657 targets, 520 skipped, 19 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "2.4.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "aarch64-poky-linux"
MACHINE = "imx8mp-lpddr4-evk"
DISTRO = "fsl-imx-xwayland"
DISTRO_VERSION = "6.1-mickledore"
TUNE_FEATURES = "aarch64 armv8a crc crypto"
TARGET_FPU = ""
meta
meta-poky = "HEAD:a57506c46d92bf0767060102d2139be06d46f575"
meta-oe
meta-multimedia
meta-python = "HEAD:922f41b39f364e5b6be596b4b51e0fb37ffe1971"
meta-freescale = "HEAD:7327e03c61823268a5a957fe090c4cc5e1735b34"
meta-freescale-3rdparty = "HEAD:bccd93f1ceece608e69799b6fc8f79e8a519f89e"
meta-freescale-distro = "HEAD:7956a0ab407a33c40fdc6eb4fabdcb7dc54fd359"
meta-bsp
meta-sdk
meta-ml
meta-v2x = "HEAD:c842613830da0a5473513cdbc2dce015b0ca9a5d"
meta-nxp-demo-experience = "HEAD:b8c0a9af3e3ca5400b9aff6436fbb654d3108cb4"
meta-arm
meta-arm-toolchain = "HEAD:c6380674f59489b327c5047d803cc35b68642cd4"
meta-chromium = "HEAD:e232c2e21b96dc092d9af8bea4b3a528e7a46dd6"
meta-clang = "HEAD:af4dcba009ba98250315520f3003fde4ee164cce"
meta-gnome
meta-networking
meta-filesystems = "HEAD:922f41b39f364e5b6be596b4b51e0fb37ffe1971"
meta-qt6 = "HEAD:1406d0a85525a71fe5d7892d7f915404290a78ad"
meta-parsec
meta-tpm = "HEAD:d7db0a3bd1a8639df7570483f003ce00cbe274a2"
meta-virtualization = "HEAD:38e6b3e2fe0219c773f4637a09221ca5d15bf6fc"
meta-tegra = "mickledore:ceb54c5b8cd3369a45c4d9bb8de6090b59eaa2ed"
meta-daikoku = "<unknown>:<unknown>"
Initialising tasks: 100% |##########################################################################################################################################################################| Time: 0:00:00
Sstate summary: Wanted 8 Local 2 Mirrors 0 Missed 6 Current 645 (25% match, 99% complete)
NOTE: Executing Tasks
ERROR: anbox-0.1-r0 do_configure: ExecutionError('/home/lab3/dkk/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/anbox/0.1-r0/temp/run.do_configure.606920', 1, None, None)
ERROR: Logfile of failure stored in: /home/lab3/dkk/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/anbox/0.1-r0/temp/log.do_configure.606920
Log data follows:
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are ['/home/lab3/dkk/imx-yocto-bsp/sources/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb:do_populate_sysroot', '/home/lab3/dkk/imx-yocto-bsp/sources/meta-openembedded/meta-oe/recipes-support/boost-sml/boost-sml_git.bb:do_populate_sysroot', '/home/lab3/dkk/imx-yocto-bsp/sources/meta-tegra/recipes-graphics/mesa/egl-gbm_1.1.0.bb:do_populate_sysroot', '/home/lab3/dkk/imx-yocto-bsp/sources/meta-virtualization/recipes-containers/lxc/lxc_git.bb:do_populate_sysroot', '/home/lab3/dkk/imx-yocto-bsp/sources/poky/meta/recipes-core/expat/expat_2.5.0.bb:do_populate_sysroot', '/home/lab3/dkk/imx-yocto-bsp/sources/poky/meta/recipes-core/glibc/glibc_2.37.bb:do_populate_sysroot', '/home/lab3/dkk/imx-yocto-bsp/sources/poky/meta/recipes-core/systemd/systemd_253.1.bb:do_populate_sysroot', '/home/lab3/dkk/imx-yocto-bsp/sources/poky/meta/recipes-devtools/cmake/cmake-native_3.25.2.bb:do_populate_sysroot', '/home/lab3/dkk/imx-yocto-bsp/sources/poky/meta/recipes-devtools/cmake/cmake_3.25.2.bb:do_populate_sysroot', '/home/lab3/dkk/imx-yocto-bsp/sources/poky/meta/recipes-devtools/gcc/gcc-cross_12.3.bb:do_populate_sysroot', '/home/lab3/dkk/imx-yocto-bsp/sources/poky/meta/recipes-devtools/gcc/gcc-runtime_12.3.bb:do_populate_sysroot', '/home/lab3/dkk/imx-yocto-bsp/sources/poky/meta/recipes-devtools/python/python3_3.11.5.bb:do_populate_sysroot', '/home/lab3/dkk/imx-yocto-bsp/sources/poky/meta/recipes-devtools/quilt/quilt-native_0.67.bb:do_populate_sysroot', '/home/lab3/dkk/imx-yocto-bsp/sources/poky/meta/recipes-graphics/libsdl2/libsdl2_2.26.5.bb:do_populate_sysroot', '/home/lab3/dkk/imx-yocto-bsp/sources/poky/meta/recipes-graphics/mesa/mesa_23.0.3.bb:do_populate_sysroot', '/home/lab3/dkk/imx-yocto-bsp/sources/poky/meta/recipes-support/boost/boost_1.81.0.bb:do_populate_sysroot', '/home/lab3/dkk/imx-yocto-bsp/sources/poky/meta/recipes-support/libcap/libcap_2.67.bb:do_populate_sysroot', 'virtual:native:/home/lab3/dkk/imx-yocto-bsp/sources/poky/meta/recipes-devtools/ninja/ninja_1.11.1.bb:do_populate_sysroot', 'virtual:native:/home/lab3/dkk/imx-yocto-bsp/sources/poky/meta/recipes-devtools/patch/patch_2.7.6.bb:do_populate_sysroot', 'virtual:native:/home/lab3/dkk/imx-yocto-bsp/sources/poky/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot']
| NOTE: Installed into sysroot: []
| NOTE: Skipping as already exists in sysroot: ['protobuf', 'boost-sml', 'egl-gbm', 'lxc', 'expat', 'glibc', 'systemd', 'cmake-native', 'cmake', 'gcc-cross-aarch64', 'gcc-runtime', 'python3', 'quilt-native', 'libsdl2', 'mesa', 'boost', 'libcap', 'ninja-native', 'patch-native', 'pseudo-native', 'linux-libc-headers', 'libseccomp', 'base-passwd', 'util-linux', 'libxkbcommon', 'bash-completion', 'shadow-sysroot', 'opkg-utils', 'update-rc.d', 'libpam', 'shadow-native', 'shadow', 'kmod', 'initscripts', 'base-files', 'acl', 'zstd', 'vulkan-loader', 'wayland-protocols', 'libxfixes', 'libdrm', 'libxext', 'wayland', 'libxdamage', 'libxshmfence', 'xorgproto', 'xrandr', 'vulkan-headers', 'libxxf86vm', 'libx11', 'zlib', 'icu', 'bzip2', 're2c-native', 'libgcc', 'libarchive', 'ncurses', 'xz', 'curl', 'libxml2', 'imx-gpu-viv', 'eglexternalplatform', 'gmp-native', 'texinfo-dummy-native', 'libtool-native', 'binutils-cross-aarch64', 'gnu-config-native', 'xz-native', 'zstd-native', 'zlib-native', 'flex-native', 'libmpc-native', 'mpfr-native', 'attr-native', 'alsa-lib', 'pulseaudio', 'libxrandr', 'libxrender', 'readline', 'libffi', 'util-linux-libuuid', 'libtirpc', 'sqlite3', 'gdbm', 'libnsl2', 'openssl', 'libxcrypt', 'ncurses-native', 'bzip2-native', 'openssl-native', 'libcap-ng', 'libxcb', 'xkeyboard-config', 'cracklib', 'attr', 'util-macros', 'libpciaccess', 'libpthread-stubs', 'xtrans', 'libidn2', 'gettext-minimal-native', 'm4-native', 'libtool', 'sbc', 'dbus', 'libsndfile1', 'libsm', 'libxtst', 'libice', 'speexdsp', 'glib-2.0', 'avahi', 'bluez5', 'libatomic-ops', 'ofono', 'cryptodev-linux', 'perl-native', 'libxau', 'libxdmcp', 'xcb-proto', 'libunistring', 'libogg', 'flac', 'libvorbis', 'libxi', 'libpcre2', 'libdaemon', 'gobject-introspection', 'libical', 'ell', 'mobile-broadband-provider-info', 'gdbm-native', 'make-native', 'vala']
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_configure
| -- The C compiler identification is GNU 12.3.0
| -- The CXX compiler identification is GNU 12.3.0
| -- Detecting C compiler ABI info
| -- Detecting C compiler ABI info - done
| -- Check for working C compiler: /home/lab3/dkk/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/anbox/0.1-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc - skipped
| -- Detecting C compile features
| -- Detecting C compile features - done
| -- Detecting CXX compiler ABI info
| -- Detecting CXX compiler ABI info - done
| -- Check for working CXX compiler: /home/lab3/dkk/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/anbox/0.1-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++ - skipped
| -- Detecting CXX compile features
| -- Detecting CXX compile features - done
| -- No build type selected, default to RelWithDebInfo
| -- Treat warnings as errors
| CMake Error at /home/lab3/dkk/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/anbox/0.1-r0/recipe-sysroot-native/usr/share/cmake-3.25/Modules/FindBoost.cmake:1826 (file):
| file STRINGS file
| "/home/lab3/dkk/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/anbox/0.1-r0/recipe-sysroot-native/usr/include/boost/version.hpp"
| cannot be read.
| Call Stack (most recent call first):
| CMakeLists.txt:59 (find_package)
|
|
| CMake Warning at /home/lab3/dkk/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/anbox/0.1-r0/recipe-sysroot-native/usr/share/cmake-3.25/Modules/FindBoost.cmake:1015 (message):
| Imported targets and dependency information not available for Boost version
| 0.0.0 (all versions older than 1.33)
| Call Stack (most recent call first):
| /home/lab3/dkk/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/anbox/0.1-r0/recipe-sysroot-native/usr/share/cmake-3.25/Modules/FindBoost.cmake:1508 (_Boost_COMPONENT_DEPENDENCIES)
| /home/lab3/dkk/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/anbox/0.1-r0/recipe-sysroot-native/usr/share/cmake-3.25/Modules/FindBoost.cmake:2119 (_Boost_MISSING_DEPENDENCIES)
| CMakeLists.txt:59 (find_package)
|
|
| CMake Warning at /home/lab3/dkk/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/anbox/0.1-r0/recipe-sysroot-native/usr/share/cmake-3.25/Modules/FindBoost.cmake:1015 (message):
| Imported targets and dependency information not available for Boost version
| 0.0.0 (all versions older than 1.33)
| Call Stack (most recent call first):
| /home/lab3/dkk/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/anbox/0.1-r0/recipe-sysroot-native/usr/share/cmake-3.25/Modules/FindBoost.cmake:1508 (_Boost_COMPONENT_DEPENDENCIES)
| /home/lab3/dkk/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/anbox/0.1-r0/recipe-sysroot-native/usr/share/cmake-3.25/Modules/FindBoost.cmake:2119 (_Boost_MISSING_DEPENDENCIES)
| CMakeLists.txt:59 (find_package)
|
|
| CMake Warning at /home/lab3/dkk/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/anbox/0.1-r0/recipe-sysroot-native/usr/share/cmake-3.25/Modules/FindBoost.cmake:1015 (message):
| Imported targets and dependency information not available for Boost version
| 0.0.0 (all versions older than 1.33)
| Call Stack (most recent call first):
| /home/lab3/dkk/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/anbox/0.1-r0/recipe-sysroot-native/usr/share/cmake-3.25/Modules/FindBoost.cmake:1508 (_Boost_COMPONENT_DEPENDENCIES)
| /home/lab3/dkk/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/anbox/0.1-r0/recipe-sysroot-native/usr/share/cmake-3.25/Modules/FindBoost.cmake:2119 (_Boost_MISSING_DEPENDENCIES)
| CMakeLists.txt:59 (find_package)
|
|
| CMake Warning at /home/lab3/dkk/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/anbox/0.1-r0/recipe-sysroot-native/usr/share/cmake-3.25/Modules/FindBoost.cmake:1015 (message):
| Imported targets and dependency information not available for Boost version
| 0.0.0 (all versions older than 1.33)
| Call Stack (most recent call first):
| /home/lab3/dkk/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/anbox/0.1-r0/recipe-sysroot-native/usr/share/cmake-3.25/Modules/FindBoost.cmake:1508 (_Boost_COMPONENT_DEPENDENCIES)
| /home/lab3/dkk/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/anbox/0.1-r0/recipe-sysroot-native/usr/share/cmake-3.25/Modules/FindBoost.cmake:2119 (_Boost_MISSING_DEPENDENCIES)
| CMakeLists.txt:59 (find_package)
|
|
| CMake Warning at /home/lab3/dkk/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/anbox/0.1-r0/recipe-sysroot-native/usr/share/cmake-3.25/Modules/FindBoost.cmake:1015 (message):
| Imported targets and dependency information not available for Boost version
| 0.0.0 (all versions older than 1.33)
| Call Stack (most recent call first):
| /home/lab3/dkk/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/anbox/0.1-r0/recipe-sysroot-native/usr/share/cmake-3.25/Modules/FindBoost.cmake:1508 (_Boost_COMPONENT_DEPENDENCIES)
| /home/lab3/dkk/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/anbox/0.1-r0/recipe-sysroot-native/usr/share/cmake-3.25/Modules/FindBoost.cmake:2119 (_Boost_MISSING_DEPENDENCIES)
| CMakeLists.txt:59 (find_package)
|
|
| -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
| -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
| -- Found Threads: TRUE
| -- Could NOT find Boost (missing: filesystem log serialization thread program_options) (found version "0.0.0")
| -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2")
| -- Found EGL: /home/lab3/dkk/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/anbox/0.1-r0/recipe-sysroot/usr/lib/libEGL.so
| -- Found GLESv2: /home/lab3/dkk/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/anbox/0.1-r0/recipe-sysroot/usr/lib/libGLESv2.so
| CMake Error at /home/lab3/dkk/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/anbox/0.1-r0/recipe-sysroot-native/usr/share/cmake-3.25/Modules/FindProtobuf.cmake:493 (file):
| file STRINGS file
| "/home/lab3/dkk/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/anbox/0.1-r0/recipe-sysroot-native/usr/include/protobuf/google/protobuf/stubs/common.h"
| cannot be read.
| Call Stack (most recent call first):
| CMakeLists.txt:64 (find_package)
|
|
| CMake Error at /home/lab3/dkk/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/anbox/0.1-r0/recipe-sysroot-native/usr/share/cmake-3.25/Modules/FindProtobuf.cmake:499 (math):
| math cannot parse the expression: " / 1000000": syntax error, unexpected
| exp_DIVIDE (2).
| Call Stack (most recent call first):
| CMakeLists.txt:64 (find_package)
|
|
| CMake Error at /home/lab3/dkk/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/anbox/0.1-r0/recipe-sysroot-native/usr/share/cmake-3.25/Modules/FindProtobuf.cmake:500 (math):
| math cannot parse the expression: " / 1000 % 1000": syntax error,
| unexpected exp_DIVIDE (2).
| Call Stack (most recent call first):
| CMakeLists.txt:64 (find_package)
|
|
| CMake Error at /home/lab3/dkk/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/anbox/0.1-r0/recipe-sysroot-native/usr/share/cmake-3.25/Modules/FindProtobuf.cmake:501 (math):
| math cannot parse the expression: " % 1000": syntax error, unexpected
| exp_MOD (2).
| Call Stack (most recent call first):
| CMakeLists.txt:64 (find_package)
|
|
| CMake Error at /home/lab3/dkk/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/anbox/0.1-r0/recipe-sysroot-native/usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
| Could NOT find Protobuf (missing: Protobuf_LIBRARIES) (found version
| "ERROR.ERROR.ERROR")
| Call Stack (most recent call first):
| /home/lab3/dkk/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/anbox/0.1-r0/recipe-sysroot-native/usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
| /home/lab3/dkk/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/anbox/0.1-r0/recipe-sysroot-native/usr/share/cmake-3.25/Modules/FindProtobuf.cmake:650 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
| CMakeLists.txt:64 (find_package)
|
|
| -- Configuring incomplete, errors occurred!
| See also "/home/lab3/dkk/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/anbox/0.1-r0/git/build/CMakeFiles/CMakeOutput.log".
| WARNING: exit code 1 from a shell command.
ERROR: Task (/home/lab3/dkk/imx-yocto-bsp/sources/meta-daikoku/recipes-extended/anbox/anbox_0.1.bb:do_configure) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2255 tasks of which 2249 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
/home/lab3/dkk/imx-yocto-bsp/sources/meta-daikoku/recipes-extended/anbox/anbox_0.1.bb:do_configure
Summary: There was 1 ERROR message, returning a non-zero exit code.
lab3@daikokunw-Server:~/dkk/imx-yocto-bsp/build$
Please Guide me to fix this error or share me the recipe reference for anbox for IMX8m plus yocto build.
This is anbox build issue. You need to fix it by yourself according to the error messages from the building.
You could write a recipe .bb file to build the anbox.
FYI.
Hello,
Team @nxp please respond