GNOME Bugzilla – Bug 694239
gresolver use of dn_skipname is non-portable
Last modified: 2013-02-20 17:20:56 UTC
Somewhere between version 2.32.2 and 2.34.2, glib stopped working out of the box against musl libc due to dependency on resolver library internals which musl does not provide. If glib is going to depend on such functions for gresolver functionality, it should test for them in its configure script and disable the affected code if they're not present. However, seeing as skipping over names in a DNS packet is essentially a one-line function, it would probably be a lot cleaner just to include the necessary code in glib itself.
AFAIK, dn_skipname has always been part of the resolver API (which dates back to 4.3BSD, in 1986). This code would compile on AIX, HP-UX, and any other crazy vendor unix you could come up with. If it doesn't compile under musl then that sounds like a musl compatibility problem, not a glib portability problem.
musl does not implement the 4.3BSD resolver API. It may be possible to get this added, but if glib is using this API, its configure script should test for presence of the API rather than unconditionally using it. It's frustrating when upgrading a package breaks because it adds new dependencies on functions it does not test for or document a dependency on. By the way, there seems to have already been a similar issue with Bionic, which would never have arisen if configure were properly testing.
(In reply to comment #2) > musl does not implement the 4.3BSD resolver API. It may be possible to get this > added, but if glib is using this API, its configure script should test for > presence of the API rather than unconditionally using it. It does. It checks for res_query, which is part of the same API. It even looks for it in three different places. To be portable. > By the way, there seems to have already been a similar issue with Bionic, which > would never have arisen if configure were properly testing. The issue with bionic is that it implements the API but does not provide the headers.