Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 904168 - sys-apps/dbus does not install cmake files for non-native ABIs (media-sound/fluidsynth-2.3.2[dbus,abi_x86_32]: tries to link to 64-bit D-Bus library)
Summary: sys-apps/dbus does not install cmake files for non-native ABIs (media-sound/f...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Freedesktop bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-11 15:05 UTC by Maciej S. Szmigiero
Modified: 2023-04-11 16:01 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej S. Szmigiero 2023-04-11 15:05:52 UTC
abi_x86_32 part of multilib build of media-sound/fluidsynth-2.3.2[dbus] fails because it tries to link to the 64-bit version of D-Bus library:
> /usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld:  /usr/lib64/libdbus-1.so: error adding symbols: file in wrong format
> collect2: error: ld returned 1 exit status
> ninja: build stopped: subcommand failed.
> * ERROR: media-sound/fluidsynth-2.3.2::gentoo failed (compile phase):

Probably introduced by the recent upstream fluidsynth commit [1] that switched from direct pkg-config invocation to using "find_package" CMake command to find D-Bus.

It can be seen at [2] that the D-Bus CMake module overwrites PKG_CONFIG_PATH and PKG_CONFIG_LIBDIR environment variables with its own value computed from CMAKE_CURRENT_LIST_DIR before invoking pkg-config.

If I comment out these overwrites the fluidsynth package builds successfully:
> -set(ENV{PKG_CONFIG_PATH} ${DBus1_PKGCONFIG_DIR})
> -set(ENV{PKG_CONFIG_LIBDIR} ${DBus1_PKGCONFIG_DIR})
> +#set(ENV{PKG_CONFIG_PATH} ${DBus1_PKGCONFIG_DIR})
> +#set(ENV{PKG_CONFIG_LIBDIR} ${DBus1_PKGCONFIG_DIR})

It might be a sys-apps/dbus-1.15.4 (rather than media-sound/fluidsynth) bug and other multilib packages that do "find_package(DBus1)" may also be affected by this issue.

[1]: https://github.com/FluidSynth/fluidsynth/commit/da7e0d197ef3ff5a3dfdb09b6242f7db931a7f13
[2]: https://github.com/freedesktop/dbus/blob/ce5c01ae416982f86e2e7a78d0990eb7b4f57f9c/cmake/DBus1Config.pkgconfig.in#L24
Comment 1 Maciej S. Szmigiero 2023-04-11 15:34:55 UTC
Additional info:
The D-Bus CMake module used for abi_x86_32 is at /usr/lib64/cmake/DBus1/DBus1Config.cmake.
There's no /usr/lib32/cmake/DBus1/ directory - maybe that's the root cause.

This is a system on a 17.1 profile.
Comment 2 Mike Gilbert gentoo-dev 2023-04-11 15:53:46 UTC
(In reply to Maciej S. Szmigiero from comment #1)

Yes, that seems likely to be the problem.
Comment 3 Larry the Git Cow gentoo-dev 2023-04-11 16:01:00 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ff6a575ea96440e328a1424e91de772a85d457a

commit 1ff6a575ea96440e328a1424e91de772a85d457a
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2023-04-11 15:59:20 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2023-04-11 16:00:36 +0000

    sys-apps/dbus: install cmake files for non-native ABIs
    
    Closes: https://bugs.gentoo.org/904168
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 sys-apps/dbus/{dbus-1.15.4.ebuild => dbus-1.15.4-r1.ebuild} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)