[libvirt] [PATCH] compile: fix undefined reference to gnutls_x509_crt_get_dn with gcc-4.6.1

Xu He Jie xuhj at linux.vnet.ibm.com
Thu Oct 20 01:57:10 UTC 2011


于 2011年10月19日 21:08, Eric Blake 写道:
> On 10/18/2011 08:06 PM, Xu He Jie wrote:
>>> More likely, the difference is not in gcc, but in ld policy - Ubuntu
>>> recently changed policy to no longer allow implicit link dependencies
>>> by default (that is, if A links against B, and B links against C,
>>> older distros allowed A to use symbols from C without explicitly
>>> linking against C, while newer distros require the explicit link).
>>>
>
>>> Likewise.
>>>
>>> Your approach to a fix is correct, but I need to know whether to use
>>> the patch as-is or whether we just need one library rather than two.
>>>
>>>
>> Yes, I get a second link error. When I just add GNUTLS_LIBS to there, 
>> I get another error, as below:
>>
>> /usr/bin/ld: 
>> ../src/.libs/libvirt_driver_qemu.a(libvirt_driver_qemu_la-qemu_domain.o): 
>> undefined reference to symbol 'xmlXPathRegisterNs@@LIBXML2_2.4.30'
>> /usr/bin/ld: note: 'xmlXPathRegisterNs@@LIBXML2_2.4.30' is defined in 
>> DSO /usr/lib/libxml2.so so try adding it to the linker command line
>
> In which case, ACK and pushed.
>
> Your original patch was (mistakenly) attributed to 
> <soulxu at soulxu-ThinkPad-T410.(none)>, which is not a valid address; 
> you should probably fix your ~/.gitconfig settings on that computer. 
> Hopefully I was correct in re-attributing authorship to the email you 
> used for previous patches.
>
Thanks!




More information about the libvir-list mailing list