Bug 1782100 - Make error: "rpcsvc.c:1197:5: error: implicit declaration of function 'xdr_sizeof' [-Werror=implicit-function-declaration]"
Summary: Make error: "rpcsvc.c:1197:5: error: implicit declaration of function 'xdr_si...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: GlusterFS
Classification: Community
Component: rpc
Version: mainline
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-11 07:28 UTC by lxyscls
Modified: 2020-03-12 12:18 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-12 12:18:54 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

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


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