Bug 199315

Summary: xfsprogs doesn't build on ppc64
Product: [Fedora] Fedora Reporter: Jeremy Katz <katzj>
Component: xfsprogsAssignee: Russell Cattelan <cattelan>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: dcantrell, dwmw2, redhat-bugzilla
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: fc6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-09-27 19:57:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 150224    
Attachments:
Description Flags
xfsprogs-2.8.10-ppc64-types.patch
none
xfsprogs-2.8.10-types.patch none

Description Jeremy Katz 2006-07-18 20:33:55 UTC
With the glibc-kernheaders changes, xfsprogs stops building on ppc64.  Adding an
ExcludeArch temporarily:


gmake[1]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mminimal-toc  -g -O2 -DNDEBUG -funsigned-char
-fno-strict-aliasing -Wall -DVERSION=\"2.8.4\" -DLOCALEDIR=\"/usr/share/locale\"
-DPACKAGE=\"xfsprogs\" -I./include -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64   -g -O2
-DNDEBUG -funsigned-char -fno-strict-aliasing -Wall -DVERSION=\"2.8.4\"
-DLOCALEDIR=\"/usr/share/locale\" -DPACKAGE=\"xfsprogs\" -I../include
-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64    -c -o xfs_copy.o xfs_copy.c
In file included from /usr/include/asm/elf.h:5,
                 from /usr/include/asm/sigcontext.h:12,
                 from /usr/include/bits/sigcontext.h:28,
                 from /usr/include/signal.h:333,
                 from /usr/include/sys/wait.h:31,
                 from xfs_copy.c:21:
/usr/include/asm/types.h:40: error: conflicting types for '__s64'
../include/xfs/platform_defs.h:42: error: previous declaration of '__s64' was here
/usr/include/asm/types.h:41: error: conflicting types for '__u64'
../include/xfs/platform_defs.h:41: error: previous declaration of '__u64' was here
gmake[1]: *** [xfs_copy.o] Error 1

Comment 1 David Woodhouse 2006-07-18 20:43:54 UTC
xfs should be using standard types (uint64_t) instead of defining its own copy
of the kernel-private types.

Comment 2 Robert Scheck 2006-07-18 21:10:58 UTC
Thanks Jeremy and David for looking into it. Guess one of you will fix and
push it to the build system - can you add %{?dist} to the release tag of the
xfsprogs then, too? Thank you (even if it's a bit off-topic here).

Comment 3 Jesse Keating 2006-08-18 02:04:57 UTC
Jeff, ping on this?  Would like to get this fixed for FC6 (and RHEL5)

Comment 4 Robert Scheck 2006-09-09 23:39:18 UTC
The package glibc-kernheaders doesn't exist any longer. Does this problem also 
exist using the new kernel-headers package? I don't have access to a ppc64 
system. BTW, bug #205906 is pointing to xfsprogs 2.8.11 which also could solve 
the problem.

Comment 5 David Woodhouse 2006-09-10 06:15:56 UTC
You don't need a ppc64 system to know whether xfsprogs is still abusing the
kernel types when it should be using proper types like uint64_t.

Comment 6 Robert Scheck 2006-09-10 11:14:50 UTC
Can't we patch this (e.g. s/__u64/uint64_t/) and send the patch upstream?

Comment 7 David Woodhouse 2006-09-10 13:07:25 UTC
That would be appropriate behaviour, yes.

Comment 8 Eric Sandeen 2006-09-18 20:48:02 UTC
I tested the latest xfsprogs-2.8.11 on a mostly-RHEL5-beta system with:

kernel-headers-2.6.17-1.2519.4.21.el5.ppc64
kernel-headers-2.6.17-1.2519.4.21.el5.ppc
glibc-headers-2.4.90-22.ppc

and the problem persists.  I pinged an sgi-guy about it, to see if they can get
this fixed upstream.

Comment 9 Markus Rothe 2006-09-25 17:08:57 UTC
Created attachment 137071 [details]
xfsprogs-2.8.10-ppc64-types.patch

I have opened some while ago an upstream bug here:
http://oss.sgi.com/bugzilla/show_bug.cgi?id=707

I'll attach a patch that works for me. Though I don't programm that often and
don't know if this is the propper fix...

Comment 10 Markus Rothe 2006-09-26 06:42:04 UTC
Created attachment 137107 [details]
xfsprogs-2.8.10-types.patch

Just to let you know, here is the patch from upstream, which is definetly
better.

Comment 11 David Woodhouse 2006-09-26 06:56:57 UTC
It's still abusing kernel-private types and namespace. It should just switch to
uint32_t et al -- proper C99 types.

Comment 12 Robert Scheck 2006-09-26 07:00:55 UTC
Markus, could you please reopen the bug at SGI bugzilla, as it isn't really 
fixed?

Comment 13 Russell Cattelan 2006-09-27 19:57:51 UTC
Just checked the spec file to upgrade xfsprogs to the latest version
2.8.11.
Included the ppc64 build patch.

Passed all brew builds.