[systemd-devel] [PATCH] Add -lresolv to libudev LIBADD

Kay Sievers kay at vrfy.org
Fri Feb 21 08:06:44 PST 2014


On Fri, Feb 21, 2014 at 4:58 PM, Łukasz Stelmach <l.stelmach at samsung.com> wrote:
> It was <2014-02-21 pią 16:22>, when Lennart Poettering wrote:
>> On Fri, 21.02.14 15:54, Łukasz Stelmach (l.stelmach at samsung.com) wrote:
>>
>>> Fix problems with unresolved symbols when building on Ubuntu 12.04 x86_64.
>>>
>>> --8<---------------cut here---------------start------------->8---
>>> ./.libs/libudev.so: undefined reference to `__res_search'
>>> ./.libs/libudev.so: undefined reference to `__res_query'
>>> collect2: ld returned 1 exit status
>>> --8<---------------cut here---------------end--------------->8---
>>
>> This doesn't look right. libudev really shouldn't need libresolv. We
>> should figure out how these calls got pulled in...
>
> Let me go step-by-step:
>
> --8<---------------cut here---------------start------------->8---
> $ strings ./.libs/libudev.so | grep __res_'\(query\|search\)'
>
> __res_query
> __res_search
>
> # libudev needs libsystemd-internal
> $ strings ./.libs/libsystemd-internal.a | grep __res_'\(query\|search\)'

This does not seem to happen here. Are you sure that "as-needed" is
working in your setup?

Kay


More information about the systemd-devel mailing list