Mailing List Archive

Problem building glibc on Ultra1
Hi,

I'm trying to install gentoo 2005.0 from a stage1 tarball on an old
Ultra1, but after I've bootsrapped my system and enter the stage2
stage I run into problems building glibc.

Beloow is the error message I get and also my USE flags and CFLAGS.

Error message:

gcc .nostdlib -nostartfiles -shared -o
/var/tmp/portage/glibc-2.3.2/work/buildhere/elf/ld.so \
-Wlm-z,combreloc -Wl,-z,relro -Wl,-z,defs \
/var/tmp/portage/glibc-2.3.2/work/buildhere/elf/librtld.os
-Wl,-version-script=/var/tmp/portage/glibc-2.3.3.20040420-r2/work/glibc-2.3.2/buildhere/ld.map
\
-Wl,-soname=ld-linux.so.2 -T
/var/tmp/portage/glibc-2.3.3-20040420-r2/work/glibc-2.3.2/buildhere/elf/ld.so.lds
/usr/lib/gcc-lib/sparc-unknown-linux-gnu/3.3.5-20050130/../../../../bin/ld:
BFD 2.15.92.0.2 20040927 assertion fail
/var/tmp/portage/binutils-2.16.92.0.2-r7/work/bfd/elf32-sparc.c:2485
/usr/lib/gcc-lib/sparc-unknown-linux-gnu/3.3.5-20050130/../../../../var/tmp/portage/glibc-2.3.3.20040420-r2/work/glibc-2.3.2/buildhere/elf/librtld.os:
probably compiled without -fPIC?
/usr/lib/gcc-lib/sparc-unknown-linux-gnu/3.3.5-20050130/../../../../sparc-unknown-linux-gnu/bin/ld:
final link failed: Bad value collect2: ld returned 1 exit status


ERROR: sys-libs/glibc-2.3.3.20040420-r2 failed
function src_compile,Line 586,Exit code 2
(no error message)



I've tried to copy the error message as exactly as possible but the
paths might not be totally correct because I've first written them on
paper and then transferred them from the paper into this mail. Between
the ld returned 1 exit status and ERROR:
sys-libs/glibc-2.3.3.20040420-r2
lines there are a few lines saying something like make 1 leaving
directory.... and make 2 leaving directory... but I figure those
aren't really part of the error message.


The USE flags that I've configured myself, i.e., those configured in
addition to the make.defaults file are:

USE="-alsa -cups -gtk -gnome hardened hardenedphp -kde kerberos krb4
maildir -mikmod mozilla mysql php postgres sasl symlink tetex threads
ultra1 -X -xmms -xv"

Also, I have configured CFLAGS as follows:

CFLAGS="-mcpu=ultrasparc -O3 -pipe -mtune=v9 -fomit-frame--pointer -fPIC"

I've also tried it without -fPIC but with the same result...

I've searched both the forums and google for an resolution to this
problem but I didn't find anything so if someone has seen this and
know how to solve it I would be very grateful. I suspect that it has
something to do with the hardened USE flag, but I haven't tried
without it.

--
gentoo-sparc@gentoo.org mailing list
Re: Problem building glibc on Ultra1 [ In reply to ]
On Wed, 2005-04-20 at 11:12 +0200, Anders Mörtsell wrote:
> CFLAGS="-mcpu=ultrasparc -O3 -pipe -mtune=v9 -fomit-frame--pointer -fPIC"

Never put -fPIC in your CFLAGS.
You probably meant -fomit-frame-pointer, but you don't get much boost
from that on sparc.
-O3 is known to be buggy in many cases. Try dropping it down to -O2.
Re: Problem building glibc on Ultra1 [ In reply to ]
OK, I put -fPIC in only because the error message metioned trying to
compile elf32-sparc.c with -fPIC.
As I wrote in further comments in the bug report I retried building
without the hardened USE flag, but with the same CFLAGS, i.e.,
CFLAGS="-mcpu=ultrasparc -O3 -pipe -mtune=v9 -fomit-frame-pointer" and
then the build went fine. I think I even tried lowering the
optimization flag to -O2 and got the same error with hardened enabled.

/ Anders

On 5/9/05, Jeremy Huddleston <eradicator@gentoo.org> wrote:
> On Wed, 2005-04-20 at 11:12 +0200, Anders Mörtsell wrote:
> > CFLAGS="-mcpu=ultrasparc -O3 -pipe -mtune=v9 -fomit-frame--pointer -fPIC"
>
> Never put -fPIC in your CFLAGS.
> You probably meant -fomit-frame-pointer, but you don't get much boost
> from that on sparc.
> -O3 is known to be buggy in many cases. Try dropping it down to -O2.
>
>
>

--
gentoo-sparc@gentoo.org mailing list