[systemd-devel] [patch] Add -lresolv to libsystemd_intenal_la_LIBADD to prevent underlinking issues

Samuli Suominen ssuominen at gentoo.org
Tue Mar 25 21:57:57 PDT 2014


On 26/03/14 03:38, Kay Sievers wrote:
> On Mon, Mar 17, 2014 at 1:43 AM, Lennart Poettering
> <lennart at poettering.net> wrote:
>> On Sun, 16.03.14 19:49, Samuli Suominen (ssuominen at gentoo.org) wrote:
>>
>>> On 16/03/14 15:52, Zbigniew Jędrzejewski-Szmek wrote:
>>>> On Sun, Mar 16, 2014 at 10:10:15AM +0200, Samuli Suominen wrote:
>>>>> Since -Wl,-fuse-ld=gold addition, this happens on IA64 arch where binutils's ld gold doesn't support --gc-sections yet:
>>>> Maybe you should just use bfd linker then? Gold was only necessary for the
>>>> ifunc stuff, which is gone anyway. This might to be a better solution, since
>>>> otherwise everything gets an extra lib.
>>> -lresolv is used elsewhere in Makefile.am too, like in
>>> libsystemd_la_LIBADD and test_resolve_LDADD
>>>
>>> src/libsystemd/sd-resolve/sd-resolve.c:                         ret =
>>> res_search                   at line 432
>>> src/libsystemd/sd-resolve/sd-resolve.c:                         ret =
>>> res_query                     at line 430
>>>
>>> then sd-resolve.c is in libsystemd_internal_la_SOURCES, so adding
>>> -lresolv to libsystemd_internal_la_LIBADD is not a workaround,
>>> but the correct thing to do
>> We probably should much rather create a separate internal convenience
>> lib for sd-resolve so that the -lresolv dep isn't pulled into everything
>> that uses any API of sd-id128, sd-login, sd-bus, ...
> A workaround should be in the current release.
>
> Kay

I was worried about this one. Thanks! It's really appericiated!

- Samuli


More information about the systemd-devel mailing list