Skip to contentSkip to conversation

bad_unaligned_access_length in compiling reiserfsck for mips

DISCUSSION Kevin Turner 3 participants 4 messages Jan 30, 2005 – Feb 2, 2005

lore
Share & tools
lore
#0 lore raw

My cross-compile dies when it tries to link reiserfsck:
check_tree.o(.text+0x3a80): In function `__put_unaligned':
check_tree.c: undefined reference to `bad_unaligned_access_length'

That error is from asm/unaligned.h, and is supposed to mean that someone tried to put_unaligned something that wasn't 1, 2, 4, or 8 bytes, but the code in check_tree.c looks to me like its using it with __u32, so I'm stumped.

reiserfsprogs version: 3.6.19
linux-libc-headers version: 2.6.8.1

Host: linux-i686
Target: linux-mipsel
Compiler: gcc 3.3.4
compilation flags:
-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2

Signature · 1 line
The moon is waning gibbous, 83.3% illuminated, 18.7 days old.
#1 lore raw

Just did another build with gcc 3.4.3, and it links without complaint.

Quoted 2 lines

check_tree.o(.text+0x3a80): In function `__put_unaligned':
check_tree.c: undefined reference to `bad_unaligned_access_length'

[...]

Quoted 7 lines

reiserfsprogs version: 3.6.19
linux-libc-headers version: 2.6.8.1

Target: linux-mipsel
Compiler: gcc 3.3.4
compilation flags:
-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2

Signature · 1 line
The moon is last quarter, 55.3% illuminated, 21.7 days old.
#2 lore raw
In reply to Kevin Turner
Quoted 9 lines · Kevin Turner

My cross-compile dies when it tries to link reiserfsck:
check_tree.o(.text+0x3a80): In function `__put_unaligned':
check_tree.c: undefined reference to `bad_unaligned_access_length'

That error is from asm/unaligned.h, and is supposed to mean that someone tried to put_unaligned something that wasn't 1, 2, 4, or 8 bytes, but the code in check_tree.c looks to me like its using it with __u32, so I'm stumped.

Quoted 8 lines

reiserfsprogs version: 3.6.19
linux-libc-headers version: 2.6.8.1

Host: linux-i686
Target: linux-mipsel
Compiler: gcc 3.3.4
compilation flags:
-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2

trying to reproduce it.
what packages for mipsel cross compiling have you installed? probably some cross headers are needed also...

Signature · 2 lines
Thanks,
Vitaly Fertman
#3 lore raw
Quoted 9 lines · Vitaly Fertman
Quoted 8 lines

reiserfsprogs version: 3.6.19
linux-libc-headers version: 2.6.8.1

Host: linux-i686
Target: linux-mipsel
Compiler: gcc 3.3.4
compilation flags:
-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2

Quoted 3 lines

trying to reproduce it.
what packages for mipsel cross compiling have you installed? probably some cross headers are needed also...

My cross-compile toolchain was built with OpenEmbedded. gcc 3.3.4, binutils 2.14.90.0.7, uclibc 0.9.27, linux-libc-headers 2.6.8.1. And as I mentioned yesterday, it seems to not happen when using gcc 3.4.3 instead.

Thank you for looking in to it.

Signature · 1 line
The moon is last quarter, 48.2% illuminated, 22.3 days old.