[libvirt] [PATCH] tests: fix compilation of shunloadtest

Pavel Hrdina phrdina at redhat.com
Tue Jan 17 08:49:26 UTC 2017


On Mon, Jan 16, 2017 at 11:06:17AM -0700, Jim Fehlig wrote:
> While local builds succeed fine, a build worker building in a
> chroot environment is encountering the following error with
> libvirt 3.0.0 release candidates
> 
> [  162s] shunloadtest.o: In function `main':
> [  162s] /home/abuild/rpmbuild/BUILD/libvirt-3.0.0/tests/shunloadtest.c:110: undefined reference to `dlopen'
> [  162s] /home/abuild/rpmbuild/BUILD/libvirt-3.0.0/tests/shunloadtest.c:114: undefined reference to `dlsym'
> [  162s] /home/abuild/rpmbuild/BUILD/libvirt-3.0.0/tests/shunloadtest.c:133: undefined reference to `dlclose'
> [  162s] /home/abuild/rpmbuild/BUILD/libvirt-3.0.0/tests/shunloadtest.c:111: undefined reference to `dlerror'
> [  162s] /home/abuild/rpmbuild/BUILD/libvirt-3.0.0/tests/shunloadtest.c:115: undefined reference to `dlerror'
> [  162s] /home/abuild/rpmbuild/BUILD/libvirt-3.0.0/tests/shunloadtest.c:116: undefined reference to `dlclose'
> 
> Fix by appending LDADDS to shunloadtest_LDADD.
> 
> Signed-off-by: Jim Fehlig <jfehlig at suse.com>
> ---
>  tests/Makefile.am | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/Makefile.am b/tests/Makefile.am
> index c7d4748..112396f 100644
> --- a/tests/Makefile.am
> +++ b/tests/Makefile.am
> @@ -1348,7 +1348,7 @@ libshunload_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
>  
>  shunloadtest_SOURCES = \
>  	shunloadtest.c
> -shunloadtest_LDADD = $(LIB_PTHREAD)
> +shunloadtest_LDADD = $(LIB_PTHREAD) $(LDADDS)

I don't thing that this is a correct fix.  Some of the libs from LDADDS may
include the dlopen libs but you cannot count on that.  It should be enough to
add $(DLOPEN_LIBS).

Pavel

>  shunloadtest_DEPENDENCIES = libshunload.la
>  
>  sysinfotest_SOURCES = \
> -- 
> 2.9.2
> 
> --
> libvir-list mailing list
> libvir-list at redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170117/9310d495/attachment-0001.sig>


More information about the libvir-list mailing list