[Pkg-utopia-maintainers] Bug#873596: avahi FTCBFS: needs to run host python

Helmut Grohne helmut at subdivi.de
Thu Jan 9 12:05:33 GMT 2025


On Thu, May 07, 2020 at 01:49:57PM +0100, Simon McVittie wrote:
> However, python2 is run during the build to convert a text file listing
> mDNS service types into a gdbm database. gdbm databases appear to be
> endianness- and word-size-specific, so we need to build a database that
> matches the host architecture's endianness and word size, even if they
> differ from the build architecture's endianness and word size; so using
> python2:any (or more generally, python2:${build-arch} when cross-compiling
> on ${build-arch} for ${host-arch}) would not be correct.
> 
> I realize this makes it impossible to cross-compile avahi, which is
> unfortunate - but I don't think that's fixable with the package's current
> content.

Despite the delay, I fully concur. It's Python 3.x now, but that doesn't
change much. The code consuming the file is in avahi-utils/stdb.c and
used e.g. by avahi-browse. The code creating the gdbm database is at
service-type-database/build-db and it is converting a 242 line text file
service-type-database/service-types that contains 107 non-empty
non-comment lines into a 16kb gbdm database.

To me, this does not make much sense. I'd rather convert the database to
some array in C and do a linear search compiling it into the binary
given the current database size. That's likely much faster than opening
an external file and removes the dependency on gdbm entirely. Only when
the database grows beyond around 1000 entries will a gdbm pose any
benefit in speed. We're more than a factor of 10 removed from that.

In any case, this very much is an upstream problem affecting all cross
building distributions. For the time being, I do not intend to work on
this problem. If anyone feels that this bug report is not actionable and
clutters avahi's bug listing, consider closing it. Cross build bugs
should be actionable in my opinion and Simon acted upon the actionable
parts (thanks).

Helmut



More information about the Pkg-utopia-maintainers mailing list