package_generate_dlopen_deps() warns whenever it cannot find a provider for
a soname listed in a .note.dlopen segment, regardless of the dependency's
priority. "recommended" and "suggested" entries are optional (they map to
RRECOMMENDS) and legitimately have no provider in some configurations - for
example systemd suggests libintl.so.8, which does not exist on musl, where
the gettext symbols live in libc. This produces spurious warnings on every
musl build.

Only warn for "required" dlopen dependencies; downgrade the missing-provider
message for optional ones to a note.

Signed-off-by: Jaipaul Cheernam <[email protected]>
---
 meta/recipes-core/systemd/dlopen-deps.inc | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/systemd/dlopen-deps.inc 
b/meta/recipes-core/systemd/dlopen-deps.inc
index 2d43f2dcb8e..15f811de126 100644
--- a/meta/recipes-core/systemd/dlopen-deps.inc
+++ b/meta/recipes-core/systemd/dlopen-deps.inc
@@ -77,7 +77,17 @@ python package_generate_dlopen_deps() {
                                 found = True
                                 break
                         if not found:
-                            bb.warn(f"cannot find any provider for dlopen 
dependency: {dep['soname']}")
+                            # A missing provider only matters for "required" 
dlopen
+                            # dependencies. "recommended"/"suggested" ones are 
optional
+                            # (they map to RRECOMMENDS) and legitimately have 
no provider
+                            # on some configurations - e.g. systemd suggests 
libintl.so.8,
+                            # which does not exist on musl where the gettext 
symbols live
+                            # in libc. Only warn for required deps; note the 
rest.
+                            msg = f"cannot find any provider for dlopen 
dependency: {dep['soname']}"
+                            if dep["priority"] == "required":
+                                bb.warn(msg)
+                            else:
+                                bb.note(msg)
                 except oe.qa.NotELFFileError as e:
                     bb.note(f"Cannot extract ELF notes: {e}")
                     pass
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#246322): 
https://lists.openembedded.org/g/openembedded-core/message/246322
Mute This Topic: https://lists.openembedded.org/mt/121354743/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to