Yocto linux-imx fails to do_package with (Exception: FileExistsError: [Errno 17] File exists) error

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

Yocto linux-imx fails to do_package with (Exception: FileExistsError: [Errno 17] File exists) error

Jump to solution
1,872 Views
bitglitcher
Contributor II

Dear NXP Support Team,

I'm currently trying to compile a custom Yocto layer on top of meta-imx. I'm getting the following errors during compilation. 

 

 

ERROR: linux-imx-5.15.32+gitAUTOINC+fa6c316859-r0 do_package: Error executing a python function in exec_func_python() autogenerated:                                                                                                                                                                                                                                                                                                The stack trace of python calls that resulted in this exception/failure was:                                                                                                                                      File: 'exec_func_python() autogenerated', lineno: 2, function: <module>                                                                                                                                                0001:                                                                                                                                                                                                         *** 0002:extend_recipe_sysroot(d)                                                                                                                                                                                     0003:                                                                                                                                                                                                        File: '/home/bherrera/winYocto5.15/sources/poky/meta/classes/staging.bbclass', lineno: 584, function: extend_recipe_sysroot                                                                                            0580:                    if "/bin/" in l or "/sbin/" in l:                                                                                                                                                        0581:                        # defer /*bin/* files until last in case they need libs                                                                                                                              0582:                        binfiles[l] = (targetdir, dest)                                                                                                                                                      0583:                    else:                                                                                                                                                                                *** 0584:                        staging_copyfile(l, targetdir, dest, postinsts, seendirs)                                                                                                                            0585:                                                                                                                                                                                                             0586:    # Handle deferred binfiles                                                                                                                                                                               0587:    for l in binfiles:                                                                                                                                                                                       0588:        (targetdir, dest) = binfiles[l]                                                                                                                                                                 File: '/home/bherrera/winYocto5.15/sources/poky/meta/classes/staging.bbclass', lineno: 158, function: staging_copyfile                                                                                                 0154:        os.symlink(linkto, dest)                                                                                                                                                                             0155:        #bb.warn(c)                                                                                                                                                                                          0156:    else:                                                                                                                                                                                                    0157:        try:                                                                                                                                                                                             *** 0158:            os.link(c, dest)                                                                                                                                                                                 0159:        except OSError as err:                                                                                                                                                                               0160:            if err.errno == errno.EXDEV:                                                                                                                                                                     0161:                bb.utils.copyfile(c, dest)                                                                                                                                                                   0162:            else:                                                                                                                                                                                       Exception: FileExistsError: [Errno 17] File exists: '/home/bherrera/winYocto5.15/build/tmp/sysroots-components/x86_64/libgcrypt-native/usr/include/gcrypt.h' -> '/home/bherrera/winYocto5.15/build/tmp/work/imx8mq_itx_p_c444-poky-linux/linux-imx/5.15.32+gitAUTOINC+fa6c316859-r0/recipe-sysroot-native/usr/include/gcrypt.h'                                                                                                                                                                                                                                                                                                                       ERROR: Logfile of failure stored in: /home/bherrera/winYocto5.15/build/tmp/work/imx8mq_itx_p_c444-poky-linux/linux-imx/5.15.32+gitAUTOINC+fa6c316859-r0/temp/log.do_package.3047284                               ERROR: Task (/home/bherrera/winYocto5.15/sources/meta-winsys/recipes-kernel/linux/linux-imx_5.15.bb:do_package) failed with exit code '1'                                                                         NOTE: Tasks Summary: Attempted 5912 tasks of which 5911 didn't need to be rerun and 1 failed.                                                                                                                     

 

 

 

The reciper-kernel files that I have are the same as in the meta-imx layer. The only difference is that in the recipes-kernel of my layer I have the following `linux-imx_%.bbappend` file.

 

 

FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI:append = " file://imx8mq-itx-p-c444.dts"
SRC_URI:append = " file://imx8mq-itx-p-c444.dtsi"
SRC_URI:append = " file://imx8mq-itx-p-c444-lvds-auo.dts"

do_configure:append(){
    cp ${WORKDIR}/imx8mq-itx-p-c444.dts ${S}/arch/arm64/boot/dts/freescale/
    cp ${WORKDIR}/imx8mq-itx-p-c444.dtsi ${S}/arch/arm64/boot/dts/freescale/
    cp ${WORKDIR}/imx8mq-itx-p-c444-lvds-auo.dts ${S}/arch/arm64/boot/dts/freescale/
    echo "dtb-$(CONFIG_ARCH_MXC) += imx8mq-itx-p-c444.dtb" >> ${S}/arch/arm64/boot/dts/freescale/Makefile
    echo "dtb-$(CONFIG_ARCH_MXC) += imx8mq-itx-p-c444-lvds-auo.dts" >> ${S}/arch/arm64/boot/dts/freescale/Makefile
}

 

 

 I don't know what could be the issue. The task compiles just fine, it only fails during `do_package` phase.

 

 

Best regards,

Benjamin Herrera Navarro

0 Kudos
1 Solution
1,852 Views
bitglitcher
Contributor II

Fixed it, I basically do a `bitbake -c do_cleanall linux-imx` and the issue was fixed when I tried to compile again.

View solution in original post

0 Kudos
1 Reply
1,853 Views
bitglitcher
Contributor II

Fixed it, I basically do a `bitbake -c do_cleanall linux-imx` and the issue was fixed when I tried to compile again.

0 Kudos