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

Re: [libvirt] [PATCH 4/4] Fix symbol exports & remove duplicated libvirt_util.la linkage

On Tue, Oct 12, 2010 at 06:32:18PM +0100, Daniel P. Berrange wrote:
> From: Miloslav Trmač <mitr redhat com>
> The libvirt_util.la library was mistakenly linked into libvirtd
> directly. Since libvirt_util.la is already linked to libvirt.so,
> this resulted in libvirtd getting two copies of the code and
> more critically 2 copies of static global variables.
> Testing in turn exposed a issue with loadable modules. The
> gnulib replacement functions are not exported to loadable
> modules. Rather than trying to figure out the name sof all
> gnulib functions & export them, just linkage all loadable
> modules against libgnu.la statically.
> * daemon/Makefile.am: Remove linkage of libvirt_util.la
>   and libvirt_driver.la
> * src/Makefile.am: Link driver modules against libgnu.la
> * src/libvirt.c: Don't try to load modules which were
>   compiled out
> * src/libvirt_private.syms: Export all other internal
>   symbols that are required  by drivers

  Hum, weird, I tried to o  a "make rpm" with that patch and got
a linking error due to multiple definitions coming from gnulib:

    CCLD   libvirt_lxc
    CCLD   libvirt.la
    copying selected object files to avoid basename conflicts...
    ../gnulib/lib/.libs/libgnu.a(areadlink.o): In function `areadlink':
    multiple definition of `areadlink'
    first defined here
    ../gnulib/lib/.libs/libgnu.a(base64.o): In function `base64_encode':
    multiple definition of `base64_encode'

So patches 1-3 look fine to me but that one seems to still have a


Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

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