Re: [PATCH virt-viewer] build: Explicitly link against librest

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 31, 2018 at 01:56:00PM -0300, Eduardo Lima (Etrunko) wrote:
> In remote-viewer, there is an explicit call to rest_proxy_auth_cancel(),
> so we should be linking against librest as well. This patch fixes the
> following error:
> 
> make[3]: Entering directory '/home/elima/projects/spice/virt-viewer/src'
>   CCLD     remote-viewer
> /usr/bin/ld: remote_viewer-remote-viewer.o: undefined reference to symbol 'rest_proxy_auth_cancel'
> /home/elima/install/govirt-usr/lib/librest-0.7.so.0: error adding symbols: DSO missing from command line
> collect2: error: ld returned 1 exit status

Hey, libgovirt 0.3.3 which has this symbol is 3 years old, the
corresponding librest library is 2.5 years old, I'd remove the
AC_COMPILE_IF_ELSE block which detects OVIRT_REST_CALL_ERROR_CANCELLED
and set GOVIRT_REQUIRED to 0.3.3, and add librest 0.8 detection to the PKG_*
checks looking for libgovirt.

Christophe

> 
> Signed-off-by: Eduardo Lima (Etrunko) <etrunko@xxxxxxxxxx>
> ---
>  configure.ac    | 3 ++-
>  src/Makefile.am | 2 ++
>  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/configure.ac b/configure.ac
> index e262e31..c6aeeda 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -187,7 +187,8 @@ AS_IF([test "x$with_ovirt" = "xyes"],
>         AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <govirt/govirt.h>]],
>          [static int err = OVIRT_REST_CALL_ERROR_CANCELLED;
>           void *fun = rest_proxy_auth_cancel;])],
> -        [AC_DEFINE([HAVE_OVIRT_CANCEL], 1, [Have rest_proxy_auth_cancel and OVIRT_REST_CALL_ERROR_CANCELLED?])],
> +        [AC_DEFINE([HAVE_OVIRT_CANCEL], 1, [Have rest_proxy_auth_cancel and OVIRT_REST_CALL_ERROR_CANCELLED?])
> +         PKG_CHECK_MODULES([REST], [rest-0.7 >= 0.7.92])],
>          [])
>         AC_CHECK_FUNCS([ovirt_api_search_vms ovirt_vm_get_host ovirt_host_get_cluster ovirt_cluster_get_data_center],
>                        [AC_DEFINE([HAVE_OVIRT_DATA_CENTER], 1, [Have support for data center])],
> diff --git a/src/Makefile.am b/src/Makefile.am
> index 0a3cbbf..501c688 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -113,6 +113,7 @@ COMMON_LIBS = \
>  	$(SPICE_GTK_LIBS)			\
>  	$(LIBXML2_LIBS)				\
>  	$(OVIRT_LIBS) \
> +	$(REST_LIBS) \
>  	$(NULL)
>  
>  COMMON_CFLAGS = \
> @@ -124,6 +125,7 @@ COMMON_CFLAGS = \
>  	$(SPICE_GTK_CFLAGS) \
>  	$(LIBXML2_CFLAGS) \
>  	$(OVIRT_CFLAGS) \
> +	$(REST_CFLAGS) \
>  	$(WARN_CFLAGS) \
>  	$(NULL)
>  
> -- 
> 2.14.4
> 
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/virt-tools-list

Attachment: signature.asc
Description: PGP signature

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list

[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux