Bug 273805 - deskutils/xfce4-notifyd: xfce4-notifyd is missing a required shared library: libcanberra-gtk3.so.0
Summary: deskutils/xfce4-notifyd: xfce4-notifyd is missing a required shared library: ...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-xfce (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-14 20:56 UTC by Ivan Rozhuk
Modified: 2023-09-22 09:53 UTC (History)
2 users (show)

See Also:
madpilot: maintainer-feedback+
madpilot: merge-quarterly+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Rozhuk 2023-09-14 20:56:05 UTC
links with libcanberra-gtk3.so.0 if audio/libcanberra-gtk3 installed, but this is not reflected in deps list.
Comment 1 Guido Falsi freebsd_committer freebsd_triage 2023-09-14 22:03:05 UTC
Hi,

Thanks for investigating this and reporting it.

I will look into it.

Can you please share the output of "ldd -a" showing the dependency? Is this a direct dependency or indirect through some other library?

The strange part is, there is absolutely no reference to libcanberra in the xfce4-notifyd sources, so I'm not sure where the dependency is coming from.

Maybe some overlinking triggered by some pkgconfig file?

If possible, could also share a full build log of a build generating the binary linking to libcanberra?
Comment 2 Guido Falsi freebsd_committer freebsd_triage 2023-09-14 22:46:21 UTC
(In reply to Guido Falsi from comment #1)
Correcting myself.

There are references to canberra in xfce4-notifyd sources. Sorry for my mistake.

It does check for it in configure. I'll take a look on what is the best way to avoid linking, maybe by adding an option for it.
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-09-15 11:04:46 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4018c2022be41e2e634d970655cfe78c4b997dc0

commit 4018c2022be41e2e634d970655cfe78c4b997dc0
Author:     Guido Falsi <madpilot@FreeBSD.org>
AuthorDate: 2023-09-15 11:03:25 +0000
Commit:     Guido Falsi <madpilot@FreeBSD.org>
CommitDate: 2023-09-15 11:03:25 +0000

    deskutils/xfce4-notifyd: Properly handle libcanberra dependency

    xfce4-notifyd configure script automatically adds a dependency on
    libcanberra-gtk3 if found on the system.

    To have control on this I added a new CANBERRA option (disabled by
    default) to the port to control configure behavior and ensure that
    the port does not link to it if the option is disabled.

    PR:             273805
    MFH:            2023Q3

 deskutils/xfce4-notifyd/Makefile | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
Comment 4 commit-hook freebsd_committer freebsd_triage 2023-09-15 11:05:47 UTC
A commit in branch 2023Q3 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=eef6e5bcefda2b8b5734f00aea99d1ce3ac30a21

commit eef6e5bcefda2b8b5734f00aea99d1ce3ac30a21
Author:     Guido Falsi <madpilot@FreeBSD.org>
AuthorDate: 2023-09-15 11:03:25 +0000
Commit:     Guido Falsi <madpilot@FreeBSD.org>
CommitDate: 2023-09-15 11:04:37 +0000

    deskutils/xfce4-notifyd: Properly handle libcanberra dependency

    xfce4-notifyd configure script automatically adds a dependency on
    libcanberra-gtk3 if found on the system.

    To have control on this I added a new CANBERRA option (disabled by
    default) to the port to control configure behavior and ensure that
    the port does not link to it if the option is disabled.

    PR:             273805
    MFH:            2023Q3
    (cherry picked from commit 4018c2022be41e2e634d970655cfe78c4b997dc0)

 deskutils/xfce4-notifyd/Makefile | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
Comment 5 Guido Falsi freebsd_committer freebsd_triage 2023-09-15 11:07:48 UTC
I committed a patch addressing the issue by adding a new option.

In the future it can be valuated if the option should be enabled by default.

I'm leaving it disabled now, since most XFCE4 users prefer a lean desktop and would rather not gain one more dependency.
Comment 6 Ivan Rozhuk 2023-09-15 19:30:06 UTC
Thanks!!!
Comment 7 Ivan Rozhuk 2023-09-21 19:36:27 UTC
Not fixed:

...
configure: WARNING: unrecognized options: --disable-canberra

Build Configuration:

* Installation prefix:       ${exec_prefix}/lib
* Debug Support:             minimum
* X11 Support:               yes
* Wayland Support:           no
* Sound support:             yes
* Startup methods:
  - D-Bus activation:        yes (${datarootdir}/dbus-1/services)
  - Systemd:                 no ()
  - XDG autostart:           yes (${prefix}/etc/xdg/autostart)
Comment 8 Ivan Rozhuk 2023-09-21 19:42:19 UTC
With:
diff --git a/deskutils/xfce4-notifyd/Makefile b/deskutils/xfce4-notifyd/Makefile
index cbee8f912314..1936bc3aca29 100644
--- a/deskutils/xfce4-notifyd/Makefile
+++ b/deskutils/xfce4-notifyd/Makefile
@@ -36,7 +36,7 @@ CANBERRA_DESC=	Sound (audio) support via canberra
 
 CANBERRA_LIB_DEPENDS=		libcanberra.so:audio/libcanberra \
 				libcanberra-gtk3.so:audio/libcanberra-gtk3
-CANBERRA_CONFIGURE_ENABLE=	canberra
+CANBERRA_CONFIGURE_ENABLE=	sound
 
 NLS_USES=		gettext-runtime
 NLS_CONFIGURE_ENABLE=	nls

Got:
...
config.status: creating po/POTFILES
config.status: creating po/Makefile

Build Configuration:

* Installation prefix:       ${exec_prefix}/lib
* Debug Support:             minimum
* X11 Support:               yes
* Wayland Support:           no
* Sound support:             no
* Startup methods:
  - D-Bus activation:        yes (${datarootdir}/dbus-1/services)
  - Systemd:                 no ()
  - XDG autostart:           yes (${prefix}/etc/xdg/autostart)
Comment 9 Guido Falsi freebsd_committer freebsd_triage 2023-09-21 19:49:08 UTC
(In reply to Ivan Rozhuk from comment #8)

I see. I did not notice this failure.


Although using the disable --disable-sound option is not completely correct either.

At present canberra is the only supported sound backend, but others could be added, and then the sound option would be overreaching.

Unluckily it looks like upstream configure script is mixing things up.

Lacking any better option there is no way but also leveraging the --disable-sound option though.

I think I'll test a slight variation on your patch to make intention more explicit.
Comment 10 Guido Falsi freebsd_committer freebsd_triage 2023-09-21 19:55:53 UTC
(In reply to Guido Falsi from comment #9)

Again correcting myself, looks like your patch suggestion is correct.
Comment 11 commit-hook freebsd_committer freebsd_triage 2023-09-22 07:06:42 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=68465db0de72a4756c696e8cab1a380eb9697f31

commit 68465db0de72a4756c696e8cab1a380eb9697f31
Author:     Guido Falsi <madpilot@FreeBSD.org>
AuthorDate: 2023-09-22 07:04:47 +0000
Commit:     Guido Falsi <madpilot@FreeBSD.org>
CommitDate: 2023-09-22 07:04:47 +0000

    deskutils/xfce4-notifyd: Correctly depend on canberra for sound support

    Upstream configure script does not have a specific canberra knob,
    so use the sound knob to really control linking to canberra library
    for sound support.

    To better describe the option I renamed it to SOUND (still disabled
    by default)

    PR:             273805
    Fixes:          4018c2022be41e2e634d970655cfe78c4b997dc0
    MFH:            2023Q3

 deskutils/xfce4-notifyd/Makefile | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
Comment 12 commit-hook freebsd_committer freebsd_triage 2023-09-22 07:07:43 UTC
A commit in branch 2023Q3 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d680dedc79156587c2559c652bcb3467d7a03802

commit d680dedc79156587c2559c652bcb3467d7a03802
Author:     Guido Falsi <madpilot@FreeBSD.org>
AuthorDate: 2023-09-22 07:04:47 +0000
Commit:     Guido Falsi <madpilot@FreeBSD.org>
CommitDate: 2023-09-22 07:07:17 +0000

    deskutils/xfce4-notifyd: Correctly depend on canberra for sound support

    Upstream configure script does not have a specific canberra knob,
    so use the sound knob to really control linking to canberra library
    for sound support.

    To better describe the option I renamed it to SOUND (still disabled
    by default)

    PR:             273805
    Fixes:          4018c2022be41e2e634d970655cfe78c4b997dc0
    MFH:            2023Q3

    (cherry picked from commit 68465db0de72a4756c696e8cab1a380eb9697f31)

 deskutils/xfce4-notifyd/Makefile | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
Comment 13 Guido Falsi freebsd_committer freebsd_triage 2023-09-22 07:14:17 UTC
Issue should be fixed now, but this time I'll wait for submitter confirmation before closing the issue.

Thanks for double checking on this BTW!
Comment 14 Ivan Rozhuk 2023-09-22 09:53:02 UTC
Fixed, thanks!