Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 503160 - net-dns/avahi: gx86-multilib conversion needed
Summary: net-dns/avahi: gx86-multilib conversion needed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gx86-multilib 493172
  Show dependency tree
 
Reported: 2014-03-01 22:15 UTC by Michał Górny
Modified: 2014-05-12 18:08 UTC (History)
2 users (show)

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


Attachments
patch from Steven Newbury (avahi-0.6.31-r4.ebuild.patch,4.52 KB, patch)
2014-05-01 15:21 UTC, Christoph Junghans (RETIRED)
Details | Diff
avahi-0.6.31-r4.ebuild.patch (avahi-0.6.31-r4.ebuild.patch,4.66 KB, patch)
2014-05-04 12:28 UTC, Michael Mair-Keimberger (iamnr3)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-03-01 22:15:49 UTC
We're going to need it for net-print/cups.

@blueness, please let us know if you'd like to work on it yourself or if you prefer that we prepare a patch.
Comment 1 Anthony Basile gentoo-dev 2014-03-01 22:23:43 UTC
(In reply to Michał Górny from comment #0)
> We're going to need it for net-print/cups.
> 
> @blueness, please let us know if you'd like to work on it yourself or if you
> prefer that we prepare a patch.

Any documentation or examples here that I can look at.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-03-01 23:01:25 UTC
media-libs/harfbuzz is a pretty recent example that seems to use all the features needed for avahi + multilib-minimal.eclass docs.

From a quick glance:

1. you need to determine which of avahi libraries are public API.

2. you need to determine which of the dependencies apply to those libraries, and add [${MULTILIB_USEDEP}] to those. If some of them aren't converted already, ping us and we'll open bugs for them.

3. you need to determine if you can disable all other dependencies in '! multilib_build_binaries' branch of code. If you can't, you need to hack the checks around.

4. if utilities are small, it's fine to build them. If they take long to build or introduce extra deps, you also need to hack the ebuild not to build/install them in '! multilib_build_binaries'.

So, long story short, you try to build /usr/lib32/libavahi*.so with minimal effort on user and maximal effort on you :).
Comment 3 Jonathan Callen (RETIRED) gentoo-dev 2014-03-02 22:39:03 UTC
Just looking at some of the bits this package installs, it appears that a proper multilib conversion would require that x11-libs/gtk+:2 (for libavahi-ui.so), x11-libs/gtk+:3 (for libavahi-ui-gtk3.so), and dev-qt/qtcore:4 (for libavahi-qt4.so) be converted first -- I think we have a dependency loop here :( .
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-03-03 05:36:43 UTC
Awesome. We can disable the UI libraries in multilib ABIs for now. Though all the circular dependency pain is going to hit users hard one day, and I'm not sure if they will be able to upgrade at all...
Comment 5 Anthony Basile gentoo-dev 2014-03-24 13:35:09 UTC
(In reply to Michał Górny from comment #4)
> Awesome. We can disable the UI libraries in multilib ABIs for now. Though
> all the circular dependency pain is going to hit users hard one day, and I'm
> not sure if they will be able to upgrade at all...

Can you guys suggest a patch against the ebuild here, I've been too busy to address this.
Comment 6 Christoph Junghans (RETIRED) gentoo-dev 2014-05-01 15:21:20 UTC
Created attachment 376144 [details, diff]
patch from Steven Newbury

From: https://github.com/sjnewbury/gentoo-gx86-staging
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-05-01 15:24:43 UTC
(In reply to Christoph Junghans from comment #6)
> Created attachment 376144 [details, diff] [details, diff]
> patch from Steven Newbury
> 
> From: https://github.com/sjnewbury/gentoo-gx86-staging

It's broken and won't work. For one, it's calling 'multilib_build_binaries' in global scope rather than per-ABI :). And even if it did that correctly, it doesn't disable the switches if the conditional is false.

Most of the old patches lying around should be rewritten to use the new APIs, and preferably avoid autotools-multilib to ease integration.
Comment 8 Michael Mair-Keimberger (iamnr3) 2014-05-04 12:28:40 UTC
Created attachment 376330 [details, diff]
avahi-0.6.31-r4.ebuild.patch

My take on avahi. Please review.

Some notes:

Following flags are disabled atm:
doc - don't need building docs twice
python, mono, introspection - only builds language bindings, which i think aren't mandatory
gtk, gtk3, qt4 - as mgorny mentioned earlier, i've disabled UI libaries for now.
utils - would need gtk/gtk+ thus i've disabled it too.

Furthermore i would also suggest disabling  autoipd for multilib as it seems it just builds an daemon. Especially the rcscript are installed twice at the moment (lib[32,64]). I don't think that's useful.

I've also tried without multilib_copy_source but got some configuration errors like: 

checking gdbm.h presence... configure: error: *** xmltoman was not found or was disabled, it is required to build the manpages as they have not been pre-built, install xmltoman, pass --disable-manpages or dont pass --disable-xmltoman
yes
checking for gdbm.h... yes
checking for LIBDAEMON... yes
configure: error: *** xmltoman was not found or was disabled, it is required to build the manpages as they have not been pre-built, install xmltoman, pass --disable-manpages or dont pass --disable-xmltoman

avahi don't find the pre-built manpages, i guess the configure script would need to be patched here?

Other than that everything seems to work.
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-05-12 15:16:18 UTC
$ readelf -d $(qlist avahi | grep lib64/lib) | grep NEEDED | sort -u
 0x0000000000000001 (NEEDED)             Shared library: [libavahi-client.so.3]
 0x0000000000000001 (NEEDED)             Shared library: [libavahi-common.so.3]
 0x0000000000000001 (NEEDED)             Shared library: [libavahi-glib.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libdbus-1.so.3]
 0x0000000000000001 (NEEDED)             Shared library: [libdl.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libgdbm.so.4]
 0x0000000000000001 (NEEDED)             Shared library: [libgdk-3.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libgdk-x11-2.0.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libglib-2.0.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libgobject-2.0.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libgtk-3.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libgtk-x11-2.0.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libQtCore.so.4]
 0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]

So, libdaemon & expat are unnecessary as they're used by the daemon only.

I'm going to convert this today.
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-05-12 18:08:57 UTC
+*avahi-0.6.31-r5 (12 May 2014)
+
+  12 May 2014; Michał Górny <mgorny@gentoo.org> +avahi-0.6.31-r5.ebuild,
+  +files/avahi-0.6.31-build-client-without-daemon.patch:
+  Enable multilib support, bug #503160.

Committed p.masked.