Issues installing samba with toradex layers & yocto

Hello. I’m having issues when trying to add samba to my yocto build:

WARNING: samba-4.14.14-r0 do_populate_lic: Could not copy license file /home/ubuntu/z/builder/build/tmp/work/cortexa9t2hf-neon-poky-linux-gnueabi/samba/4.14.14-r0/samba-4.14.14/COPYING to /home/ubuntu/z/builder/build/tmp/work/cortexa9t2hf-neon-poky-linux-gnueabi/samba/4.14.14-r0/license-destdir/samba/COPYING: [Errno 2] No such file or directory: '/home/ubuntu/z/builder/build/tmp/work/cortexa9t2hf-neon-poky-linux-gnueabi/samba/4.14.14-r0/samba-4.14.14/COPYING'
ERROR: samba-4.14.14-r0 do_populate_lic: QA Issue: samba: LIC_FILES_CHKSUM points to an invalid file: /home/ubuntu/z/builder/build/tmp/work/cortexa9t2hf-neon-poky-linux-gnueabi/samba/4.14.14-r0/samba-4.14.14/COPYING [license-checksum]
ERROR: samba-4.14.14-r0 do_populate_lic: Fatal QA errors were found, failing task.
ERROR: Logfile of failure stored in: /home/ubuntu/z/builder/build/tmp/work/cortexa9t2hf-neon-poky-linux-gnueabi/samba/4.14.14-r0/temp/log.do_populate_lic.3714931
ERROR: Task (/home/ubuntu/z/builder/build/../layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.14.14.bb:do_populate_lic) failed with exit code '1'

however, it works with other machines (e.g tegra) so I suspect its something with toradex dependencies. How can I debug if its a machine dependency issue (meta-toradex-nxp?, …)
IMX_DEFAULT_BSP = "nxp"
Layers im using:

  meta-freescale:
    url: "https://github.com/Freescale/meta-freescale"
    branch: kirkstone
    path: layers/meta-freescale

  meta-freescale-3rdparty:
    url: "https://github.com/Freescale/meta-freescale-3rdparty"
    branch: kirkstone
    path: layers/meta-freescale-3rdparty

  meta-toradex-bsp-common:
    url: "https://git.toradex.com/meta-toradex-bsp-common.git"
    branch: kirkstone-6.x.y
    path: layers/meta-toradex-bsp-common

  meta-toradex-nxp:
    url: "https://git.toradex.com/meta-toradex-nxp.git"
    branch: kirkstone-6.x.y
    path: layers/meta-toradex-nxp

Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

The issue you’re encountering with adding samba to your Yocto build, specifically the errors related to do_populate_lic and LIC_FILES_CHKSUM, suggests a problem with the recipe’s license file location or checksum. This problem is not directly related to Toradex dependencies but can occur due to the way the Yocto Project handles license files across different layers and builds.

To address this issue, follow these steps:

  1. Verify the License File Path: Ensure that the path specified in the LIC_FILES_CHKSUM variable in the samba recipe accurately points to the COPYING file within the samba source directory. If the path is incorrect or the file has been moved in the version of samba you are using, you will need to update this path.

  2. Update LIC_FILES_CHKSUM: If the COPYING file exists but has been updated (which can change its checksum), you’ll need to update the LIC_FILES_CHKSUM in the samba recipe to match the new checksum. You can generate a checksum using the sha256sum command on the COPYING file.

  3. Check for Patches: Sometimes, patches applied to recipes can modify paths or file contents, leading to such issues. Ensure there are no patches affecting the location or existence of the COPYING file in your samba recipe.

  4. Layer Compatibility: Although you suspect a dependency issue with Toradex layers, this specific error is more related to the handling of license files within the Yocto build system. However, it’s good practice to ensure all your layers are compatible with each other and with the Yocto version you are using. Since you are using the kirkstone branch for your layers, ensure all layers are checked out to compatible versions.

  5. Debugging Tips: To further debug this issue, you can:

    • Inspect the do_populate_lic log file mentioned in the error message for more clues.
    • Manually check the specified path in the error message to confirm if the COPYING file exists.
    • Temporarily modify the samba recipe to bypass the license file check (not recommended for production) to see if there are other underlying issues.

Remember, while addressing license file issues, it’s crucial to comply with the licensing requirements of the software you are including in your build.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

Secure Boot on Torizon OS | Toradex Developer Center.

NVM, looks like the problem was me overriding SRC_URI in a recipe only compiled for toradex machines.