Bug 1780260 - v7 fails to build on Debian 9 [patch?]
Summary: v7 fails to build on Debian 9 [patch?]
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: rpc
Version: mainline
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Raghavendra G
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-05 15:32 UTC by Andrew Miloradovsky
Modified: 2019-12-13 05:51 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-12-13 05:51:52 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Gluster.org Gerrit 23819 0 None Merged rpc: define xdr_sizeof regardless of whether IPv6 is the default 2019-12-13 05:51:50 UTC

Description Andrew Miloradovsky 2019-12-05 15:32:47 UTC
Description of the problem:

‘xdr_sizeof’ is implicitly declared and warnings are treated as errors.

Version-Release number of selected component:

3199f8759ebfcc31ce158201c3c25d9a738479f8

How reproducible:

Building on Debian 9.

Steps to Reproduce:

1. ./autogen.sh
2. ./configure
3. make all -jN

Actual results:

  CC       autoscale-threads.lo
In file included from rpc-clnt.h:18:0,
                 from mgmt-pmap.c:13:
../../../rpc/xdr/src/glusterfs3.h: In function ‘dict_to_xdr’:
../../../rpc/xdr/src/glusterfs3.h:800:12: error: implicit declaration of functio
n ‘xdr_sizeof’ [-Werror=implicit-function-declaration]
     size = xdr_sizeof((xdrproc_t)xdr_gfx_dict, dict);
            ^~~~~~~~~~
In file included from rpc-clnt.h:18:0,
                 from rpc-clnt.c:13:
../../../rpc/xdr/src/glusterfs3.h: In function ‘dict_to_xdr’:
../../../rpc/xdr/src/glusterfs3.h:800:12: error: implicit declaration of functio
n ‘xdr_sizeof’ [-Werror=implicit-function-declaration]
     size = xdr_sizeof((xdrproc_t)xdr_gfx_dict, dict);
            ^~~~~~~~~~
rpc-clnt.c: In function ‘rpc_clnt_new’:
rpc-clnt.c:1103:5: warning: dereferencing type-punned pointer will break strict-
aliasing rules [-Wstrict-aliasing]  
     GF_ATOMIC_INIT(rpc->xid, 1);   
     ^~~~~~~~~~~~~~
rpc-clnt.c:1103:5: warning: dereferencing type-punned pointer will break strict-
aliasing rules [-Wstrict-aliasing]  
rpc-transport.c: In function ‘rpc_transport_load’:
rpc-transport.c:371:5: warning: dereferencing type-punned pointer will break str
ict-aliasing rules [-Wstrict-aliasing]
     GF_ATOMIC_INIT(trans->disconnect_progress, 0);
     ^~~~~~~~~~~~~~
rpc-transport.c:371:5: warning: dereferencing type-punned pointer will break str
ict-aliasing rules [-Wstrict-aliasing]
rpcsvc.c: In function ‘rpcsvc_callback_build_record’:
rpcsvc.c:1197:16: error: implicit declaration of function ‘xdr_sizeof’ [-Werror=
implicit-function-declaration]
     xdr_size = xdr_sizeof((xdrproc_t)xdr_callmsg, &request);
                ^~~~~~~~~~
In file included from rpc-clnt.h:18:0,
                 from rpc-clnt-ping.c:11:
../../../rpc/xdr/src/glusterfs3.h: In function ‘dict_to_xdr’:
../../../rpc/xdr/src/glusterfs3.h:800:12: error: implicit declaration of functio
n ‘xdr_sizeof’ [-Werror=implicit-function-declaration]
     size = xdr_sizeof((xdrproc_t)xdr_gfx_dict, dict);
            ^~~~~~~~~~
cc1: some warnings being treated as errors

Expected results:

  CC       autoscale-threads.lo
  CC       mgmt-pmap.lo

Additional info:

~./configure --with-ipv6-default~ solves the problem,
but there is another solution:

diff --git a/rpc/rpc-lib/src/xdr-common.h b/rpc/rpc-lib/src/xdr-common.h
index 7b0bc36ec..752736b3d 100644
--- a/rpc/rpc-lib/src/xdr-common.h
+++ b/rpc/rpc-lib/src/xdr-common.h
@@ -66,11 +66,9 @@ enum gf_dump_procnum {
 #ifdef GF_LINUX_HOST_OS
 #define xdr_u_int32_t xdr_uint32_t
 #define xdr_u_int64_t xdr_uint64_t
-#ifdef IPV6_DEFAULT
 unsigned long
 xdr_sizeof(xdrproc_t func, void *data);
 #endif
-#endif
 
 #ifdef GF_DARWIN_HOST_OS
 #define xdr_u_quad_t xdr_u_int64_t

Comment 1 Worker Ant 2019-12-05 15:38:50 UTC
REVIEW: https://review.gluster.org/23819 (rpc: define xdr_sizeof regardless of whether IPv6 is the default) posted (#1) for review on master by None

Comment 2 Xavi Hernandez 2019-12-09 15:07:09 UTC
@Raghavendra, can you check if this is the right thing to do to fix the compilation issue. This seems a duplicate of bug #1539142, where the solution there is to use '--with-libtirpc=no'. Which one if the correct approach ?

Comment 3 Worker Ant 2019-12-13 05:51:52 UTC
REVIEW: https://review.gluster.org/23819 (rpc: define xdr_sizeof regardless of whether IPv6 is the default) merged (#2) on master by MOHIT AGRAWAL


Note You need to log in before you can comment on or make changes to this bug.