Re: [libvirt] [PATCH 06/10] Qemu Monitor API entry point.

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

 



On 04/27/2010 04:25 PM, Daniel P. Berrange wrote:
>> Causes the build to fail when linking virsh:
>>
>>   CCLD   virsh
>> ../src/.libs/libvirt-qemu.so: undefined reference to `qemuMonitorCommand'
>> collect2: ld returned 1 exit status
>>
>> Indeed, if I nm src/.libs/libvirt-qemu.so:
>>
>> [clalance@localhost libvirt (qemu_monitor)]$ nm src/.libs/libvirt-qemu.so | grep Monitor
>>          U qemuMonitorCommand
>>          U remoteQemuMonitorCommand@@LIBVIRT_PRIVATE_0.8.0
>> 000010b0 T virDomainQemuMonitorCommand
>>
>> Any suggestions about what I'm doing wrong?
> 
> Have you re-ordered your patches ? There is a qemuMonitorCommand  defined
> in src/qemu/qemu_monitor_text.c but that is static. The qemuMonitorCommand
> you actually want is not added till your next patch. So perhaps your old
> code was pullin in the wrong definition ?
> 
> It'd be good to rename this to reflect the public API name and avoid the
> clash

I did not re-order my patches, but you are right, there is a name clash.
I've now resolved that as you suggested (calling the external function
qemuDomainMonitorCommand).

That's not actually the problem, though.  What's happening is that
src/Makefile.am has this:

if WITH_QEMU
if WITH_DRIVER_MODULES
mod_LTLIBRARIES += libvirt_driver_qemu.la
else
noinst_LTLIBRARIES += libvirt_driver_qemu.la
# Stateful, so linked to daemon instead
#libvirt_la_LIBADD += libvirt_driver_qemu.la

i.e. libvirt_driver_qemu.la is not being added to libvirt.la, so that's
why my linking step in virsh is failing (and *not* failing when linking
libvirtd).  So I think I need to manually specify libvirt_qemu.la in
my libvirt_qemu_la_LIBADD to avoid this failure.

-- 
Chris Lalancette

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