On Thu, Oct 14, 2010 at 04:22:29PM +0200, Daniel Veillard wrote:
On Tue, Oct 12, 2010 at 06:32:18PM +0100, Daniel P. Berrange wrote:
> From: Miloslav Trmač <mitr(a)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':
/u/veillard/rpms/BUILD/libvirt-0.8.4/gnulib/lib/areadlink.c:58:
multiple definition of `areadlink'
./.libs/libvirt_driver_phyp.a(areadlink.o):/u/veillard/rpms/BUILD/libvirt-0.8.4/gnulib/lib/areadlink.c:58:
first defined here
../gnulib/lib/.libs/libgnu.a(base64.o): In function `base64_encode':
/u/veillard/rpms/BUILD/libvirt-0.8.4/gnulib/lib/base64.c:79:
multiple definition of `base64_encode'
So patches 1-3 look fine to me but that one seems to still have a
problem,
This was a simple mistake. One of my changes to the phyp driver link
line was not properly protected by a 'if WITH_DRIVER_MODULES'
Regards,
Daniel
--
|: Red Hat, Engineering, London -o-
http://people.redhat.com/berrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org -o-
http://deltacloud.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|