Bug 1782100

Summary: Make error: "rpcsvc.c:1197:5: error: implicit declaration of function 'xdr_sizeof' [-Werror=implicit-function-declaration]"
Product: [Community] GlusterFS Reporter: lxyscls <lxyscls>
Component: rpcAssignee: bugs <bugs>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs, kkeithle, pasik
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-12 12:18:54 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 lxyscls 2019-12-11 07:28:34 UTC
Description of problem:
Must turn the option IPV6 during configure. If not, make error as in title.


Version-Release number of selected component (if applicable):
mainline.


How reproducible:
every time


Steps to Reproduce:
1../autogen.sh
2../configure
3.make

Actual results:
rpcsvc.c:1197:5: error: implicit declaration of function 'xdr_sizeof' [-Werror=implicit-function-declaration]
     xdr_size = xdr_sizeof((xdrproc_t)xdr_callmsg, &request);

Expected results:
no error

Additional info:
xdr-common.h

#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

I think because such definition only defined in the "IPV6_DEFAULT".

Comment 1 Kaleb KEITHLEY 2019-12-23 13:56:42 UTC
(It helps to know which Linux distribution you're building on.)

this is usually an indication that you haven't installed libtirpc and libtirpc-devel (Fedora, CentOS, RHEL)  or libtirpc3 and libtirpc-dev (Debian, Ubuntu) on a newer linux distribution where rpc has been removed from libc.

Make sure you have those installed and that the output from configure includes

...
Use TIRPC            : yes
...

I was able to successfully build on both Fedora 31 and Debian buster, both with `--with-ipv6-default` and without.

Note: Older distributions that have rpc in libc should not use libtirpc as it is usually too old.

Comment 2 lxyscls 2019-12-30 09:31:59 UTC
(In reply to Kaleb KEITHLEY from comment #1)
> (It helps to know which Linux distribution you're building on.)
> 
> this is usually an indication that you haven't installed libtirpc and
> libtirpc-devel (Fedora, CentOS, RHEL)  or libtirpc3 and libtirpc-dev
> (Debian, Ubuntu) on a newer linux distribution where rpc has been removed
> from libc.
> 
> Make sure you have those installed and that the output from configure
> includes
> 
> ...
> Use TIRPC            : yes
> ...
> 
> I was able to successfully build on both Fedora 31 and Debian buster, both
> with `--with-ipv6-default` and without.
> 
> Note: Older distributions that have rpc in libc should not use libtirpc as
> it is usually too old.

My CentOS' version is "CentOS Linux release 7.6.1810 (Core)". And I am sure that it has been installed libtirpc and libtirpc-devel both.

And the configure summary is as below.

GlusterFS configure summary
===========================
FUSE client          : yes
Infiniband verbs     : yes
epoll IO multiplex   : yes
fusermount           : yes
readline             : yes
georeplication       : yes
Linux-AIO            : yes
Enable Debug         : no
Enable ASAN          : no
Enable TSAN          : no
Use syslog           : yes
XML output           : yes
Unit Tests           : no
Track priv ports     : yes
POSIX ACLs           : yes
SELinux features     : yes
firewalld-config     : no
Events               : yes
EC dynamic support   : x64 sse avx
Use memory pools     : yes
Nanosecond m/atimes  : yes
Server components    : yes
Legacy gNFS server   : no
IPV6 default         : no
Use TIRPC            : yes
With Python          : 2.7
Cloudsync            : yes

And from the code, I just find that it has relationship with the IPV6 MACRO.

Comment 3 Worker Ant 2020-03-12 12:18:54 UTC
This bug is moved to https://github.com/gluster/glusterfs/issues/868, and will be tracked there from now on. Visit GitHub issues URL for further details