Bug 1730433 - Gluster release 6 build errors on ppc64le
Summary: Gluster release 6 build errors on ppc64le
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: GlusterFS
Classification: Community
Component: build
Version: 6
Hardware: ppc64le
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Susant Kumar Palai
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-16 17:35 UTC by Robert Baron
Modified: 2019-08-05 12:55 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-05 12:55:26 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Robert Baron 2019-07-16 17:35:41 UTC
Description of problem:

I only selected a component because of Bugzilla's limitation.  not sure which component glusterfs is.

When building glusterfs on RHEL7 (ppc64le) I had to the following errors:

1) In the glusterfs director, if I use ./configure without any options, I get the following error when I build it:

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

This can be worked around by using the following:

    ./configure --with-ipv6-default

It seems to that if you have the option, then it should work with or without the option.

2) On 2 of the three systems I compiled release-6 of gluster I had the following issue:

      CCLD     cloudsyncs3.la
      .libs/libcloudsyncs3.o: In function `aws_sign_request':
        glusterfs/xlators/features/cloudsync/src/cloudsync-plugins/src/cloudsyncs3/src/libcloudsyncs3.c:317: undefined reference to `HMAC_CTX_new'
        glusterfs/xlators/features/cloudsync/src/cloudsync-plugins/src/cloudsyncs3/src/libcloudsyncs3.c:326: undefined reference to `HMAC_CTX_free'
         collect2: error: ld returned 1 exit status

This seems to be defined in libssl/libcrypt.  Since I built openssl, I check that that pig-config was returning the correct information.

I wound up editing the following Makefile:

      /home/robbaron/glusterfs/xlators/features/cloudsync/src/cloudsync-plugins/src/cloudsyncs3/src/Makefile

and changing:

    CFLAGS = -g -O2 

to:

    CFLAGS = -g -O2 -lssl -lcrypt -I/usr/local/include/openssl/ -L/usr/local/lib/

Which resolved the linker error.


How reproducible:

The first problem happened on all three systems.  The second problem happened on 2 of the three systems, so is probably less reproducible.

Here is the sequence of commands I ran on each of the systems

yum groupinstall -y "Development Tools"
yum install -y python3
yum install -y libtool perl-core zlib-devel -y
yum install -y autoconf automake bison cmockery2-devel dos2unix flex fuse-devel glib2-devel libacl-devel libaio-devel libattr-devel libcurl-devel libibverbs-devel librdmacm-devel libtirpc-devel libtool libxml2-devel lvm2-devel make openssl-devel pkgconfig pyliblzma python-devel python-eventlet python-netifaces python-paste-deploy python-simplejson python-sphinx python-webob pyxattr readline-devel rpm-build sqlite-devel systemtap-sdt-devel tar userspace-rcu-devel
yum install -y libuuid libuuid-devel libacl1 libacl libacl-devel libxml2 libxml2-devel 
yum install -y libibverbs libibverbs-devel readline readline-devel
yum install -y libaio libaio-devel

yum install -y rh-python36.ppc64le

# - OpenSSL
cd /home/robbaron
git clone https://github.com/openssl/openssl.git
cd openssl/
git fetch --all
git checkout OpenSSL_1_1_1-stable
./config 
make
make test
make install
cd ..


# - userspace rcu
cd /home/robbaron
git clone git://git.liburcu.org/userspace-rcu.git
cd userspace-rcu/
git fetch --all
git checkout stable-0.11
./bootstrap
./configure
make
make check
make install
ldconfig

# copy the pc files so that pig-config can find them
cp /usr/local/lib/pkgconfig/* /usr/lib64/pkgconfig

# - GlusterFS
cd /home/robbaron
git clone https://github.com/gluster/glusterfs.git
cd glusterfs
git fetch --all
git checkout release-6
autogen.sh
./autogen.sh 
./configure --with-ipv6-default
make
make check
make install
cd ..

systemctl start glusterd
systectl status glusterd
systemctl status glusterd

Comment 1 Amar Tumballi 2019-07-18 04:48:29 UTC
Hi Robert, thanks for the report.

Consider it is RHEL7, can you check if './configure --without-libtirpc' works for errors in 1? 

About 2, looks like it is a valid error. Susant, can you please send a patch if Robert's suggestion makes sense?

Comment 2 Kaleb KEITHLEY 2019-07-22 13:02:31 UTC
On RHEL7 and CentOS7 you must use --without-libtirpc to configure and build.

Glusterfs-6 is built with python2 on RHEL7 and CentOS7 and uses python2 explicitly at run-time.

You can install python3 for other things, but gluster won't use it.

You can get userspace-rcu RPMs from the CentOS Storage SIG. (You can get glusterfs packages from there as well.)

On a CentOS box you can do `yum -y install centos-release-gluster6` followed by `yum -y install userspace-rcu-devel`

Comment 3 Kaleb KEITHLEY 2019-08-05 12:55:26 UTC
openssl-devel is in RHEL base (rhel-7-server-rpms repo)  No need to build from source.

You can get userspace-rcu(-devel) from EPEL or the CentOS Storage SIG. (yes, even for ppc64le, see http://mirror.centos.org/altarch/7.6.1810/storage/ppc64le/gluster-6/)  But build from source if you wish.

Closing as WORKSFORME. Reopen if necessary.


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