Bug 8847 - QA warnings can be improved
Summary: QA warnings can be improved
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 2.1
Hardware: x86 Multiple
: Medium enhancement
Target Milestone: 2.1 M3
Assignee: Robert Yang
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-12-22 08:56 UTC by Dmitry Rozhkov
Modified: 2016-02-22 10:16 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Rozhkov 2015-12-22 08:56:24 UTC
When building libsoup, gssdp and gupnp with automatically added unchanged recipes the tool prints the following warnings and errors:

ERROR: QA Issue: gssdp rdepends on libxml2, but it isn't a build dependency? [build-deps]
ERROR: QA Issue: gssdp rdepends on zlib, but it isn't a build dependency? [build-deps]
ERROR: QA Issue: gssdp rdepends on glib-2.0, but it isn't a build dependency? [build-deps]
ERROR: QA Issue: gssdp rdepends on libsqlite3, but it isn't a build dependency? [build-deps]
ERROR: QA Issue: gssdp rdepends on libffi, but it isn't a build dependency? [build-deps]
WARNING: QA Issue: /usr/lib/libgssdp-1.0.so.3.0.0_gssdp contained in package gssdp requires libsoup-2.4.so.1()(64bit), but no providers found in its RDEPENDS [file-rdeps]
ERROR: QA run found fatal errors. Please consider fixing them.
ERROR: Function failed: do_package_qa
ERROR: Logfile of failure stored in: /home/rojkov/files/sdks/iot-os-corei7-64_esdk/tmp-glibc/work/corei7-64-iotos-linux/gssdp/1.0-r0/temp/log.do_package_qa.13146
ERROR: Task 482 (/home/rojkov/files/sdks/iot-os-corei7-64_esdk/workspace/recipes/gssdp/gssdp.bb, do_package_qa) failed with exit code '1'
ERROR: QA Issue: gupnp rdepends on util-linux-libuuid, but it isn't a build dependency? [build-deps]
ERROR: QA Issue: gupnp rdepends on libxml2, but it isn't a build dependency? [build-deps]
WARNING: QA Issue: /usr/lib/libgupnp-1.0.so.4.0.0_gupnp contained in package gupnp requires libsoup-2.4.so.1()(64bit), but no providers found in its RDEPENDS [file-rdeps]
ERROR: QA run found fatal errors. Please consider fixing them.

1.
As a user I'd expect that the error messages like

> ERROR: QA Issue: gupnp rdepends on util-linux-libuuid, but it isn't a build dependency? [build-deps]

used recipes names (util-linux) instead of package names (util-linux-libuuid) and suggested adding them to DEPENDS explicitly.

2.
The warnings like

> WARNING: QA Issue: /usr/lib/libgssdp-1.0.so.3.0.0_gssdp contained in package gssdp requires libsoup-2.4.so.1()(64bit), but no providers found in its RDEPENDS [file-rdeps]

should suggest adding a dep to DEPENDS, not RDEPENDS.
Comment 1 Robert Yang 2016-01-20 03:33:33 UTC
Hi Dmitry,

Thanks, sounds good to me, I will work on it.
Comment 2 Robert Yang 2016-01-20 08:31:31 UTC
(In reply to comment #0)
> When building libsoup, gssdp and gupnp with automatically added unchanged
> recipes the tool prints the following warnings and errors:
> 
> ERROR: QA Issue: gssdp rdepends on libxml2, but it isn't a build dependency?
> [build-deps]
> ERROR: QA Issue: gssdp rdepends on zlib, but it isn't a build dependency?
> [build-deps]
> ERROR: QA Issue: gssdp rdepends on glib-2.0, but it isn't a build
> dependency? [build-deps]
> ERROR: QA Issue: gssdp rdepends on libsqlite3, but it isn't a build
> dependency? [build-deps]
> ERROR: QA Issue: gssdp rdepends on libffi, but it isn't a build dependency?
> [build-deps]
> WARNING: QA Issue: /usr/lib/libgssdp-1.0.so.3.0.0_gssdp contained in package
> gssdp requires libsoup-2.4.so.1()(64bit), but no providers found in its
> RDEPENDS [file-rdeps]
> ERROR: QA run found fatal errors. Please consider fixing them.
> ERROR: Function failed: do_package_qa
> ERROR: Logfile of failure stored in:
> /home/rojkov/files/sdks/iot-os-corei7-64_esdk/tmp-glibc/work/corei7-64-iotos-
> linux/gssdp/1.0-r0/temp/log.do_package_qa.13146
> ERROR: Task 482
> (/home/rojkov/files/sdks/iot-os-corei7-64_esdk/workspace/recipes/gssdp/gssdp.
> bb, do_package_qa) failed with exit code '1'
> ERROR: QA Issue: gupnp rdepends on util-linux-libuuid, but it isn't a build
> dependency? [build-deps]
> ERROR: QA Issue: gupnp rdepends on libxml2, but it isn't a build dependency?
> [build-deps]
> WARNING: QA Issue: /usr/lib/libgupnp-1.0.so.4.0.0_gupnp contained in package
> gupnp requires libsoup-2.4.so.1()(64bit), but no providers found in its
> RDEPENDS [file-rdeps]
> ERROR: QA run found fatal errors. Please consider fixing them.
> 
> 1.
> As a user I'd expect that the error messages like
> 
> > ERROR: QA Issue: gupnp rdepends on util-linux-libuuid, but it isn't a build dependency? [build-deps]
> 
> used recipes names (util-linux) instead of package names
> (util-linux-libuuid) and suggested adding them to DEPENDS explicitly.

After read carefully, I'm afraid that we can't use recipes names instead of package names, and we can't simply add it to DEPENDS, for example, we can also use PACKAGECONFIG.

> 
> 2.
> The warnings like
> 
> > WARNING: QA Issue: /usr/lib/libgssdp-1.0.so.3.0.0_gssdp contained in package gssdp requires libsoup-2.4.so.1()(64bit), but no providers found in its RDEPENDS [file-rdeps]
> 
> should suggest adding a dep to DEPENDS, not RDEPENDS.

It should be RDEPENDS here, not DEPENDS.

I will try to add more info to help.
Comment 3 Dmitry Rozhkov 2016-01-20 10:11:34 UTC
(In reply to comment #2)
> (In reply to comment #0)
> > 
> > 1.
> > As a user I'd expect that the error messages like
> > 
> > > ERROR: QA Issue: gupnp rdepends on util-linux-libuuid, but it isn't a build dependency? [build-deps]
> > 
> > used recipes names (util-linux) instead of package names
> > (util-linux-libuuid) and suggested adding them to DEPENDS explicitly.
> 
> After read carefully, I'm afraid that we can't use recipes names instead of
> package names, and we can't simply add it to DEPENDS, for example, we can
> also use PACKAGECONFIG.

This bug is not about changing devtool's behaviour, but adding clarity to the warnings. In order to build gupnp I had to add util-linux to DEPENDS, not util-linux-libuuid. At least YP's ref-manual states that "DEPENDS lists a recipe's build-time dependencies (i.e. other recipe files)."

Can this warning look like:
ERROR: QA Issue: gupnp rdepends on util-linux-libuuid, but it isn't a build dependency. Missing util-linux recipe in DEPENDS or PACKAGECONFIG?

The actual problem is that as a newbie I have hard time figuring out what recipe this package name stems from since it's not always easy to guess and I'm not aware of YP's analogs for `rpm -qi <binary-package-name>`.

> > 
> > 2.
> > The warnings like
> > 
> > > WARNING: QA Issue: /usr/lib/libgssdp-1.0.so.3.0.0_gssdp contained in package gssdp requires libsoup-2.4.so.1()(64bit), but no providers found in its RDEPENDS [file-rdeps]
> > 
> > should suggest adding a dep to DEPENDS, not RDEPENDS.
> 
> It should be RDEPENDS here, not DEPENDS.
> 
> I will try to add more info to help.

That's interesting. I had to add libsoup to gssdp's DEPENDS in order to build it. Does it mean I need to add it to gssdp's RDEPENDS as well?
Comment 4 Robert Yang 2016-01-21 06:20:17 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > (In reply to comment #0)
> > > 
> > > 1.
> > > As a user I'd expect that the error messages like
> > > 
> > > > ERROR: QA Issue: gupnp rdepends on util-linux-libuuid, but it isn't a build dependency? [build-deps]
> > > 
> > > used recipes names (util-linux) instead of package names
> > > (util-linux-libuuid) and suggested adding them to DEPENDS explicitly.
> > 
> > After read carefully, I'm afraid that we can't use recipes names instead of
> > package names, and we can't simply add it to DEPENDS, for example, we can
> > also use PACKAGECONFIG.
> 
> This bug is not about changing devtool's behaviour, but adding clarity to
> the warnings. In order to build gupnp I had to add util-linux to DEPENDS,
> not util-linux-libuuid. At least YP's ref-manual states that "DEPENDS lists
> a recipe's build-time dependencies (i.e. other recipe files)."
> 
> Can this warning look like:
> ERROR: QA Issue: gupnp rdepends on util-linux-libuuid, but it isn't a build
> dependency. Missing util-linux recipe in DEPENDS or PACKAGECONFIG?
> 
> The actual problem is that as a newbie I have hard time figuring out what
> recipe this package name stems from since it's not always easy to guess and
> I'm not aware of YP's analogs for `rpm -qi <binary-package-name>`.

This makes sense to me, I will send patch for it.

> 
> > > 
> > > 2.
> > > The warnings like
> > > 
> > > > WARNING: QA Issue: /usr/lib/libgssdp-1.0.so.3.0.0_gssdp contained in package gssdp requires libsoup-2.4.so.1()(64bit), but no providers found in its RDEPENDS [file-rdeps]
> > > 
> > > should suggest adding a dep to DEPENDS, not RDEPENDS.
> > 
> > It should be RDEPENDS here, not DEPENDS.
> > 
> > I will try to add more info to help.
> 
> That's interesting. I had to add libsoup to gssdp's DEPENDS in order to
> build it. Does it mean I need to add it to gssdp's RDEPENDS as well?
yes, you should, DEPENDS is for recipe, RDEPENDS is for binary pkg like rpm.
Comment 5 Joshua Lock 2016-01-21 09:20:18 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > (In reply to comment #2)
> > > (In reply to comment #0)
> > > > 
> > > > 1.
> > > > As a user I'd expect that the error messages like
> > > > 
> > > > > ERROR: QA Issue: gupnp rdepends on util-linux-libuuid, but it isn't a build dependency? [build-deps]
> > > > 
> > > > used recipes names (util-linux) instead of package names
> > > > (util-linux-libuuid) and suggested adding them to DEPENDS explicitly.
> > > 
> > > After read carefully, I'm afraid that we can't use recipes names instead of
> > > package names, and we can't simply add it to DEPENDS, for example, we can
> > > also use PACKAGECONFIG.
> > 
> > This bug is not about changing devtool's behaviour, but adding clarity to
> > the warnings. In order to build gupnp I had to add util-linux to DEPENDS,
> > not util-linux-libuuid. At least YP's ref-manual states that "DEPENDS lists
> > a recipe's build-time dependencies (i.e. other recipe files)."
> > 
> > Can this warning look like:
> > ERROR: QA Issue: gupnp rdepends on util-linux-libuuid, but it isn't a build
> > dependency. Missing util-linux recipe in DEPENDS or PACKAGECONFIG?
> > 
> > The actual problem is that as a newbie I have hard time figuring out what
> > recipe this package name stems from since it's not always easy to guess and
> > I'm not aware of YP's analogs for `rpm -qi <binary-package-name>`.
> 
> This makes sense to me, I will send patch for it.
> 
> > 
> > > > 
> > > > 2.
> > > > The warnings like
> > > > 
> > > > > WARNING: QA Issue: /usr/lib/libgssdp-1.0.so.3.0.0_gssdp contained in package gssdp requires libsoup-2.4.so.1()(64bit), but no providers found in its RDEPENDS [file-rdeps]
> > > > 
> > > > should suggest adding a dep to DEPENDS, not RDEPENDS.
> > > 
> > > It should be RDEPENDS here, not DEPENDS.
> > > 
> > > I will try to add more info to help.
> > 
> > That's interesting. I had to add libsoup to gssdp's DEPENDS in order to
> > build it. Does it mean I need to add it to gssdp's RDEPENDS as well?
> yes, you should, DEPENDS is for recipe, RDEPENDS is for binary pkg like rpm.

(This is a bit of an aside but I wanted to clarify what reads like a misconception here)

DEPENDS are build time dependencies, the specified recipes need to be present in the sysroot in order to build the recipe. 
http://www.yoctoproject.org/docs/2.0/ref-manual/ref-manual.html#var-DEPENDS

RDEPENDS are runtime dependencies, the specified packages need to be installed on the target for the recipe to be able to run correctly.
http://www.yoctoproject.org/docs/2.0/ref-manual/ref-manual.html#var-RDEPENDS

In many cases, RDEPENDS are automatically inferred i.e. because a library is dynamically linked against the system can infer a runtime dependency on that library.

This QA warning is letting you know that the specified library in gssdp is linking to libsoup and yet the dependency isn't implicit in the recipe metadata, thus the build is not deterministic.

Most likely the autconf machinery for gssdp is detecting the presence of libsoup in the sysroot, presumably installed by a different recipe, and automatically building against & linking to it.

The correct fix is to make the libsoup dependency explicit in the recipe by adding it to DEPENDS and ensuring an option to explicitly enable libsoup is passed to the configure script. This is most often done via a PACKAGECONFIG so that other users of the recipe can disable libsoup if desired.

Note: if the gssdp configure script doesn't take a --disable/enable or --with/without option for gssdp it would be worthwhile adding one to improve the determinism of the system.
Comment 6 Robert Yang 2016-01-21 09:44:57 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #3)
> > > (In reply to comment #2)
> > > > (In reply to comment #0)
> > > > > 
> > > > > 1.
> > > > > As a user I'd expect that the error messages like
> > > > > 
> > > > > > ERROR: QA Issue: gupnp rdepends on util-linux-libuuid, but it isn't a build dependency? [build-deps]
> > > > > 
> > > > > used recipes names (util-linux) instead of package names
> > > > > (util-linux-libuuid) and suggested adding them to DEPENDS explicitly.
> > > > 
> > > > After read carefully, I'm afraid that we can't use recipes names instead of
> > > > package names, and we can't simply add it to DEPENDS, for example, we can
> > > > also use PACKAGECONFIG.
> > > 
> > > This bug is not about changing devtool's behaviour, but adding clarity to
> > > the warnings. In order to build gupnp I had to add util-linux to DEPENDS,
> > > not util-linux-libuuid. At least YP's ref-manual states that "DEPENDS lists
> > > a recipe's build-time dependencies (i.e. other recipe files)."
> > > 
> > > Can this warning look like:
> > > ERROR: QA Issue: gupnp rdepends on util-linux-libuuid, but it isn't a build
> > > dependency. Missing util-linux recipe in DEPENDS or PACKAGECONFIG?
> > > 
> > > The actual problem is that as a newbie I have hard time figuring out what
> > > recipe this package name stems from since it's not always easy to guess and
> > > I'm not aware of YP's analogs for `rpm -qi <binary-package-name>`.
> > 
> > This makes sense to me, I will send patch for it.
> > 
> > > 
> > > > > 
> > > > > 2.
> > > > > The warnings like
> > > > > 
> > > > > > WARNING: QA Issue: /usr/lib/libgssdp-1.0.so.3.0.0_gssdp contained in package gssdp requires libsoup-2.4.so.1()(64bit), but no providers found in its RDEPENDS [file-rdeps]
> > > > > 
> > > > > should suggest adding a dep to DEPENDS, not RDEPENDS.
> > > > 
> > > > It should be RDEPENDS here, not DEPENDS.
> > > > 
> > > > I will try to add more info to help.
> > > 
> > > That's interesting. I had to add libsoup to gssdp's DEPENDS in order to
> > > build it. Does it mean I need to add it to gssdp's RDEPENDS as well?
> > yes, you should, DEPENDS is for recipe, RDEPENDS is for binary pkg like rpm.
> 
> (This is a bit of an aside but I wanted to clarify what reads like a
> misconception here)
> 
> DEPENDS are build time dependencies, the specified recipes need to be
> present in the sysroot in order to build the recipe. 
> http://www.yoctoproject.org/docs/2.0/ref-manual/ref-manual.html#var-DEPENDS
> 
> RDEPENDS are runtime dependencies, the specified packages need to be
> installed on the target for the recipe to be able to run correctly.
> http://www.yoctoproject.org/docs/2.0/ref-manual/ref-manual.html#var-RDEPENDS
> 
> In many cases, RDEPENDS are automatically inferred i.e. because a library is
> dynamically linked against the system can infer a runtime dependency on that
> library.
> 
> This QA warning is letting you know that the specified library in gssdp is
> linking to libsoup and yet the dependency isn't implicit in the recipe
> metadata, thus the build is not deterministic.


Hi Joshua,

I think that what you're talking about is more like build-deps ? The QA issue here is file-rdeps.

The file-fdeps is aimed for ipkg/dpkg since they don't record the file depends, (rpm can handle it well), which means that:

smart install gssdp

Then both gssdp.rpm and libsoup.rpm would be installed, and there is no running issues on target. (It doesn't matter whether libsoup is in RDEPENDS or not).

But for PACKAGE_CLASSES = "package_ipk" (or deb):

opkg install gssdp

would not install libsoup since gssdp.ipk doesn't record the file depends (/usr/lib/libgssdp-1.0.so.3.0.0_gssdp).

So I'm afraid that we should add it to RDEPENDS here?

// Robert

> 
> Most likely the autconf machinery for gssdp is detecting the presence of
> libsoup in the sysroot, presumably installed by a different recipe, and
> automatically building against & linking to it.
> 
> The correct fix is to make the libsoup dependency explicit in the recipe by
> adding it to DEPENDS and ensuring an option to explicitly enable libsoup is
> passed to the configure script. This is most often done via a PACKAGECONFIG
> so that other users of the recipe can disable libsoup if desired.
> 
> Note: if the gssdp configure script doesn't take a --disable/enable or
> --with/without option for gssdp it would be worthwhile adding one to improve
> the determinism of the system.
Comment 7 Ross Burton 2016-01-21 14:12:40 UTC
This bug got complicated quickly didn't it!

"ERROR: QA Issue: gupnp rdepends on util-linux-libuuid, but it isn't a build dependency? [build-deps]"

Yes, it would be useful for this to list the recipe name alongside the actual depended package.  Also rdepends should be capitalised to reflect the variable name.

The file-rdeps case is similar: it should list the binary package and recipe name for clarity.

What interests me is the fact that gupnp/gssdp are producing these warnings at all for you, as the only warning I get from building current gssdp and gupnp is:

WARNING: QA Issue: /usr/bin/gupnp-binding-tool_gupnp-dev contained in package gupnp-dev requires /usr/bin/python, but no providers found in its RDEPENDS [file-rdeps]

Which is fair enough.  (really need to fix that warning to remove the duplicated package name).

Proof that the runtime linking/dependencies is working correctly:

$ dpkg -I libgssdp-1.0-3_0.14.8-r0.0_corei7-64.ipk|grep Depends
 Depends: libsoup-2.4 (>= 2.52.1), libglib-2.0-0 (>= 2.46.1), libc6 (>= 2.22)

And from the gssdp.spec:
package -n libgssdp-1.0-3
...
Requires: libsoup-2.4 >= 2.52.1
Requires: libsoup-2.4.so.1()(64bit)
Requires(post): libsoup-2.4 >= 2.52.1
Requires(post): libsoup-2.4.so.1()(64bit)