[libvirt] [PATCH] vbox: fix linker error

Noticed the following error when building the vbox driver in the openSUSE build service CCLD vboxsnapshotxmltest /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: ../src/.libs/libvirt_driver_vbox_impl.a (libvirt_driver_vbox_impl_la-vbox_snapshot_conf.o): undefined reference to symbol 'xmlXPathRegisterNs@@LIBXML2_2.4.30' /usr/lib64/libxml2.so: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status Fixed by adding LIBXML_LIBS to libvirt_driver_vbox_impl_la_LIBADD Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- Oddly, I don't see this when doing local builds, but haven't really found out what is different between my build environments. src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index 2b9ac61..10c35d7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1143,7 +1143,7 @@ libvirt_driver_vbox_impl_la_CFLAGS = \ -I$(top_srcdir)/src/conf \ $(AM_CFLAGS) libvirt_driver_vbox_impl_la_LDFLAGS = $(AM_LDFLAGS) -libvirt_driver_vbox_impl_la_LIBADD = $(DLOPEN_LIBS) $(MSCOM_LIBS) +libvirt_driver_vbox_impl_la_LIBADD = $(DLOPEN_LIBS) $(MSCOM_LIBS) $(LIBXML_LIBS) libvirt_driver_vbox_impl_la_SOURCES = $(VBOX_DRIVER_SOURCES) endif WITH_VBOX -- 1.8.4.5

On 06/30/2014 04:42 PM, Jim Fehlig wrote:
Noticed the following error when building the vbox driver in the openSUSE build service
CCLD vboxsnapshotxmltest /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: ../src/.libs/libvirt_driver_vbox_impl.a (libvirt_driver_vbox_impl_la-vbox_snapshot_conf.o): undefined reference to symbol 'xmlXPathRegisterNs@@LIBXML2_2.4.30' /usr/lib64/libxml2.so: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status
Fixed by adding LIBXML_LIBS to libvirt_driver_vbox_impl_la_LIBADD
Signed-off-by: Jim Fehlig <jfehlig@suse.com> ---
ACK; safe for 1.2.6. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

Eric Blake wrote:
On 06/30/2014 04:42 PM, Jim Fehlig wrote:
Noticed the following error when building the vbox driver in the openSUSE build service
CCLD vboxsnapshotxmltest /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: ../src/.libs/libvirt_driver_vbox_impl.a (libvirt_driver_vbox_impl_la-vbox_snapshot_conf.o): undefined reference to symbol 'xmlXPathRegisterNs@@LIBXML2_2.4.30' /usr/lib64/libxml2.so: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status
Fixed by adding LIBXML_LIBS to libvirt_driver_vbox_impl_la_LIBADD
Signed-off-by: Jim Fehlig <jfehlig@suse.com> ---
ACK; safe for 1.2.6.
Thanks, pushed. Regards, Jim

Jim Fehlig wrote:
Eric Blake wrote:
On 06/30/2014 04:42 PM, Jim Fehlig wrote:
Noticed the following error when building the vbox driver in the openSUSE build service
CCLD vboxsnapshotxmltest /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: ../src/.libs/libvirt_driver_vbox_impl.a (libvirt_driver_vbox_impl_la-vbox_snapshot_conf.o): undefined reference to symbol 'xmlXPathRegisterNs@@LIBXML2_2.4.30' /usr/lib64/libxml2.so: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status
Fixed by adding LIBXML_LIBS to libvirt_driver_vbox_impl_la_LIBADD
Signed-off-by: Jim Fehlig <jfehlig@suse.com> ---
ACK; safe for 1.2.6.
Thanks, pushed.
Bah, broke syntax-check due to long line in the makefile. I'll push a fix shortly. Regards, Jim
participants (2)
-
Eric Blake
-
Jim Fehlig