qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] libcacard: use the library?


From: Daniel P. Berrange
Subject: Re: [Qemu-devel] libcacard: use the library?
Date: Mon, 27 Apr 2015 10:49:57 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

On Mon, Apr 27, 2015 at 12:44:52PM +0300, Michael Tokarev wrote:
> Currently we link individual object files from libcacard
> to qemu-system binaries, this way (from Makefile.objs):
> 
> libcacard-y += libcacard/cac.o libcacard/event.o
> libcacard-y += libcacard/vcard.o libcacard/vreader.o
> ...
> common-obj-$(CONFIG_SMARTCARD_NSS) += $(libcacard-y)
> 
> Why can't we use the actual library, and just add the
> linker flag, -Ilibcacard -lcacard?
> 
> libcacard is built only when libtool is found, which
> is kinda illogical since libtool is not needed to link
> these object files with qemu.  And libtool is already
> used (if found) to link qemu binaries, so using it to
> link binaries with libcacard is already done.
> 
> How about replacing these common-obj-$(CONFIG_SMARTCARD_NSS)
> with appropriate linker flags, and doing that only for
> these binaries which actually need libcacard?

I'm really still kind of puzzelled why we have libcacard in the QEMU
source tree at all. QEMU depends on plenty of 3rd party libraries, all
of which are outside the source tree. The libcacard library is also
used by things outside of QEMU such as the various spice clients. As
such this bundling of libcacard in QEMU causes use build problems in
Fedora & RHEL periodically. We sometimes need to rebuild both QEMU
and SPICE due to a change in ABI. We need to rebuild QEMU first to
make new libcacard available to SPICE. We need to rebuild SPICE first
to make new libspice-server available to QEMU. So we end up having
to disable SPICE in QEMU. Rebuild QEMU. Rebuild SPICE. Re-enable SPICE
in QEMU and rebuild QEMU again. It'd be far simpler if libcacard was
just a standalone library with its our releases, like everything else
we depend on, and QEMU just link to it normally.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|



reply via email to

[Prev in Thread] Current Thread [Next in Thread]