crops / poky-container

A container image that is able to run bitbake/poky. It has helpers to create users and groups within the container. This is so that the output generated in the container will be readable by the user on the host.
GNU General Public License v2.0
214 stars 96 forks source link

"lz4c pzstd zstd" appear to be unavailable in PATH #67

Closed robbie-cao closed 2 years ago

robbie-cao commented 3 years ago

Hi, All,

ERROR: The following required tools (as specified by HOSTTOOLS) appear to be unavailable in PATH, please install them in order to proceed:
  lz4c pzstd zstd

There will be the above error when I build the most recent Yocto Project (up to https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=be665a79831c3dab7623e75d112bb35d72e39a82) following the steps in https://www.yoctoproject.org/docs/2.4.2/yocto-project-qs/yocto-project-qs.html#releases and https://www.yoctoproject.org/docs/2.4.2/dev-manual/dev-manual.html#setting-up-to-use-crops.

My steps as below:

# In host
$ mkdir work_dir && cd work_dir
$ git clone git://git.yoctoproject.org/poky
$ docker run --rm -it --net=host -v `pwd`:/home/pokyuser/yocto -w /home/pokyuser/yocto crops/poky

# In docker
$ source poky/oe-init-build-env
$ bitbake core-image-minimal

I notice that required tools lz4c pzstd zstd were added to HOSTTOOLS in change https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=1c51e6535bfead57c7913ae74d0d71af4dfe8195

Want to ask if there's plan to add these unavailable tools.

Thanks Robbie Cao

grahas commented 3 years ago

Not helpful but I am having the same issue, did you find a work around?

beroset commented 3 years ago

You can install zstd and liblz4-tool within your base container to make this work. I encountered a similar problem with another container-based build and encountered this issue when searching for solutions. So, for example, with an Ubuntu-based underlying image, you could add something like this to your Dockerfile.

RUN apt update && apt install -y zstd liblz4-tool
grahas commented 3 years ago

I ended up checking out the dunfell branch instead of the master to get it to work. I hadn’t realized it needed to be versioned back.

moto-timo commented 3 years ago

This should be resolved with: https://github.com/crops/yocto-dockerfiles/commit/ac7b37bf2ee792d2f5ed2a17ebf2d5458abf48c9

Please pull the latest poky containers and test. https://hub.docker.com/repository/docker/crops/poky#

moto-timo commented 2 years ago

Fixed in: https://github.com/crops/yocto-dockerfiles/pull/57

Real-Sunnoc commented 1 year ago

sudo apt update && sudo apt install -y zstd liblz4-tool

hongbo-miao commented 1 year ago

For future people who come here, based on https://wiki.koansoftware.com/index.php/Upgrade_to_Yocto_honister_3.4 For "lz4c", might worth install lz4 instead of liblz4-tool for new Ubuntu.

The Yocto 3.4 release (fall 2021), also codenamed “Honister” introduces a couple of breaking changes, mostly related to the syntax. You can take a look at the official migration guide.

The following errors and fixes have appeared while attempting to update a meta-layer to the current release.

Error message:

ERROR: The following required tools (as specified by HOSTTOOLS) appear to be unavailable in PATH, please install them in order to proceed: lz4c pzstd zstd Explanation: The list of build-host prerequisites has changed, so you must install the missing packages, prefferably using the distribution’s package manager. In my case, I’m using Ubuntu 18.04 LTS.

Fix for Ubuntu Bionic or older:

sudo apt-get install zstd liblz4-tool

Fix for Ubuntu Focal or newer:

sudo apt-get install zstd lz4