[libvirt] [PATCH v2] tests: Avoid double linking some libraries

Eric Blake eblake at redhat.com
Thu Jul 3 19:29:17 UTC 2014


On 07/03/2014 01:17 PM, Michal Privoznik wrote:
> The problem is, since 614581f32b domaincapstest is linked with
> $(LDADDS) by default. Then, since 94e3f23e8a7 the test may be
> conditionally linked with $(qemu_LDADDS) which already contains
> $(LDADDS). And some linkers doesn't cope with this nicely:
> 
>   CCLD     domaincapstest
> ../src/libvirt_probes.o:(.probes+0x0): multiple definition of `libvirt_event_poll_add_handle_semaphore'
> ../src/libvirt_probes.o:(.probes+0x0): first defined here
> ../src/libvirt_probes.o:(.probes+0x2): multiple definition of `libvirt_event_poll_update_handle_semaphore'
> ../src/libvirt_probes.o:(.probes+0x2): first defined here
> ../src/libvirt_probes.o:(.probes+0x4): multiple definition of `libvirt_event_poll_remove_handle_semaphore'
> ../src/libvirt_probes.o:(.probes+0x4): first defined here
> ../src/libvirt_probes.o:(.probes+0x6): multiple definition of `libvirt_event_poll_dispatch_handle_semaphore'
> ../src/libvirt_probes.o:(.probes+0x6): first defined here
> 
> And so on.
> 
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
> 
> diff to v1:
> -fix securityselinuxlabeltest too
> 
>  tests/Makefile.am | 31 ++++++++++++++++---------------
>  1 file changed, 16 insertions(+), 15 deletions(-)

This version makes sense to me. Rather than hiding LDADDS inside
qemu_LDADDS, it makes qemu_LDADDS be only the additional libraries to
add, and thus usable in conditions.

ACK.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140703/08a460b6/attachment-0001.sig>


More information about the libvir-list mailing list