Bug 993411

Summary: Compilation fails on lxc/lxc_monitor_protocol.c 31: undefined reference to xdr_uinit64_t
Product: [Community] Virtualization Tools Reporter: gpalmer
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: eblake, gpalmer, jtomko, mprivozn, rbalakri
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-16 18:22:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description gpalmer 2013-08-05 21:04:43 UTC
Description of problem: Fail to compile


Version-Release number of selected component (if applicable):
Version 1.0.3 through 1.1.1


How reproducible:


Steps to Reproduce:
1./configure  --prefix=/usr --localstatedir=/var --sysconfdir=/etc
2.make

Actual results:
libvirt_lxc-lxc_monitor_protocol.o: In function `xdr_virLXCMonitorInitEventMsg':
/usr/local/src/libvirt/libvirt-1.1.1/src/./lxc/lxc_monitor_protocol.c:31: undefined reference to `xdr_uint64_t'


Expected results:
Successful Compilation

Additional info: patch resolving compilation issue
--- lxc_monitor_protocol.h      2013-08-05 20:22:23.963000000 +0000
+++ libvirt-1.1.1/src/lxc/lxc_monitor_protocol.h        2013-08-05 20:22:46.226000000 +0000
@@ -5,6 +5,8 @@

 #ifndef _LXC_MONITOR_PROTOCOL_H_RPCGEN
 #define _LXC_MONITOR_PROTOCOL_H_RPCGEN
+# define xdr_uint64_t xdr_u_int64_t
+

 #include <rpc/rpc.h>

Comment 1 Eric Blake 2013-08-05 21:14:44 UTC
Can you please post this patch upstream at libvir-list for discussion?

Comment 2 Michal Privoznik 2014-09-23 08:51:32 UTC
Patch proposed upstream:

https://www.redhat.com/archives/libvir-list/2014-September/msg01360.html

Comment 3 Ján Tomko 2015-03-16 18:22:12 UTC
Pushed as:
commit c99f66ac4c831b2ff9116c2e2ca003cd3550bff8
Author:     Michal Privoznik <mprivozn>
AuthorDate: 2014-09-23 10:44:42 +0200
Commit:     Michal Privoznik <mprivozn>
CommitDate: 2014-09-26 10:15:03 +0200

    lxc_monitor_protocol: Redefine xdr_uint64_t if needed
    
    https://bugzilla.redhat.com/show_bug.cgi?id=993411
    
    On some systems (using libtirpc instead of glibc's
    implementation), xdr_uint64_t exists rather under different name:
    xdr_u_int64_t. This makes compilation fail then:
    
    libvirt_lxc-lxc_monitor_protocol.o: In function `xdr_virLXCMonitorInitEventMsg':
    /usr/local/src/libvirt/libvirt-1.1.1/src/./lxc/lxc_monitor_protocol.c:31: undefined reference to `xdr_uint64_t'
    
    Therefore we rather mirror the d707c866 commit and redefine
    xdr_uint64_t if needed.
    
    Signed-off-by: Michal Privoznik <mprivozn>

git describe: v1.2.9-rc1-13-gc99f66a contains: v1.2.9-rc2~8