Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gnu hash and MIPs incompatibility: how deal with it?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
iMike
Apprentice
Apprentice


Joined: 01 Apr 2005
Posts: 217
Location: Stockholm, Sweden

PostPosted: Thu Jul 31, 2008 8:03 pm    Post subject: gnu hash and MIPs incompatibility: how deal with it? Reply with quote

Awhile back I submitted a bug on binutls that turned out to be a problem with hash-style on MPIs. I am still trying to figure out how to deal with it, although I guess it is officially "solved." My current problem is upgrading the kernel from 2.6.23.14-mipsgit-20080206 to 2.6.24.7-20080519. Just doing a make oldconfig, I get:
Code:
lowell linux # make oldconfig
  HOSTCC  scripts/basic/fixdep
/usr/lib/gcc/mips-unknown-linux-gnu/4.1.2/../../../../mips-unknown-linux-gnu/bin/ld: .gnu.hash is incompatible with the MIPS ABI
collect2: ld returned 1 exit status
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2

Which again is the hash problem. It's not really clear to me what the problem or solution has been. I have binutils-2.18-r3 and glibc-2.6.1 and my machine is otherwise up-to-date and I'm using the current 2008.0 profile. So what gives? Can anyone explain what is going on here?

PS The only thing I didn't update lately is I never *re-*built glibc when the CROSSCOMPILE_OPTS="-headers-only%" flag showed up, but I assume that doesn't make any difference. Also, I should mention I have continued to compile with LDFLAGS="-Wl,--hash-style=sysv" in /etc/make.conf.

Thanks for any clarity anyone can shed.
/iMike
Back to top
View user's profile Send private message
ddc
Guru
Guru


Joined: 29 Aug 2006
Posts: 525

PostPosted: Sat Aug 02, 2008 12:36 pm    Post subject: Reply with quote

what is your hw ?
Back to top
View user's profile Send private message
roarinelk
Guru
Guru


Joined: 04 Mar 2004
Posts: 520

PostPosted: Sun Aug 03, 2008 9:14 am    Post subject: Reply with quote

I know this problem; you need to rebuild binutils but remove patch
"77_all_generate-gnu-hash.patch" from the gentoo patch tarball.

Then rebuild the rest of the toolchain (and unfortunately this also
requires you to rebuild most of your MIPS packages too because
symbol versioning support will be lost :( )
Back to top
View user's profile Send private message
iMike
Apprentice
Apprentice


Joined: 01 Apr 2005
Posts: 217
Location: Stockholm, Sweden

PostPosted: Sun Aug 03, 2008 3:34 pm    Post subject: Reply with quote

ddc wrote:
what is your hw ?

This is a an SGI O2
Code:
# cat /proc/cpuinfo
system type      : SGI O2
processor      : 0
cpu model      : R5000 V2.1  FPU V1.0
with
Code:
CFLAGS="-O2 -march=mips4 -pipe -mabi=32"
and
Code:
default/linux/mips/2008.0 *
Back to top
View user's profile Send private message
iMike
Apprentice
Apprentice


Joined: 01 Apr 2005
Posts: 217
Location: Stockholm, Sweden

PostPosted: Mon Aug 04, 2008 6:53 pm    Post subject: Reply with quote

roarinelk wrote:
I know this problem; you need to rebuild binutils but remove patch
"77_all_generate-gnu-hash.patch" from the gentoo patch tarball.
Yikes! Which bug is this filed under?
Back to top
View user's profile Send private message
roarinelk
Guru
Guru


Joined: 04 Mar 2004
Posts: 520

PostPosted: Tue Aug 05, 2008 11:36 am    Post subject: Reply with quote

iMike wrote:
roarinelk wrote:
I know this problem; you need to rebuild binutils but remove patch
"77_all_generate-gnu-hash.patch" from the gentoo patch tarball.
Yikes! Which bug is this filed under?


Not directly related to your problem, but similar:
https://bugs.gentoo.org/show_bug.cgi?id=229173
Back to top
View user's profile Send private message
Kumba
Developer
Developer


Joined: 16 Jul 2002
Posts: 393
Location: Sigma 957

PostPosted: Sun Aug 24, 2008 7:04 am    Post subject: Reply with quote

The bug it's being tracked under now (that I filed after a quick search) is Bug #233233:
https://bugs.gentoo.org/show_bug.cgi?id=233233

Vapier tried one fix to the 77_all_generate-gnu-hash.patch file, but that didn't work on my end, so the bug has been re-opened for further review.

For now, the quick fix is to exclude 77_all_generate-gnu-hash.patch from the compile. Use 'ebuild' to unpack the ebuild, kill the patch, then finish using 'ebuild' to compile and merge it.
_________________
"The past tempts us, the present confuses us, the future frightens us. And our lives slip away, moment by moment, lost in that vast, terrible in-between."
--Emperor Turhan, Centauri Republic
Back to top
View user's profile Send private message
roarinelk
Guru
Guru


Joined: 04 Mar 2004
Posts: 520

PostPosted: Sun Aug 24, 2008 7:09 pm    Post subject: Reply with quote

...and apply the 2 patches from bug #233229 while you're at it.
For some reason the new binutils-2.18-r3 are seriously broken on MIPS without
them (a.k.a. happily segfaulting)


Last edited by roarinelk on Mon Aug 25, 2008 9:51 am; edited 1 time in total
Back to top
View user's profile Send private message
Kumba
Developer
Developer


Joined: 16 Jul 2002
Posts: 393
Location: Sigma 957

PostPosted: Mon Aug 25, 2008 12:01 am    Post subject: Reply with quote

roarinelk wrote:
...and apply the 2 patches from bug #233229 while you're at it.
For some reason the new binutils-2.18-r3 are seriously broken without
them (a.k.a. happily segfaulting)

Yeah, I found that out. The plus was there actually was a fix for it.

Right now, if you build binutils-2.18-r3 and gcc-4.3.1-r1, then attempt to compile glibc-2.7 or even the 2.8_pre we have, you'll hose your system (unless you have a backup). I'm attempting to pin down the appropriate binutils patches to apply that might fix this (assuming binutils is the one that even needs fixing).
_________________
"The past tempts us, the present confuses us, the future frightens us. And our lives slip away, moment by moment, lost in that vast, terrible in-between."
--Emperor Turhan, Centauri Republic
Back to top
View user's profile Send private message
roarinelk
Guru
Guru


Joined: 04 Mar 2004
Posts: 520

PostPosted: Mon Aug 25, 2008 9:04 am    Post subject: Reply with quote

Kumba wrote:
roarinelk wrote:
...and apply the 2 patches from bug #233229 while you're at it.
For some reason the new binutils-2.18-r3 are seriously broken without
them (a.k.a. happily segfaulting)

Yeah, I found that out. The plus was there actually was a fix for it.

Right now, if you build binutils-2.18-r3 and gcc-4.3.1-r1, then attempt to compile glibc-2.7 or even the 2.8_pre we have, you'll hose your system (unless you have a backup). I'm attempting to pin down the appropriate binutils patches to apply that might fix this (assuming binutils is the one that even needs fixing).


What confuses me is that 2.18-r3 used to work without a hitch from the first time it hit portage.
I only noticed the breakage when I rebuilt it with a different host tuple on the target last week.
(mipsel-unknown-linux-gnu -> mipsel-softfloat-linux-gnu).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum