SHA256
1
0
forked from pool/libvirt
libvirt/temp-build-fix.patch
James Fehlig 145c421e41 Accepting request 627772 from home:jfehlig:branches:Virtualization
- Update to libvirt 4.6.0
  - Many incremental improvements and bug fixes, see
    http://libvirt.org/news.html
  - Switch from yajl to jansson
  - Dropped patches:
    libvirt-4.5.0-apparmor-add-missing-comma.patch
  - Patches added to fix upstream bugs:
    temp-build-fix.patch

OBS-URL: https://build.opensuse.org/request/show/627772
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=699
2018-08-06 22:52:48 +00:00

41 lines
1.8 KiB
Diff

Fix link errors in tools/nss and tests
Although a simple 'make' of libvirt.git works, building libvirt 4.6.0
with 'osc build ...' fails in tools/nss and tests, with output along
the lines of:
[ 469s] libtool: link: gcc -shared -fPIC -DPIC -Wl,--whole-archive nss/.libs/libnss_libvirt_impl.a -Wl,--no-whole-archive -lpthread -lutil -ltirpc -fstack-protector-strong -grecord-gcc-switches -O2 -fstack-protector-strong -g -Wl,--version-script=./nss/libvirt_nss.syms -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,--no-copy-dt-needed-entries -Wl,-z -Wl,defs -grecord-gcc-switches -O2 -fstack-protector-strong -g -pthread -Wl,-soname -Wl,libnss_libvirt.so.2 -o nss/.libs/libnss_libvirt.so.2
[ 469s] nss/.libs/libnss_libvirt_impl.a(libvirt_nss_la-virjsoncompat.o): In function `virJSONJanssonOnce':
[ 469s] /home/abuild/rpmbuild/BUILD/libvirt-4.6.0/src/util/virjsoncompat.c:63: undefined reference to `dlopen'
[ 469s] /home/abuild/rpmbuild/BUILD/libvirt-4.6.0/src/util/virjsoncompat.c:79: undefined reference to `dlsym'
...
A quick hack is to add '-ldl' to the linker flags for libnss_libvirt_impl
and /libnss_libvirt_guest_impl. Will ask about a proper fix on libvirt
dev list.
Index: libvirt-4.6.0/tools/Makefile.am
===================================================================
--- libvirt-4.6.0.orig/tools/Makefile.am
+++ libvirt-4.6.0/tools/Makefile.am
@@ -525,6 +525,9 @@ nss_libnss_libvirt_impl_la_CFLAGS = \
$(AM_CFLAGS) \
$(NULL)
+nss_libnss_libvirt_impl_la_LDFLAGS = \
+ -ldl
+
nss_libnss_libvirt_impl_la_LIBADD = \
../gnulib/lib/libgnu.la \
../src/libvirt-nss.la
@@ -552,6 +555,9 @@ nss_libnss_libvirt_guest_impl_la_CFLAGS
$(AM_CFLAGS) \
$(NULL)
+nss_libnss_libvirt_guest_impl_la_LDFLAGS = \
+ -ldl
+
nss_libnss_libvirt_guest_impl_la_LIBADD = \
../gnulib/lib/libgnu.la \
../src/libvirt-nss.la