On 05/24/2018 04:27 AM, Ian Jackson wrote:
Ian Jackson writes ("Likely build race, "/usr/bin/ld: cannot find -lvirt""):
tl;dr:
I think there is a bug in libvirt's build system which, with
low probability, causes a build failure containing this message:
/usr/bin/ld: cannot find -lvirt
Complete build logs of two attempts:
http://logs.test-lab.xenproject.org/osstest/logs/123046/build-i386-libvirt/6.ts-libvirt-build.log
http://logs.test-lab.xenproject.org/osstest/logs/123096/build-i386-libvirt/6.ts-libvirt-build.log
I have run a number of attempts. Out of 5 more, 1 succeeded. So out
of a total of 7 attempts, 1 succeeded. This repro rate is an IMO
excellent opportunity to debug this race :-).
There appears to be a missing dependency between the lockd library and libvirt
library, but my autotools skills lack the savvy to find it. Here we see the
install command and relinking of lockd.la
/bin/bash ../libtool --mode=install /usr/bin/install -c lockd.la
'/home/osstest/build.123096.build-i386-libvirt/dist/usr/local/lib/libvirt/lock-driver'
libtool: install: warning: relinking `lockd.la'
libtool: install: (cd /home/osstest/build.123096.build-i386-libvirt/libvirt/src;
/bin/bash /home/osstest/build.123096.build-i386-libvirt/libvirt/libtool
--silent --tag CC --mode=relink gcc -std=gnu99 -I./conf -I/usr/include/libxml2
-fno-common -W -Waddress -Waggressive-loop-optimizations -Wall -Wattributes
-Wbad-function-cast -Wbuiltin-macro-redefined -Wcast-align -Wchar-subscripts
-Wclobbered -Wcomment -Wcomments -Wcoverage-mismatch -Wcpp -Wdate-time
-Wdeprecated-declarations -Wdiv-by-zero -Wdouble-promotion -Wempty-body
-Wendif-labels -Wextra -Wformat-contains-nul -Wformat-extra-args
-Wformat-security -Wformat-y2k -Wformat-zero-length -Wfree-nonheap-object
-Wignored-qualifiers -Wimplicit -Wimplicit-function-declaration -Wimplicit-int
-Winit-self -Winline -Wint-to-pointer-cast -Winvalid-memory-model -Winvalid-pch
-Wjump-misses-init -Wlogical-op -Wmain -Wmaybe-uninitialized
-Wmemset-transposed-args -Wmissing-braces -Wmissing-declarations
-Wmissing-field-initializers -Wmissing-include-dirs -Wmissing-parameter-type
-Wmissing-prototypes -Wmultichar -Wnarrowing -Wnested-externs -Wnonnull
-Wold-style-declaration -Wold-style-definition -Wopenmp-simd -Woverflow
-Woverride-init -Wpacked-bitfield-compat -Wparentheses -Wpointer-arith
-Wpointer-sign -Wpointer-to-int-cast -Wpragmas -Wpsabi -Wreturn-local-addr
-Wreturn-type -Wsequence-point -Wshadow -Wsizeof-pointer-memaccess
-Wstrict-aliasing -Wstrict-prototypes -Wsuggest-attribute=const
-Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure
-Wswitch -Wsync-nand -Wtrampolines -Wtrigraphs -Wtype-limits -Wuninitialized
-Wunknown-pragmas -Wunused -Wunused-but-set-parameter -Wunused-but-set-variable
-Wunused-function -Wunused-label -Wunused-local-typedefs -Wunused-parameter
-Wunused-result -Wunused-value -Wunused-variable -Wvarargs -Wvariadic-macros
-Wvector-operation-performance -Wvolatile-register-var -Wwrite-strings
-Wnormalized=nfc -Wno-sign-compare -Wjump-misses-init -Wswitch-enum
-Wno-format-nonliteral -fstack-protector-strong -fexceptions
-fasynchronous-unwind-tables -fipa-pure-const -Wno-suggest-attribute=pure
-Wno-suggest-attribute=const -Werror -Wframe-larger-than=4096 -g
-I/home/osstest/build.123096.build-i386-libvirt/xendist/usr/local/include/
-DLIBXL_API_VERSION=0x040400 -module -avoid-version -Wl,-z -Wl,nodelete
-export-dynamic -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,--no-copy-dt-needed-entries
-Wl,-z -Wl,defs -g
-L/home/osstest/build.123096.build-i386-libvirt/xendist/usr/local/lib/
-Wl,-rpath-link=/home/osstest/build.123096.build-i386-libvirt/xendist/usr/local/lib/
-o lockd.la -rpath /usr/local/lib/libvirt/lock-driver
locking/lockd_la-lock_driver_lockd.lo locking/lockd_la-lock_protocol.lo
libvirt.la ../gnulib/lib/libgnu.la -ldl -inst-prefix-dir
/home/osstest/build.123096.build-i386-libvirt/dist)
/usr/bin/ld: cannot find -lvirt
collect2: error: ld returned 1 exit status
libtool: install: error: relink `lockd.la' with the above command before
installing it
Makefile:6410: recipe for target 'install-lockdriverLTLIBRARIES' failed
and several lines later it seems another thread finally finishes libvirt.la
libtool: install: /usr/bin/install -c .libs/libvirt.lai
/home/osstest/build.123096.build-i386-libvirt/dist/usr/local/lib/libvirt.la
I've stared at the various Makefile.{,inc.}am files but can't spot the problem.
Perhaps other libvirt maintainers with better autotools skills can give some hints.
Regards,
Jim
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list