LSDK1909 weston compilation failure on custom docker container

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LSDK1909 weston compilation failure on custom docker container

Jump to solution
3,397 Views
rita_fang
Contributor II

I am having trouble building a ls1088ardb_pb image (with CONFIG_APP_SECURE_OBJ and CONFIG_APP_OPTEE enabled) via LSDK 19.09 on a docker amd64 Ubuntu 18.04.3 container.

I have seen previous questions about this (LSDK weston build error , compilation failure flexbuild_lsdk1909_update_221019 "app" component 'weston' ) and tried running "sudo apt install -y binfmt-support qemu-system-common qemu-user-static" in the container, but the issue still exists.

Additionally, because I do not have sudo permissions on the host machine, I am not able to run "flex-builder docker" on the host, and so I've been mounting to the LSDK directory and installing the apt-get dependencies within the container manually.

Labels (1)
1 Solution
3,200 Views
rita_fang
Contributor II

I figured out the issue: I had been installing “sudo apt install -y binfmt-support qemu-system-common qemu-user-static" within the container, rather than the host.After installing it on the host, the issue was resolved.

Thank you!

View solution in original post

5 Replies
3,200 Views
Pavel
NXP Employee
NXP Employee

Try to install “sudo apt install -y binfmt-support qemu-system-common qemu-user-static“.

It should resolve your issue.

Have a great day,
Pavel Chubakov

0 Kudos
Reply
3,200 Views
rita_fang
Contributor II

I ran

sudo apt install -y binfmt-support qemu-system-common qemu-user-static

then re-tried

flex-builder -m ls1088ardb_pb

Unfortunately, I still got the same error:

 Building weston ...
chroot: failed to run command 'ldconfig': Exec format error
Makefile:720: recipe for target 'weston' failed
make[1]: *** [weston] Error 126
make[1]: Leaving directory '/src/packages/apps'
Makefile:28: recipe for target 'apps' failed
make: *** [apps] Error 2
make: Leaving directory '/src'

I'm not sure if the fact that I started a clean docker container without using "flex-builder docker", then mounted to the LSDK directory and installed the packages in the dockerfile manually may be the cause. Trying to run flex-builder docker involved permissions I do not have, so I have been trying to use a workaround.

docker run --net=host -v $(pwd):/src -it ubuntu:18.04

apt-get update

apt-get dist-upgrade

apt-get update
apt-get install -y \
        u-boot-tools device-tree-compiler autoconf automake dh-autoreconf libssl-dev zip \
        openssl python-pip flex bison bc git gcc vim ethtool wget ftp make makedev tclsh \
        binfmt-support qemu-system-common qemu-user-static debootstrap sudo ncurses-dev  \
        gcc-arm-linux-gnueabihf crossbuild-essential-arm64 gcc-aarch64-linux-gnu file    \
        build-essential gdb u-boot-tools device-tree-compiler python python-dev curl     \
        libxml2-dev libsensors4-dev libssl-dev libedit-dev liblzma-dev tree binutils-dev \
        libnuma-dev libpcap-dev libtool mtd-utils libncurses5-dev libelf-dev net-tools   \
        libcunit1-dev pkg-config autotools-dev crossbuild-essential-armhf openssh-server \
        openssh-client crossbuild-essential-armhf qemu-utils kmod g++-aarch64-linux-gnu  \
        cpp-arm-linux-gnueabihf dosfstools ruby iputils-ping cpio rsync libtclap-dev     \
        parted android-tools-fsutils rpm2cpio lsb-release xutils-dev libwayland-bin cmake \
        locales texinfo chrpath diffstat gawk

0 Kudos
Reply
3,201 Views
rita_fang
Contributor II

I figured out the issue: I had been installing “sudo apt install -y binfmt-support qemu-system-common qemu-user-static" within the container, rather than the host.After installing it on the host, the issue was resolved.

Thank you!

3,199 Views
Pavel
NXP Employee
NXP Employee

Use the latest update LSDK 19.09 update 311219:

https://www.nxp.com/design/software/embedded-software/linux-software-and-development-tools/layerscap...

 

This problem is solved in this LSDK.

Have a great day,
Pavel Chubakov

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply
3,200 Views
rita_fang
Contributor II

I downloaded flexbuild_lsdk1909_update_311219 from NXP and tried rebuilding for ls1088ardb_pb, but ran into the same issue.

Building weston ...
Cloning into 'weston'...
warning: redirecting to https://source.codeaurora.org/external/imx/weston-imx.git/
warning: remote HEAD refers to nonexistent ref, unable to checkout.

Switched to a new branch 'rel_virt_4.14.98_4.11_0.10_ga'
/src/packages/apps
chroot: failed to run command 'ldconfig': Exec format error
Makefile:720: recipe for target 'weston' failed
make[1]: *** [weston] Error 126
make[1]: Leaving directory '/src/packages/apps'
Makefile:28: recipe for target 'apps' failed
make: *** [apps] Error 2
make: Leaving directory '/src'

0 Kudos
Reply