[libvirt] Changing test_driver.c file

Hi All, For some testing purpose I've changed some content in src/test/test_driver.c and then used "make" command to compile and build the code. Then I copied the "libvirt.so.0.9.10.so" file to the target machine and restart the libvirtd daemon, but the changes I made in test_driver.c is nothing reflected. I'm not sure whether I'm missing something. Is it moving only the "libvirt.so.0.9.10.so" is enough or I need to move some .a files ? , but I'm not seeing any ".a" in the kvm host related to libvirt to replace. Please provide me sufficient info to proceed further. Thanks In Advance, Arun V

[no need to post to two separate lists; this is a development question, so replies can drop libvirt-users] On 10/04/2013 12:08 PM, Arun Viswanath wrote:
Hi All,
For some testing purpose I've changed some content in src/test/test_driver.c and then used "make" command to compile and build the code. Then I copied the "libvirt.so.0.9.10.so" file to the target
Huh? Why are you building 0.9.10 instead of the latest 1.1.3?
machine and restart the libvirtd daemon, but the changes I made in test_driver.c is nothing reflected. I'm not sure whether I'm missing something. Is it moving only the "libvirt.so.0.9.10.so" is enough or I need to move some .a files ? , but I'm not seeing any ".a" in the kvm host related to libvirt to replace. Please provide me sufficient info to proceed further.
What configure options did you use when you built libvirt? Manually copying single files onto a target machine is almost always wrong; much better is to 'make install' (perhaps with an appropriate DESTDIR=/staging setting), then place that entire installed tree into place on the destination. If you are using a Fedora-based distro, 'make rpm' will even turn your self-built binary into an rpm that you can install using your package manager, for much easier control over getting everything right. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

Hi Eric, Thanks for the response. As mentioned I need to build the libvirt and install it in different VM. I'm new to libvirt and new to C programming as well. Will you provide me any reference about all different way to build and install the libvirt. Thanks In Advance, Arun V On Fri, Oct 4, 2013 at 11:45 PM, Eric Blake <eblake@redhat.com> wrote:
[no need to post to two separate lists; this is a development question, so replies can drop libvirt-users]
On 10/04/2013 12:08 PM, Arun Viswanath wrote:
Hi All,
For some testing purpose I've changed some content in src/test/test_driver.c and then used "make" command to compile and build the code. Then I copied the "libvirt.so.0.9.10.so" file to the target
Huh? Why are you building 0.9.10 instead of the latest 1.1.3?
machine and restart the libvirtd daemon, but the changes I made in test_driver.c is nothing reflected. I'm not sure whether I'm missing something. Is it moving only the "libvirt.so.0.9.10.so" is enough or I need to move some .a files ? , but I'm not seeing any ".a" in the kvm host related to libvirt to replace. Please provide me sufficient info to proceed further.
What configure options did you use when you built libvirt? Manually copying single files onto a target machine is almost always wrong; much better is to 'make install' (perhaps with an appropriate DESTDIR=/staging setting), then place that entire installed tree into place on the destination. If you are using a Fedora-based distro, 'make rpm' will even turn your self-built binary into an rpm that you can install using your package manager, for much easier control over getting everything right.
-- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

[please don't top-post on technical lists] On 10/05/2013 08:55 AM, Arun Viswanath wrote:
Hi Eric,
Thanks for the response. As mentioned I need to build the libvirt and install it in different VM.
I'm new to libvirt and new to C programming as well. Will you provide me any reference about all different way to build and install the libvirt.
Have you read the HACKING and INSTALL files? When developing with self-built libvirt, I find it easiest to do './autogen.sh --system', which builds my copy of libvirt to be a drop-in replacement for the one my distro ships (Fedora-based, in my case).
What configure options did you use when you built libvirt?
You still haven't answered my question, which makes it hard for me to provide much help. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (2)
-
Arun Viswanath
-
Eric Blake