Bug 1774128 - building gf_attach can't find contrib/sunrpc/xdr_sizeof.c
Summary: building gf_attach can't find contrib/sunrpc/xdr_sizeof.c
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: GlusterFS
Classification: Community
Component: build
Version: mainline
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Yaniv Kaul
QA Contact: Rahul Hinduja
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-19 16:28 UTC by Andrew Miloradovsky
Modified: 2019-11-26 13:10 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-26 13:10:20 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

Description Andrew Miloradovsky 2019-11-19 16:28:52 UTC
`Description of problem:

Build fails because the linker cannot find the object
file corresponding to ~contrib/sunrpc/xdr_sizeof.c~.
Perhaps needs only a minor fix to the Autotools scripts,
but I'm not sure which one.

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

b9181e9212b6916ba1c8a269c1474e7aef144f6a (2019-11-04)

How reproducible:

An attempt to build it on a reasonably fresh Guix System.

Steps to Reproduce:

1. guix environment --ad-hoc autoconf automake gcc-toolchain libtool \
pkg-config fuse rpcsvc-proto flex bison openssl util-linux acl zlib \
python2 libxml2 liburcu readline libaio
2. ./autogen.sh
3. PYTHON=`which python` ./configure

Actual results:

  CCLD     gf_attach
ld: glusterfsd-mgmt.o: in function `glusterfs_serialize_reply':
/home/andrew/devel/glusterfs/glusterfsd/src/glusterfsd-mgmt.c:193: undefined reference to `xdr_sizeof'
ld: glusterfsd-mgmt.o: in function `mgmt_submit_request':
/home/andrew/devel/glusterfs/glusterfsd/src/glusterfsd-mgmt.c:2067: undefined reference to `xdr_sizeof'
ld: /home/andrew/devel/glusterfs/rpc/xdr/src/.libs/libgfxdr.so: undefined reference to `xdr_bytes'
ld: ../../rpc/rpc-lib/src/.libs/libgfrpc.so: undefined reference to `pmap_set'
ld: /home/andrew/devel/glusterfs/rpc/xdr/src/.libs/libgfxdr.so: undefined reference to `xdr_array'
ld: /home/andrew/devel/glusterfs/rpc/xdr/src/.libs/libgfxdr.so: undefined reference to `xdr_int'
ld: /home/andrew/devel/glusterfs/rpc/xdr/src/.libs/libgfxdr.so: undefined reference to `xdr_int64_t'
ld: /home/andrew/devel/glusterfs/rpc/xdr/src/.libs/libgfxdr.so: undefined reference to `xdr_vector'
ld: ../../rpc/rpc-lib/src/.libs/libgfrpc.so: undefined reference to `xdr_replymsg'
ld: /home/andrew/devel/glusterfs/rpc/xdr/src/.libs/libgfxdr.so: undefined reference to `xdr_u_quad_t'
ld: /home/andrew/devel/glusterfs/rpc/xdr/src/.libs/libgfxdr.so: undefined reference to `xdr_pointer'
ld: /home/andrew/devel/glusterfs/rpc/xdr/src/.libs/libgfxdr.so: undefined reference to `xdr_string'
ld: ../../rpc/rpc-lib/src/.libs/libgfrpc.so: undefined reference to `_null_auth'
ld: ../../rpc/rpc-lib/src/.libs/libgfrpc.so: undefined reference to `xdr_void'
ld: /home/andrew/devel/glusterfs/rpc/xdr/src/.libs/libgfxdr.so: undefined reference to `xdr_double'
ld: ../../rpc/rpc-lib/src/.libs/libgfrpc.so: undefined reference to `pmap_unset'
ld: ../../rpc/rpc-lib/src/.libs/libgfrpc.so: undefined reference to `xdr_authunix_parms'
ld: ../../rpc/rpc-lib/src/.libs/libgfrpc.so: undefined reference to `xdrmem_create'
ld: /home/andrew/devel/glusterfs/rpc/xdr/src/.libs/libgfxdr.so: undefined reference to `xdr_quad_t'
ld: /home/andrew/devel/glusterfs/rpc/xdr/src/.libs/libgfxdr.so: undefined reference to `xdr_enum'
ld: /home/andrew/devel/glusterfs/rpc/xdr/src/.libs/libgfxdr.so: undefined reference to `xdr_opaque'
ld: /home/andrew/devel/glusterfs/rpc/xdr/src/.libs/libgfxdr.so: undefined reference to `xdr_u_char'
ld: /home/andrew/devel/glusterfs/rpc/xdr/src/.libs/libgfxdr.so: undefined reference to `xdr_u_int'
ld: ../../rpc/rpc-lib/src/.libs/libgfrpc.so: undefined reference to `xdr_callmsg'
ld: /home/andrew/devel/glusterfs/rpc/xdr/src/.libs/libgfxdr.so: undefined reference to `xdr_char'
collect2: error: ld returned 1 exit status

and

