Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 263111 - glibc-2.9* fails to build on a stable sh4-unknown-linux-gnu
Summary: glibc-2.9* fails to build on a stable sh4-unknown-linux-gnu
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-20 10:41 UTC by Raúl Porcel (RETIRED)
Modified: 2009-05-19 01:23 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Raúl Porcel (RETIRED) gentoo-dev 2009-03-20 10:41:13 UTC
Hi, this failure happens on native and crosscompiling(so you can reproduce easily and quickly with this one).

Steps to reproduce cross-compiling:
crossdev -S sh4-unknown-linux-gnu
emerge-wrapper --init
emerge-sh4-unknown-linux-gnu glibc

More easier steps:
crossdev -S --l 2.9_p20081201-r2 sh4-unknown-linux-gnu   

I also found that not using -S on crossdev, works fine.
The error is as follows, but i'll attach the build.log:
               > /var/tmp/cross/sh4-unknown-linux-gnu/portage/cross-sh4-unknown-linux-gnu/glibc-2.9_p20081201-r2/work/build-default-sh4-unknown-linux-gnu-nptl/elf/ld.so.lds
sh4-unknown-linux-gnu-gcc -Wl,-O1  -nostdlib -nostartfiles -shared -o /var/tmp/cross/sh4-unknown-linux-gnu/portage/cross-sh4-unknown-linux-gnu/glibc-2.9_p20081201-r2/work/build-default-sh4-unknown-linux-gnu-nptl/elf/ld.so                   \
                  -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both -Wl,-z,defs -Wl,-z,now    \
                  /var/tmp/cross/sh4-unknown-linux-gnu/portage/cross-sh4-unknown-linux-gnu/glibc-2.9_p20081201-r2/work/build-default-sh4-unknown-linux-gnu-nptl/elf/librtld.os -Wl,--version-script=/var/tmp/cross/sh4-unknown-linux-gnu/portage/cross-sh4-unknown-linux-gnu/glibc-2.9_p20081201-r2/work/build-default-sh4-unknown-linux-gnu-nptl/ld.map            \
                  -Wl,-soname=ld-linux.so.2 -T /var/tmp/cross/sh4-unknown-linux-gnu/portage/cross-sh4-unknown-linux-gnu/glibc-2.9_p20081201-r2/work/build-default-sh4-unknown-linux-gnu-nptl/elf/ld.so.lds
/var/tmp/cross/sh4-unknown-linux-gnu/portage/cross-sh4-unknown-linux-gnu/glibc-2.9_p20081201-r2/work/build-default-sh4-unknown-linux-gnu-nptl/elf/librtld.os: In function `__udivmoddi4':
divdi3.c:(.text+0x15d2c): undefined reference to `__udiv_qrnnd_16'
divdi3.c:(.text+0x15ecc): undefined reference to `__udiv_qrnnd_16'
divdi3.c:(.text+0x16024): undefined reference to `__udiv_qrnnd_16'
collect2: ld returned 1 exit status
make[2]: *** [/var/tmp/cross/sh4-unknown-linux-gnu/portage/cross-sh4-unknown-linux-gnu/glibc-2.9_p20081201-r2/work/build-default-sh4-unknown-linux-gnu-nptl/elf/ld.so] Error 1
make[2]: Leaving directory `/var/tmp/cross/sh4-unknown-linux-gnu/portage/cross-sh4-unknown-linux-gnu/glibc-2.9_p20081201-r2/work/glibc-2.9-20081201/elf'
make[1]: *** [elf/subdir_lib] Error 2
make[1]: Leaving directory `/var/tmp/cross/sh4-unknown-linux-gnu/portage/cross-sh4-unknown-linux-gnu/glibc-2.9_p20081201-r2/work/glibc-2.9-20081201'
make: *** [all] Error 2
Comment 1 SpanKY gentoo-dev 2009-03-20 11:11:39 UTC
you're saying it builds fine with gcc-4.3.3 but not gcc-3.4.6 ?  i'm pretty sure the symbol __udiv_qrnnd_16 comes gcc, so i would say this isnt really a bug.  we just need to update the gcc depend in glibc-2.9 for sh targets.
Comment 2 Raúl Porcel (RETIRED) gentoo-dev 2009-03-20 11:22:06 UTC
(In reply to comment #1)
> you're saying it builds fine with gcc-4.3.3 but not gcc-3.4.6 ?  i'm pretty
> sure the symbol __udiv_qrnnd_16 comes gcc, so i would say this isnt really a
> bug.  we just need to update the gcc depend in glibc-2.9 for sh targets.
> 

stable gcc is 4.1.2 :)
Comment 3 Raúl Porcel (RETIRED) gentoo-dev 2009-03-20 12:19:12 UTC
"crossdev -S --g 4.2.4-r1 --l 2.9_p20081201-r2 sh4-unknown-linux-gnu" works

So yeah, guess raising the dep to gcc-4.2.4-r1 would work. Thats funny though, for having gcc-4.3.3 you need to have glibc-2.9, for which you need gcc-4.2.4! :D
Comment 4 Raúl Porcel (RETIRED) gentoo-dev 2009-03-20 12:34:30 UTC
Oh, i remember now, gcc-4.2.4-r1 is not keyworded on sh :P
Comment 5 SpanKY gentoo-dev 2009-03-20 13:12:50 UTC
i wasnt really planning on mucking with gcc-4.2 for sh.  early versions of gcc-4.3 worked fine natively, but for some reason the latest ones segfault while compiling itself and i havent had a chance to figure out why.  it seemed like the pie patches are causing the problem, but i reviewed them in detail and couldnt quite spot an error.

oddly, cross-compiling gcc-4.3.3 works fine :/
Comment 6 Raúl Porcel (RETIRED) gentoo-dev 2009-03-21 11:30:21 UTC
Oh, i was wrong again :)

gcc-4.3.3-r1 depends on >=glibc-2.8, glibc-2.8 builds fine with gcc-4.1.2.

So, for getting gcc-4.3.3-r1 on a stable system, you need:
-emerge =glibc-2.8*
-emerge gcc

Not sure what would be the workaround here or if it can even be fixed.
Comment 7 Raúl Porcel (RETIRED) gentoo-dev 2009-03-21 11:32:40 UTC
Ah, since you marked glibc-2.8 stable, guess this isn't an issue anymore, since stable users should have glibc-2.8 :)

Feel free to close this then.
Comment 8 Mark Loeser (RETIRED) gentoo-dev 2009-05-19 01:23:37 UTC
Closing, since you said so :)