Bug 191889

Summary: reiserfs-tools Package won't build in mock
Product: [Fedora] Fedora Reporter: Andreas Thienemann <andreas>
Component: reiserfs-utilsAssignee: Jeff Garzik <jgarzik>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: davej, dwmw2, peterm
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-06-05 23:58:18 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: 191529    

Description Andreas Thienemann 2006-05-16 11:03:44 UTC
The package won't build in mock:

In file included from ../include/reiserfs_lib.h:14,
                 from includes.h:12,
                 from do_balan.c:20:
../include/reiserfs_fs.h:41:27: error: asm/unaligned.h: No such file or directory
In file included from ../include/reiserfs_lib.h:14,
                 from includes.h:12,
                 from fix_node.c:40:
../include/reiserfs_fs.h:41:27: error: asm/unaligned.h: No such file or directory
make[1]: *** [do_balan.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [fix_node.o] Error 1
make[1]: Leaving directory `/builddir/build/BUILD/reiserfsprogs-3.6.19/reiserfscore'
make: *** [all-recursive] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.96233 (%build)

Comment 1 Dave Jones 2006-06-05 21:28:07 UTC
asm/aligned.h isn't in the latest glibc-kernheaders.


Comment 2 David Woodhouse 2006-06-05 21:43:22 UTC
Intentionally so. There's nothing in there which describes kernel<->user ABI,
and the kernel headers are not a random library of arbitrary crap for userspace
to use.

That said, reiserfs_fs.h is a steaming pile of crap which could do with some
more cleanup -- or preferably just being removed from public view if the
reiserfs tools have their own version. I'll investigate that.

Comment 3 David Woodhouse 2006-06-05 21:50:14 UTC
Ew, reiserfs-utils doesn't even build on PPC, with a comment that it's been
endian-broken since some time in 2002. 

It also has its own copy of reiserfs_fs.h, and if I remove the broken inclusion
of <asm/unaligned.h> from that, then it does seem to build.

Not a glibc-kernheaders problem.

Comment 4 Dave Jones 2006-06-05 22:45:40 UTC
it's needed for ia64, because it's "speshul"

Comment 5 David Woodhouse 2006-06-05 23:04:13 UTC
Not from kernel-private headers. Just dereference a packed structure containing
an int of the appropriate size.


Comment 6 Dave Jones 2006-06-05 23:10:08 UTC
if you want to rewrite reiserfsprogs, be my guest, but it's probably a smaller
change to include a package-private copy of unaligned.h

It's not like reiserfs is even supported by us anyway, so putting a huge amount
of effort into fixing it isn't a worthwhile use of time IMO.  After getting it
building again, it's a really good candidate for kicking out to fedora-extras.


Comment 7 David Woodhouse 2006-06-05 23:16:04 UTC
The bluez-libs package has a something suitable for use in a package-private
reimplementation of unaligned.h, and it doesn't need anything arch-specific...

#define bt_get_unaligned(ptr)                  \
({                                             \
       struct __attribute__((packed)) {        \
               typeof(*(ptr)) __v;             \
       }  *__p = (void *)(ptr);                \
       __p->__v;                               \
})

#define bt_put_unaligned(val, ptr)             \
do {                                           \
       struct __attribute__((packed)) {        \
               typeof(*(ptr)) __v;             \
       }  *__p = (void *)(ptr);                \
       __p->__v = (val);                       \
} while(0)

On machines like i386 this behaves just like a straight dereference; on machines
which can't handle misaligned loads, GCC emits the correct code.

Comment 8 Dave Jones 2006-06-05 23:21:06 UTC
sounds good. I'll see if I can munge reiserfsprogs to use something similar.


Comment 9 Dave Jones 2006-06-05 23:58:18 UTC
Fixed, and compiled.