Re: [PATCH] Fix several undefined symbol errors in loadable driver modules

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

 



2010/6/23 Daniel P. Berrange <berrange@xxxxxxxxxx>:
> On Wed, Jun 23, 2010 at 12:33:54PM +0200, Matthias Bolte wrote:
>> Link all loadable driver modules to libvirt.la and libgnu.la.
>>
>> Add several missing symbols to libvirt_private.syms in order to
>> have them properly exported.
>> ---
>>  src/Makefile.am          |   25 ++++++++++++++++++++++---
>>  src/libvirt_private.syms |   25 +++++++++++++++++++++++++
>>  tests/Makefile.am        |    6 +++++-
>>  3 files changed, 52 insertions(+), 4 deletions(-)
>>
>> diff --git a/src/Makefile.am b/src/Makefile.am
>> index ece18a6..588adf5 100644
>> --- a/src/Makefile.am
>> +++ b/src/Makefile.am
>> @@ -456,6 +456,7 @@ libvirt_driver_test_la_CFLAGS = \
>>               -I@top_srcdir@/src/conf
>>  if WITH_DRIVER_MODULES
>>  libvirt_driver_test_la_LDFLAGS = -module -avoid-version
>> +libvirt_driver_test_la_LIBADD = libvirt.la ../gnulib/lib/libgnu.la
>
> I don't think it is right to link to libvirt.la here or with other
> driver modules.
>
> The libvirtd daemon links to libvirt.la already, and is built such
> that all exported symbols are available to modules that are dlopen()d
> Thus it should be sufficient to add symbols to libvirt_private.syms
> and not link to libvirt.la in driver modules.
>
> It might still be neccessary to link to libgnu.la because that is
> statically linked into libvirtd and thus only gets symbols that
> libvirtd needs. The modules might need further symbols from libgnu.la
> so its reasonable to link to it directly.
>

Hm, you're right. I just tested it and I don't need to link to
libvirt.la in order to have libvirtd and virsh work properly. But
virt-manager or just importing the libvirt python module fails with
undefined symbol error for symbols that are listed in
libvirt_private.syms.

I'll have to investigate more.

Matthias

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]