Perl-native yocto error

I recentrly started to work with Verdin imx8 m plus, before that I worked with Colibri imx6-ull and imx7d with BSP 5.6.0.
Now I am trying to build a Yocto image with Toradex bs version 6.0.
I downladed layer doing:

$ mkdir ${HOME}/oe-core
$ cd ${HOME}/oe-core
$ repo init -u git:// -b kirkstone-6.x.y -m tdxref/default.xml
$ repo sync

I build a Docker image to run a Ubuntu 20.04 and installing necesary packages as said in Required-packages-for-Ubuntu
In my local.conf set MACHINE ?= “verdin-imx8mp”
DISTRO ?= “tdx-xwayland”

When I try to build a refference image as tdx-reference-multimedia-image bitbake exites with ERROR in perl-native recipe:

NOTE: Executing Tasks
ERROR: perl-native-5.34.1-r0 do_compile: oe_runmake failed
ERROR: perl-native-5.34.1-r0 do_compile: ExecutionError('/home/fgs/cuffia-oe-core/build/tmp/work/x86_64-linux/perl-native/5.34.1-r0/temp/run.do_compile.137493', 1, None, None)
ERROR: Logfile of failure stored in: /home/fgs/cuffia-oe-core/build/tmp/work/x86_64-linux/perl-native/5.34.1-r0/temp/log.do_compile.137493
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 4
| make: find: Operation not permitted
| make: find: Operation not permitted
| make: find: Operation not permitted
| make: /bin/sh: Operation not permitted
| make: /bin/sh: Operation not permitted
| make crosspatch
| make: make: Operation not permitted
| make: *** [Makefile:79: all] Error 127
| ERROR: oe_runmake failed
| WARNING: /home/fgs/cuffia-oe-core/build/tmp/work/x86_64-linux/perl-native/5.34.1-r0/temp/run.do_compile.137493:185 exit 1 from 'exit 1'
| WARNING: Backtrace (BB generated script):
| 	#1: bbfatal_log, /home/fgs/cuffia-oe-core/build/tmp/work/x86_64-linux/perl-native/5.34.1-r0/temp/run.do_compile.137493, line 185
| 	#2: die, /home/fgs/cuffia-oe-core/build/tmp/work/x86_64-linux/perl-native/5.34.1-r0/temp/run.do_compile.137493, line 169
| 	#3: oe_runmake, /home/fgs/cuffia-oe-core/build/tmp/work/x86_64-linux/perl-native/5.34.1-r0/temp/run.do_compile.137493, line 164
| 	#4: do_compile, /home/fgs/cuffia-oe-core/build/tmp/work/x86_64-linux/perl-native/5.34.1-r0/temp/run.do_compile.137493, line 142
| 	#5: main, /home/fgs/cuffia-oe-core/build/tmp/work/x86_64-linux/perl-native/5.34.1-r0/temp/run.do_compile.137493, line 189
ERROR: Task (virtual:native:/home/fgs/cuffia-oe-core/build/../layers/openembedded-core/meta/recipes-devtools/perl/ failed with exit code '1'
NOTE: Tasks Summary: Attempted 162 tasks of which 0 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 7 seconds

I clean bulding and try to comile only perl-native recipe and always failed with the same error.
For the error message I think that is some permission error in a directory but I build and run the Docker image as I always did.
I did a test compiling the Yocto image in a Host PC with Ubuntu 20.04 (not docker) and build the image succesfully.
I search on web about the error but I didn’t find an issue similar to this.
It can be a bad Docker setting?
It can be a issue with make tool o make-native tool?

You skipped enabling ARM.

HI @emmaperea ,

Can you please share the Dockerfile of the container you are using? I want to do some tests on my side to simulate the issue.

Best regards,
Daniel Morais

Hi @daniel_m.tx !
I follwed the instructions that tell me @seasoned_geek and added --privileged option in the docker run command. Thats worked! However I attached my Dockerfile.
Do you think that that is the correct fix for this issue?

# Selecting our distro
FROM ubuntu:20.04

# variables required to setup the Docker image using the specified user configuration.


# Updating OS
RUN apt-get clean && apt-get update && apt-get -y upgrade

# Set the locale
RUN apt-get -y install locales locales-all


RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata

# Installing dependencies 

RUN apt-get -y --fix-missing install    gawk wget git diffstat unzip texinfo gcc \
                                        build-essential chrpath socat cpio python3 python3-pip python3-pexpect \
                                        xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev \
					                              python3-subunit mesa-common-dev zstd liblz4-tool file \
                                        pylint3 xterm openssh-server \
                                        libncurses5-dev libgdk-pixbuf2.0-dev autoconf imagemagick sqlite3 git subversion curl \
                                        mtd-tools zip htop gdb gdbserver valgrind openssh-client screen nano u-boot-tools \
                                        bash-completion tree rar unrar 

RUN echo "Setting up user $USER_NAME with home directory: $HOME_DIR" \
  && useradd \
    --home-dir $HOME \
    --uid $USER_UID \
    --create-home \
    $USER_NAME \
  && touch ${HOME}/ \
  && mkdir -p ${HOME}/.ssh/ \
  && chown -R ${USER_NAME}:${USER_NAME} ${HOME} \
  && chmod -R 700 ${HOME}/.ssh \
  && touch ${HOME}/.ssh/id_rsa \
  && chmod 400 ${HOME}/.ssh/id_rsa \
  && chmod 777 ${HOME}/

# Installing repo tool
RUN mkdir $HOME/tools && export PATH=$HOME/tools:$PATH \
    && curl -o $HOME/tools/repo \
    && chmod a+x $HOME/tools/repo
RUN ln -s /usr/bin/python3 /usr/bin/python

RUN rm /bin/sh && ln -s /bin/bash /bin/sh

RUN echo "source" >> $HOME/.bashrc



Hi @emmaperea ,

I’m glad that you were able to solve the issue.

Normally it shouldn’t be necessary to use the --privileged parameter, if you want to use another container and not use this parameter, you can refer to our container to build Torizon OS, it should also work for the standard BSP.

Best regards,
Daniel Morais