qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] libcacard: use the library?
Date: Mon, 27 Apr 2015 10:49:57 +0100	[thread overview]
Message-ID: <20150427094957.GG780@redhat.com> (raw)
In-Reply-To: <553E0514.5030700@msgid.tls.msk.ru>

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	other threads:[~2015-04-27  9:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-27  9:44 [Qemu-devel] libcacard: use the library? Michael Tokarev
2015-04-27  9:49 ` Daniel P. Berrange [this message]
2015-04-27  9:54   ` Michael Tokarev
2015-04-27 10:00   ` Peter Maydell
2015-04-27 10:37 ` Paolo Bonzini
2015-06-17 18:25   ` Michael Tokarev
2015-06-17 19:26     ` Paolo Bonzini
2015-06-17 20:15       ` Michael Tokarev
2015-06-18  8:09         ` Paolo Bonzini
2015-06-18  8:11           ` Michael Tokarev
2015-06-18  8:18             ` Paolo Bonzini
2015-06-18  9:07               ` Markus Armbruster
2015-06-18  9:27                 ` Daniel P. Berrange

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150427094957.GG780@redhat.com \
    --to=berrange@redhat.com \
    --cc=mjt@tls.msk.ru \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).