[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 Thu, Oct 14, 2010 at 03:45:01PM +0100, Daniel P. Berrange wrote:
> 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 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'

  Okay, ACK to a rebased patch set once this error is fixed,

Daniel

-- 
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]