OE4T / meta-tegra

BSP layer for NVIDIA Jetson platforms, based on L4T
MIT License
418 stars 230 forks source link

License check fail when GPL-3.0-only is added to INCOMPATIBLE_LICENSE #1711

Closed aholza closed 1 month ago

aholza commented 1 month ago

If GPL-3.0-only is added to INCOMPATIBLE_LICENSE, then a build fails with the following output:

NOTE: Resolving any missing task queue dependencies
ERROR: Nothing PROVIDES 'gcc-for-nvcc-source-10.3.0'
gcc-for-nvcc-source-10.3.0 was skipped: it has incompatible license(s): GPL-3.0-only
NOTE: Runtime target 'libgcc-for-nvcc-dev' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['libgcc-for-nvcc-dev', 'gcc-for-nvcc-source-10.3.0']
NOTE: Runtime target 'packagegroup-core-standalone-sdk-target' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['packagegroup-core-standalone-sdk-target', 'libgcc-for-nvcc-dev', 'gcc-for-nvcc-source-10.3.0']
ERROR: Required build target 'core-image-weston' has no buildable providers.
Missing or unbuildable dependency chain was: ['core-image-weston', 'packagegroup-core-standalone-sdk-target', 'libgcc-for-nvcc-dev', 'gcc-for-nvcc-source-10.3.0']

Poky does also use the mechanism for sharing its gcc sources as meta-tegra does. The gcc shared sources recipe cannot be added to INCOMPATIBLE_LICENSE_EXCEPTIONS, as it has the PV added and the license check does remove any version information for the package. So Poky was adding a explicit exception for the gcc-source in the license checker, which does not match for the gcc-for-nvcc-source recipe.

https://git.yoctoproject.org/poky/commit/meta/classes/base.bbclass?h=yocto-4.0.10&id=7b88042b801403054e76c9bb51419c73acbb1d59

Maybe upstream base.bbclass needs to have a wildcard in the matching of that exception or even needs to have a variable which meta-tegra can then populate to get this bug fixed.

madisongh commented 1 month ago

Thanks for the research on this. We could rename the recipe gcc-source-for-nvcc so it fits with the somewhat hacky workaround in base.bbclass; that would probably be simpler than trying to get a cleaner fix merged upstream and backported everywhere we might need this.