Skip to contentSkip to conversation

gcc-cross-canadian: add missing runtime dependencies

PATCH In review Alexander Kanavin 2 participants 4 messages Aug 9, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 gcc-cross-canadian: add missing runtime dependencies

The recipe is special in that it does not auto-detect them at packaging step (via EXCLUDE_FROM_SHLIBS). With the recursive RDEPENDS qa check gone they need to be listed explicitly.

---
 meta/recipes-devtools/gcc/gcc-cross-canadian.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-devtools/gcc/gcc-cross-canadian.inc +2 -1
index 807e47e0ee2..0e626172b5f 100644
@@ -152,7 +152,8 @@ do_install () {
 
 ELFUTILS = "nativesdk-elfutils"
 DEPENDS += "nativesdk-gmp nativesdk-mpfr nativesdk-libmpc ${ELFUTILS} nativesdk-zlib"
-RDEPENDS_${PN} += "nativesdk-mpfr nativesdk-libmpc ${ELFUTILS}"
+RDEPENDS_${PN} += "nativesdk-mpfr nativesdk-libmpc ${ELFUTILS} nativesdk-glibc nativesdk-libgcc nativesdk-libstdc++ nativesdk-zlib nativesdk-gmp"
+RDEPENDS_${PN}_remove_sdkmingw32 = "nativesdk-glibc"
 
 SYSTEMHEADERS = "${target_includedir}/"
 SYSTEMLIBS = "${target_base_libdir}/"
Signature · 1 line
2.17.1
#1 lore raw

PATCH 2/2 insane.bbclass: in file-rdeps do not look into RDEPENDS recursively

Recursive RDEPENDS resolution requires that all of the dependent recipes' packaging has completed. There is no mechanism to ensure that and therefore races were observed.

This change effectively requires recipes to list their runtime file dependencies explicitly rather than have them pulled indirectly. This may require a bit of fixing in layers, but should result in a better definition of runtime file dependencies.

---
 meta/classes/insane.bbclass | 18 ------------------
 1 file changed, 18 deletions(-)
meta/classes/insane.bbclass +0 -18
index 35c4fdb4913..9b886d13805 100644
@@ -722,25 +722,7 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, taskdeps, packages, d):
                             filerdepends[subkey] = key[13:]
 
             if filerdepends:
-                next = rdepends
                 done = rdepends[:]
-                # Find all the rdepends on the dependency chain
-                while next:
-                    new = []
-                    for rdep in next:
-                        rdep_data = oe.packagedata.read_subpkgdata(rdep, d)
-                        sub_rdeps = rdep_data.get("RDEPENDS_" + rdep)
-                        if not sub_rdeps:
-                            continue
-                        for sub_rdep in bb.utils.explode_deps(sub_rdeps):
-                            if sub_rdep in done:
-                                continue
-                            if oe.packagedata.has_subpkgdata(sub_rdep, d):
-                                # It's a new rdep
-                                done.append(sub_rdep)
-                                new.append(sub_rdep)
-                    next = new
-
                 # Add the rprovides of itself
                 if pkg not in done:
                     done.insert(0, pkg)
Signature · 1 line
2.17.1
#2 lore raw
In reply to Alexander Kanavin
Quoted 14 lines · Alexander Kanavin

The recipe is special in that it does not auto-detect them at packaging step (via EXCLUDE_FROM_SHLIBS). With the recursive RDEPENDS qa check gone they need to be listed explicitly.

---
 meta/recipes-devtools/gcc/gcc-cross-canadian.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-devtools/gcc/gcc-cross-canadian.inc +0 -0
index 807e47e0ee2..0e626172b5f 100644

meta/recipes-devtools/gcc/gcc-cross-canadian.inc do_install () { · line 156

Quoted 7 lines
meta/recipes-devtools/gcc/gcc-cross-canadian.inc +2 -1
@@ -152,7 +152,8 @@ do_install () {
 
 ELFUTILS = "nativesdk-elfutils"
 DEPENDS += "nativesdk-gmp nativesdk-mpfr nativesdk-libmpc ${ELFUTILS} nativesdk-zlib"
-RDEPENDS_${PN} += "nativesdk-mpfr nativesdk-libmpc ${ELFUTILS}"
+RDEPENDS_${PN} += "nativesdk-mpfr nativesdk-libmpc ${ELFUTILS} nativesdk-glibc nativesdk-libgcc nativesdk-libstdc++ nativesdk-zlib nativesdk-gmp"
+RDEPENDS_${PN}_remove_sdkmingw32 = "nativesdk-glibc"
...

These nativesdk-glibc dependencies look wrong for musl builds.

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#3 lore raw
Quoted 12 lines · Adrian Bunk
Quoted 2 lines

ELFUTILS = "nativesdk-elfutils"
DEPENDS += "nativesdk-gmp nativesdk-mpfr nativesdk-libmpc ${ELFUTILS}

nativesdk-zlib"

Review

Quoted 2 lines
(quoted diff) +1 -1
-RDEPENDS_${PN} += "nativesdk-mpfr nativesdk-libmpc ${ELFUTILS}"
+RDEPENDS_${PN} += "nativesdk-mpfr nativesdk-libmpc ${ELFUTILS}

nativesdk-glibc nativesdk-libgcc nativesdk-libstdc++ nativesdk-zlib nativesdk-gmp"

Quoted 2 lines

+RDEPENDS_${PN}_remove_sdkmingw32 = "nativesdk-glibc"
...

These nativesdk-glibc dependencies look wrong for musl builds.

musl does not actually support nativesdk (only target builds), so it's safe to hardcode glibc here.

Alex