Bug 191889 - reiserfs-tools Package won't build in mock
reiserfs-tools Package won't build in mock
Product: Fedora
Classification: Fedora
Component: reiserfs-utils (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Garzik
Depends On:
Blocks: BuildReqBlocker
  Show dependency treegraph
Reported: 2006-05-16 07:03 EDT by Andreas Thienemann
Modified: 2013-07-02 22:28 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-06-05 19:58:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Andreas Thienemann 2006-05-16 07:03:44 EDT
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 17:28:07 EDT
asm/aligned.h isn't in the latest glibc-kernheaders.
Comment 2 David Woodhouse 2006-06-05 17:43:22 EDT
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 17:50:14 EDT
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 18:45:40 EDT
it's needed for ia64, because it's "speshul"
Comment 5 David Woodhouse 2006-06-05 19:04:13 EDT
Not from kernel-private headers. Just dereference a packed structure containing
an int of the appropriate size.
Comment 6 Dave Jones 2006-06-05 19:10:08 EDT
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 19:16:04 EDT
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 19:21:06 EDT
sounds good. I'll see if I can munge reiserfsprogs to use something similar.
Comment 9 Dave Jones 2006-06-05 19:58:18 EDT
Fixed, and compiled.

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