Bug 1771308

Summary: Unable to build the gluster packages for centos-6
Product: [Community] GlusterFS Reporter: hari gowtham <hgowtham>
Component: buildAssignee: hari gowtham <hgowtham>
Status: CLOSED WORKSFORME QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: 7CC: bugs, jahernan, kkeithle, pasik
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-12-11 06:17:57 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 hari gowtham 2019-11-12 07:15:44 UTC
Description of problem:
We are unable to build Gluster packages for centos6.

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

How reproducible:
1/1

Steps to Reproduce:
1.trigger the build.

Actual results:
fuse-bridge.c: In function 'fuse_setlk_resume':
fuse-bridge.c:4776: warning: value computed is not used
fuse-bridge.c:4776: warning: value computed is not used
fuse-bridge.c:4776: warning: value computed is not used
fuse-bridge.c:4776: warning: value computed is not used
  CCLD   fuse.la
.libs/fuse-bridge.o: In function `___cds_wfcq_append':
/builddir/build/BUILD/glusterfs-7.0/xlators/mount/fuse/src/../../../../contrib/userspace-rcu/static-wfcqueue.h:193: undefined reference to `__rcu_cas_avail'
/builddir/build/BUILD/glusterfs-7.0/xlators/mount/fuse/src/../../../../contrib/userspace-rcu/static-wfcqueue.h:193: undefined reference to `_compat_uatomic_xchg'
/builddir/build/BUILD/glusterfs-7.0/xlators/mount/fuse/src/../../../../contrib/userspace-rcu/static-wfcqueue.h:193: undefined reference to `__rcu_cas_init'
/builddir/build/BUILD/glusterfs-7.0/xlators/mount/fuse/src/../../../../contrib/userspace-rcu/static-wfcqueue.h:193: undefined reference to `_compat_uatomic_xchg'
collect2: ld returned 1 exit status
make[5]: *** [fuse.la] Error 1
make[4]: *** [all-recursive] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.urHFeF (%build)
    Bad exit status from /var/tmp/rpm-tmp.urHFeF (%build)
RPM build errors:
Child return code was: 1
EXCEPTION: [Error()]
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 88, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.7/site-packages/mockbuild/util.py", line 547, in do
    raise exception.Error("Command failed. See logs for output.\n # %s" % (command,), child.returncode)
Error: Command failed. See logs for output.
 # bash --login -c /usr/bin/rpmbuild -bb --target i686 --nodeps /builddir/build/SPECS/glusterfs.spec

Expected results:
Build should be successful.

Additional info:
error logs can be found at:
https://cbs.centos.org/kojifiles/work/tasks/4759/994759/build.log

Comment 1 Kaleb KEITHLEY 2019-11-25 11:30:33 UTC
I guess what is meant is that it doesn't build on i686 with userspace-rcu 0.7.x.

The work-around with the .../contrib header files works fine on rhel6 on x86_64.

And if userspace-rcu 0.10.x is used it also works fine on rhel6 on both x86_64 and i686.

The glusterfs-7 packages in the CentOS Storage SIG have recently been built using userspace-rcu 0.10. Test packages are in https://buildlogs.centos.org/centos/6/storage/x86_64/gluster-7/

Comment 2 Kaleb KEITHLEY 2019-12-03 12:17:25 UTC
I did not look very hard at why the compat/userspace-rcu bits don't work for i686.

Adding a needinfo on Xavi; he added the compat bits, maybe he can quickly see what it would take to make it work for i686.

Although it's probably moot since I have already built packages for C6 in CentOS Storage SIG using a later version of userspace-rcu.

Comment 3 Xavi Hernandez 2019-12-04 13:02:58 UTC
I've tried to compile gluster 7.0 on a CentOS 6 with userspace-rcu-0.7.7-1 (provided by EPEL) and it works. I've had other issues but they don't seem related to the fuse-bridge.c error.

Can you provide more detail about the environment used to compile ?

Comment 4 Kaleb KEITHLEY 2019-12-04 14:18:57 UTC
CentOS 6 in CBS for the CentOS Storage SIG, where indeed, it does build with userspace-rcu-0.7.16-3 (from CentOS Storage SIG) on 64-bit/x86_64.

But it does not build (scratch build) there on 32-bit/i686. Did you try on an i686 box?

Comment 5 Xavi Hernandez 2019-12-04 14:51:18 UTC
(In reply to Kaleb KEITHLEY from comment #4)
> CentOS 6 in CBS for the CentOS Storage SIG, where indeed, it does build with
> userspace-rcu-0.7.16-3 (from CentOS Storage SIG) on 64-bit/x86_64.
> 
> But it does not build (scratch build) there on 32-bit/i686. Did you try on
> an i686 box?

No. I ran it on 64 bits box, but using -m32 option. Is this not enough ?

I'll try with a 32 bit OS.

Comment 6 Xavi Hernandez 2019-12-04 18:59:46 UTC
I've installed CentOS 6.10 32-bits on a virtual machine and I've been able to successfully build RPM packages for GlusterFS 7.0.

# uname -a
Linux localhost.localdomain 2.6.32-754.el6.i686 #1 SMP Tue Jun 19 21:51:20 UTC 2018 i686 i686 i386 GNU/Linux

# rpm -qa | grep userspace-rcu
userspace-rcu-0.7.7-1.el6.i686
userspace-rcu-devel-0.7.7-1.el6.i686

Comment 7 Kaleb KEITHLEY 2019-12-05 21:08:56 UTC
ndevos' CBS build logs from October: https://cbs.centos.org/koji/taskinfo?taskID=994759

I untagged userspace_rcu-0.10 from the storage6-gluster-7-el6 buildroot, reverting to userspace-rcu-devel-0.7.16-2, and ran a scratch build and got the same failure. Logs at https://cbs.centos.org/koji/taskinfo?taskID=1059435

OTOH I can do `mock --chain -r epel-6-i386 userspace-rcu-devel-0.7.16-2.src.rpm glusterfs-7.0-2.src.rpm` and it does build successfully. I don't have time to dig into why one works and the other doesn't. (Perhaps something else that's in EPEL that's not in CentOS that userspace-rcu depends on?)

But overall it's moot IMO, as I have built glusterfs-7 for el6 in the Storage SIG using userspace-rcu-0.10. (shhh, I'm not sure ndevos has noticed ;-))

AFAIC this BZ can be closed. I'll leave it to hgowtham to decide what he wants to do.

Comment 8 hari gowtham 2019-12-11 06:17:57 UTC
Thanks Kaleb. I'm happy with this approach. I'm planing to send a mail out to the users about us stopping the support for centos6 as we have centos8 available.
So spending time on this is not necessary.

On that note, I'm closing this bug.