<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Processor Expert Software中的主题 Yocto linux-imx fails to do_package with (Exception: FileExistsError: [Errno 17] File exists) error</title>
    <link>https://community.nxp.com/t5/Processor-Expert-Software/Yocto-linux-imx-fails-to-do-package-with-Exception/m-p/1538599#M5292</link>
    <description>&lt;P&gt;Dear NXP Support Team,&lt;/P&gt;&lt;P&gt;I'm currently trying to compile a custom Yocto layer on top of meta-imx. I'm getting the following errors during compilation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;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: &amp;lt;module&amp;gt;                                                                                                                                                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' -&amp;gt; '/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.                                                                                                                     &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;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" &amp;gt;&amp;gt; ${S}/arch/arm64/boot/dts/freescale/Makefile
    echo "dtb-$(CONFIG_ARCH_MXC) += imx8mq-itx-p-c444-lvds-auo.dts" &amp;gt;&amp;gt; ${S}/arch/arm64/boot/dts/freescale/Makefile
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I don't know what could be the issue. The task compiles just fine, it only fails during `do_package` phase.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Benjamin Herrera Navarro&lt;/P&gt;</description>
    <pubDate>Mon, 17 Oct 2022 14:09:44 GMT</pubDate>
    <dc:creator>bitglitcher</dc:creator>
    <dc:date>2022-10-17T14:09:44Z</dc:date>
    <item>
      <title>Yocto linux-imx fails to do_package with (Exception: FileExistsError: [Errno 17] File exists) error</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/Yocto-linux-imx-fails-to-do-package-with-Exception/m-p/1538599#M5292</link>
      <description>&lt;P&gt;Dear NXP Support Team,&lt;/P&gt;&lt;P&gt;I'm currently trying to compile a custom Yocto layer on top of meta-imx. I'm getting the following errors during compilation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;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: &amp;lt;module&amp;gt;                                                                                                                                                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' -&amp;gt; '/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.                                                                                                                     &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;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" &amp;gt;&amp;gt; ${S}/arch/arm64/boot/dts/freescale/Makefile
    echo "dtb-$(CONFIG_ARCH_MXC) += imx8mq-itx-p-c444-lvds-auo.dts" &amp;gt;&amp;gt; ${S}/arch/arm64/boot/dts/freescale/Makefile
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I don't know what could be the issue. The task compiles just fine, it only fails during `do_package` phase.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Benjamin Herrera Navarro&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 14:09:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/Yocto-linux-imx-fails-to-do-package-with-Exception/m-p/1538599#M5292</guid>
      <dc:creator>bitglitcher</dc:creator>
      <dc:date>2022-10-17T14:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: Yocto linux-imx fails to do_package with (Exception: FileExistsError: [Errno 17] File exists) er</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/Yocto-linux-imx-fails-to-do-package-with-Exception/m-p/1538710#M5293</link>
      <description>&lt;P&gt;Fixed it, I basically do a `bitbake -c do_cleanall linux-imx` and the issue was fixed when I tried to compile again.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 17:14:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/Yocto-linux-imx-fails-to-do-package-with-Exception/m-p/1538710#M5293</guid>
      <dc:creator>bitglitcher</dc:creator>
      <dc:date>2022-10-17T17:14:13Z</dc:date>
    </item>
  </channel>
</rss>