ld: gf_attach.o: in function `send_brick_req':
/home/andrew/devel/glusterfs/glusterfsd/src/gf_attach.c:69: undefined reference to `xdr_sizeof'
ld: /home/andrew/devel/glusterfs/rpc/xdr/src/.libs/libgfxdr.so: undefined reference to `xdr_bytes'
ld: /home/andrew/devel/glusterfs/rpc/rpc-lib/src/.libs/libgfrpc.so: undefined reference to `pmap_set'
ld: /home/andrew/devel/glusterfs/rpc/xdr/src/.libs/libgfxdr.so: undefined reference to `xdr_array'
ld: /home/andrew/devel/glusterfs/rpc/xdr/src/.libs/libgfxdr.so: undefined reference to `xdr_int'
ld: /home/andrew/devel/glusterfs/rpc/xdr/src/.libs/libgfxdr.so: undefined reference to `xdr_int64_t'
ld: /home/andrew/devel/glusterfs/rpc/xdr/src/.libs/libgfxdr.so: undefined reference to `xdr_vector'
ld: /home/andrew/devel/glusterfs/rpc/rpc-lib/src/.libs/libgfrpc.so: undefined reference to `xdr_replymsg'
ld: /home/andrew/devel/glusterfs/rpc/xdr/src/.libs/libgfxdr.so: undefined reference to `xdr_u_quad_t'
ld: /home/andrew/devel/glusterfs/rpc/xdr/src/.libs/libgfxdr.so: undefined reference to `xdr_pointer'
ld: /home/andrew/devel/glusterfs/rpc/xdr/src/.libs/libgfxdr.so: undefined reference to `xdr_string'
ld: /home/andrew/devel/glusterfs/rpc/rpc-lib/src/.libs/libgfrpc.so: undefined reference to `_null_auth'
ld: /home/andrew/devel/glusterfs/rpc/rpc-lib/src/.libs/libgfrpc.so: undefined reference to `xdr_void'
ld: /home/andrew/devel/glusterfs/rpc/xdr/src/.libs/libgfxdr.so: undefined reference to `xdr_double'
ld: /home/andrew/devel/glusterfs/rpc/rpc-lib/src/.libs/libgfrpc.so: undefined reference to `pmap_unset'
ld: /home/andrew/devel/glusterfs/rpc/rpc-lib/src/.libs/libgfrpc.so: undefined reference to `xdr_authunix_parms'
ld: /home/andrew/devel/glusterfs/rpc/rpc-lib/src/.libs/libgfrpc.so: undefined reference to `xdrmem_create'
ld: /home/andrew/devel/glusterfs/rpc/xdr/src/.libs/libgfxdr.so: undefined reference to `xdr_quad_t'
ld: /home/andrew/devel/glusterfs/rpc/xdr/src/.libs/libgfxdr.so: undefined reference to `xdr_enum'
ld: /home/andrew/devel/glusterfs/rpc/xdr/src/.libs/libgfxdr.so: undefined reference to `xdr_opaque'
ld: /home/andrew/devel/glusterfs/rpc/xdr/src/.libs/libgfxdr.so: undefined reference to `xdr_u_char'
ld: /home/andrew/devel/glusterfs/rpc/xdr/src/.libs/libgfxdr.so: undefined reference to `xdr_u_int'
ld: /home/andrew/devel/glusterfs/rpc/rpc-lib/src/.libs/libgfrpc.so: undefined reference to `xdr_callmsg'
ld: /home/andrew/devel/glusterfs/rpc/xdr/src/.libs/libgfxdr.so: undefined reference to `xdr_char'
collect2: error: ld returned 1 exit status

Expected results:

Successful build completion.

Additional info:

~sunrpc~ is compiled and should be seen by Libtool (but):

$ ls -A contrib/sunrpc/
.deps/  .dirstamp  .libs/  xdr_sizeof.c  xdr_sizeof.lo

$ autoconf --version
autoconf (GNU Autoconf) 2.69

$ automake --version
automake (GNU automake) 1.16.1

Comment 2 Yaniv Kaul 2019-11-20 14:02:37 UTC
Can you try with -with-libtirpc=no ?

Comment 3 Andrew Miloradovsky 2019-11-20 17:08:43 UTC
Tried:

make clean
PYTHON=`which python` ./configure --with-libtirpc=no
make all -j4

No difference.

P.S.

GlusterFS configure summary
===========================
FUSE client          : 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

Comment 4 Yaniv Kaul 2019-11-21 14:21:51 UTC
Are yo

Comment 5 Andrew Miloradovsky 2019-11-26 13:05:55 UTC
Sorry, I forgot to install ~libtirpc~ into the environment...

It should be:

guix environment --ad-hoc autoconf automake gcc-toolchain libtool \
pkg-config fuse libtirpc rpcsvc-proto flex bison openssl util-linux \
zlib acl python2 libxml2 liburcu readline libaio

There was a warning I missed:

configure: WARNING:
            ---------------------------------------------------------------------------------
            libtirpc (and/or ipv6-default) were enabled but libtirpc-devel is not installed.
            Disabling libtirpc and ipv6-default and falling back to legacy glibc rpc headers.
            This is a transitional warning message. Eventually it will be an error message.
            ---------------------------------------------------------------------------------

Now it builds fine.

Comment 6 Yaniv Kaul 2019-11-26 13:10:20 UTC
Great to see it resolved.


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