Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[resolved] - !!! ERROR: sys-devel/gcc-4.1.1 failed.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
thorpe
l33t
l33t


Joined: 09 May 2005
Posts: 618
Location: Sydney, Australia.

PostPosted: Fri Jul 14, 2006 9:23 am    Post subject: [resolved] - !!! ERROR: sys-devel/gcc-4.1.1 failed. Reply with quote

Trying to upgrade gcc from 3.4.4 to 4.1.1 (stable) on a ppc by running...
Code:

emerge -uDN gcc

glibc fails with...
Code:

checking for -z nodlopen option... yes
checking for -z initfirst option... yes
checking for -z relro option... yes
checking for -Bgroup option... yes
checking for libgcc_s suffix...
checking for --as-needed option... yes
checking whether --noexecstack is desirable for .S files... yes
checking for -z combreloc... yes
checking for -z execstack... yes
checking for -fpie... yes
checking for -fno-toplevel-reorder... no
checking for -fstack-protector... yes
checking whether cc puts quotes around section names... no
checking for assembler .weak directive... yes
checking whether CFI directives are supported... yes
checking for ld --no-whole-archive... yes
checking for gcc -fexceptions... yes
checking whether clobbering cr0 causes problems... no
checking for __builtin_expect... yes
checking for __builtin_memset... no
checking for redirection of built-in functions... yes
checking for __thread... yes
checking for tls_model attribute... yes
checking for libgd... no
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for long double... yes
checking size of long double... 8
running configure fragment for sysdeps/powerpc/powerpc32/elf
checking for powerpc32 TLS support... yes
running configure fragment for sysdeps/unix/sysv/linux/powerpc
checking whether powerpc-unknown-linux-gnu-gcc -pipe -mcpu=7400 -freorder-blocks -O2 -mlong-double-128 uses IBM extended format... no
checking whether powerpc-unknown-linux-gnu-gcc -pipe -mcpu=7400 -freorder-blocks -O2 supports -mabi=ibmlongdouble... no
configure: error: this configuration requires -mlong-double-128 IBM extended format support

!!! ERROR: sys-libs/glibc-2.4-r3 failed.
Call stack:
  ebuild.sh, line 1539:   Called dyn_compile
  ebuild.sh, line 939:   Called src_compile
  glibc-2.4-r3.ebuild, line 1179:   Called toolchain-glibc_src_compile
  glibc-2.4-r3.ebuild, line 251:   Called glibc_do_configure 'nptl'
  glibc-2.4-r3.ebuild, line 941:   Called die

!!! failed to configure glibc
!!! If you need support, post the topmost build error, and the call stack if relevant.

I found a thread that suggested trying to emerge gcc first, saying that glibc needed to be built with gcc-4.1.1. Tried...
Code:

emerge gcc

4.1.1 is stable on ppc. gcc-4.1.1 failed with...
Code:

rt.o c-aux-info.o c-common.o c-opts.o c-format.o c-semantics.o c-incpath.o cppdefault.o c-ppoutput.o c-cppbuiltin.o prefix.o c-objc-common.o c-dump.o c-pch.o c-parser.o rs6000-c.o c-gimplify.o tree-mudflap.o c-pretty-print.o cc1-checksum.o \
  main.o  libbackend.a ../libcpp/libcpp.a ../libcpp/libcpp.a   ../libiberty/libiberty.a
stage1/xgcc -Bstage1/ -B/usr/powerpc-unknown-linux-gnu/bin/   -O2 -pipe -mcpu=7400 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wold-style-definition -Wmissing-format-attribute     -DHAVE_CONFIG_H  -o cc1plus \
      cp/cp-lang.o stub-objc.o cp/call.o cp/decl.o cp/expr.o cp/pt.o cp/typeck2.o cp/class.o cp/decl2.o cp/error.o cp/lex.o cp/parser.o cp/ptree.o cp/rtti.o cp/typeck.o cp/cvt.o cp/except.o cp/friend.o cp/init.o cp/method.o cp/search.o cp/semantics.o cp/tree.o cp/repo.o cp/dump.o cp/optimize.o cp/mangle.o cp/cp-objcp-common.o cp/name-lookup.o cp/cxx-pretty-print.o cp/cp-gimplify.o tree-mudflap.o attribs.o c-common.o c-format.o c-pragma.o c-semantics.o c-lex.o c-dump.o rs6000-c.o c-pretty-print.o c-opts.o c-pch.o c-incpath.o cppdefault.o c-ppoutput.o c-cppbuiltin.o prefix.o c-gimplify.o tree-inline.o cc1plus-checksum.o main.o  libbackend.a ../libcpp/libcpp.a ../libcpp/libcpp.a   ../libiberty/libiberty.a
echo |  ./xgcc -B./ -B/usr/powerpc-unknown-linux-gnu/bin/ -isystem /usr/powerpc-unknown-linux-gnu/include -isystem /usr/powerpc-unknown-linux-gnu/sys-include -L/var/tmp/portage/gcc-4.1.1/work/build/gcc/../ld -E -dM - | \
  sed -n -e 's/^#define \([^_][a-zA-Z0-9_]*\).*/\1/p' \
         -e 's/^#define \(_[^_A-Z][a-zA-Z0-9_]*\).*/\1/p' | \
  sort -u > tmp-macro_list
/bin/sh /var/tmp/portage/gcc-4.1.1/work/gcc-4.1.1/gcc/../move-if-change tmp-macro_list macro_list
macro_list is unchanged
echo timestamp > s-macro_list
./xgcc -B./ -B/usr/powerpc-unknown-linux-gnu/bin/ -isystem /usr/powerpc-unknown-linux-gnu/include -isystem /usr/powerpc-unknown-linux-gnu/sys-include -L/var/tmp/portage/gcc-4.1.1/work/build/gcc/../ld -O2 -O2 -O2 -pipe -mcpu=7400  -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -I. -I. -I/var/tmp/portage/gcc-4.1.1/work/gcc-4.1.1/gcc -I/var/tmp/portage/gcc-4.1.1/work/gcc-4.1.1/gcc/. -I/var/tmp/portage/gcc-4.1.1/work/gcc-4.1.1/gcc/../include -I/var/tmp/portage/gcc-4.1.1/work/gcc-4.1.1/gcc/../libcpp/include   -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-unit-at-a-time  -msdata=none \
  -c /var/tmp/portage/gcc-4.1.1/work/gcc-4.1.1/gcc/crtstuff.c -DCRT_BEGIN \
  -o crtbegin.o
./xgcc -B./ -B/usr/powerpc-unknown-linux-gnu/bin/ -isystem /usr/powerpc-unknown-linux-gnu/include -isystem /usr/powerpc-unknown-linux-gnu/sys-include -L/var/tmp/portage/gcc-4.1.1/work/build/gcc/../ld -O2 -O2 -O2 -pipe -mcpu=7400  -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -I. -I. -I/var/tmp/portage/gcc-4.1.1/work/gcc-4.1.1/gcc -I/var/tmp/portage/gcc-4.1.1/work/gcc-4.1.1/gcc/. -I/var/tmp/portage/gcc-4.1.1/work/gcc-4.1.1/gcc/../include -I/var/tmp/portage/gcc-4.1.1/work/gcc-4.1.1/gcc/../libcpp/include   -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-unit-at-a-time  -fPIC -msdata=none \
  -c /var/tmp/portage/gcc-4.1.1/work/gcc-4.1.1/gcc/crtstuff.c -DCRT_BEGIN -DCRTSTUFFS_O \
  -o crtbeginS.o
In file included from /usr/include/stdio.h:36,
                 from /var/tmp/portage/gcc-4.1.1/work/gcc-4.1.1/gcc/tsystem.h:90,
                 from /var/tmp/portage/gcc-4.1.1/work/gcc-4.1.1/gcc/crtstuff.c:68:
/usr/include/bits/types.h:146: internal compiler error: Illegal instruction
In file included from /usr/include/stdio.h:36,
                 from /var/tmp/portage/gcc-4.1.1/work/gcc-4.1.1/gcc/tsystem.h:90,
                 from /var/tmp/portage/gcc-4.1.1/work/gcc-4.1.1/gcc/crtstuff.c:68:
/usr/include/bits/types.h:146: internal compiler error: Illegal instruction
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.gentoo.org/> for instructions.
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.gentoo.org/> for instructions.
Preprocessed source stored into /var/tmp/portage/gcc-4.1.1/temp/cc8627CE.out file, please attach this to your bugreport.
Preprocessed source stored into /var/tmp/portage/gcc-4.1.1/temp/cctQSdFC.out file, please attach this to your bugreport.
make[2]: *** [crtbegin.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [crtbeginS.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/gcc-4.1.1/work/build/gcc'
make[1]: *** [stage2_build] Error 2
make[1]: Leaving directory `/var/tmp/portage/gcc-4.1.1/work/build/gcc'
make: *** [bootstrap-lean] Error 2

!!! ERROR: sys-devel/gcc-4.1.1 failed.
Call stack:
  ebuild.sh, line 1539:   Called dyn_compile
  ebuild.sh, line 939:   Called src_compile
  ebuild.sh, line 1248:   Called toolchain_src_compile
  toolchain.eclass, line 24:   Called gcc_src_compile
  toolchain.eclass, line 1468:   Called gcc_do_make
  toolchain.eclass, line 1342:   Called die

!!! emake failed with bootstrap-lean
!!! If you need support, post the topmost build error, and the call stack if relevant.

My emerge --info
Code:

utilserv linux # emerge --info
Portage 2.1-r1 (!/usr/portage/profiles/default-linux/ppc/ppc32/2006.0/G3, gcc-3.4.4, glibc-2.3.5-r3, 2.6.16-gentoo-r9 ppc)
=================================================================
System uname: 2.6.16-gentoo-r9 ppc 740/750
Gentoo Base System version 1.6.14
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.4.2
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r4
ACCEPT_KEYWORDS="ppc"
AUTOCLEAN="yes"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-O2 -pipe -mcpu=7400 -maltivec -mabi=altivec"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo"
CXXFLAGS="-O2 -mtune=G3 -mcpu=G3 -pipe"
DISTDIR="/nfs_portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://public.planetmirror.com/pub/gentoo/ ftp://ftp.planetmirror.com/pub/gentoo/ http://mirror.pacific.net.au/linux/Gentoo ftp://mirror.pacific.net.au/linux/Gentoo http://mirror.isp.net.au/ftp/pub/gentoo/ ftp://mirror.isp.net.au/pub/gentoo/ ftp://ftp.swin.edu.au/gentoo http://ftp.swin.edu.au/gentoo http://mirror.gentoo.gr.jp http://gentoo.gg3.net/ ftp://gg3.net/pub/linux/gentoo/ ftp://ftp.ecc.u-tokyo.ac.jp/GENTOO http://gentoo.channelx.biz/ "
MAKEOPTS="-j2"
PKGDIR="/nfs_portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/nfs_portage"
SYNC="rsync://rsync.au.gentoo.org/gentoo-portage"
USE="ppc apache2 apm arts berkdb bitmap-fonts bonobo cdr cli crypt cups dlloader dri dvd eds emboss encode esd foomaticdb fortran gdbm gif gpm gstreamer gtkhtml imlib ipv6 isdnlog jpeg ldap libg++ libwww mad mikmod motif mozilla mp3 mpeg ncurses nls nptl nptlonly ogg opengl pam pcre pdflib perl png pppd python qt3 qt4 quicktime readline reflection sdl session spell spl ssl symlink tcpd truetype truetype-fonts type1-fonts udev unicode vorbis xml xmms xorg xv zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_evdev kernel_linux userland_GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

What to do? Should I file a bug report as suggested? Need more info?

Any help much appreciated.
_________________
Research before taking any advice from me. I'm still coming to grips with this myself.


Last edited by thorpe on Sat Jul 15, 2006 7:42 am; edited 1 time in total
Back to top
View user's profile Send private message
nxsty
Veteran
Veteran


Joined: 23 Jun 2004
Posts: 1556
Location: .se

PostPosted: Fri Jul 14, 2006 9:46 am    Post subject: Reply with quote

Sounds like a CFLAGS problem (some binaries are built with features your CPU doesn't support, like altivec).

Quote:
CFLAGS="-O2 -pipe -mcpu=7400 -maltivec -mabi=altivec"
CXXFLAGS="-O2 -mtune=G3 -mcpu=G3 -pipe"


Why are these different? You should probably have something like this in your make.conf instead:

Code:
CFLAGS="-O2 -mtune=G3 -mcpu=G3 -pipe"
CXXFLAGS="${CFLAGS}"
Back to top
View user's profile Send private message
thorpe
l33t
l33t


Joined: 09 May 2005
Posts: 618
Location: Sydney, Australia.

PostPosted: Fri Jul 14, 2006 10:28 am    Post subject: Reply with quote

Thank... Im giving it a try. I actually didn't even have a CXXFLAGS variable set in my make.conf file.
_________________
Research before taking any advice from me. I'm still coming to grips with this myself.
Back to top
View user's profile Send private message
thorpe
l33t
l33t


Joined: 09 May 2005
Posts: 618
Location: Sydney, Australia.

PostPosted: Sat Jul 15, 2006 4:37 am    Post subject: Reply with quote

Well.... that did nothing. This problem just wont go away, anyone else got any ideas?
_________________
Research before taking any advice from me. I'm still coming to grips with this myself.
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Sat Jul 15, 2006 5:57 am    Post subject: Reply with quote

You've built some of your system with altivec when you don't have CPU support for it (G3 doesn't have it). Until you've rebuilt *all* of the packages that you built with altivec enabled you'll keep getting illegal instructions.
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
codergeek42
Bodhisattva
Bodhisattva


Joined: 05 Apr 2004
Posts: 5142
Location: Anaheim, CA (USA)

PostPosted: Sat Jul 15, 2006 6:23 am    Post subject: Reply with quote

Moved from Portage & Programming to Gentoo on PPC.
_________________
~~ Peter: Programmer, Mathematician, STEM & Free Software Advocate, Enlightened Agent, Transhumanist, Fedora contributor
Who am I? :: EFF & FSF
Back to top
View user's profile Send private message
thorpe
l33t
l33t


Joined: 09 May 2005
Posts: 618
Location: Sydney, Australia.

PostPosted: Sat Jul 15, 2006 6:47 am    Post subject: Reply with quote

Quote:
Until you've rebuilt *all* of the packages that you built with altivec enabled you'll keep getting illegal instructions

So how exactly do I rebuild these packages without emerge?
_________________
Research before taking any advice from me. I'm still coming to grips with this myself.
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Sat Jul 15, 2006 6:54 am    Post subject: Reply with quote

I would create a chroot (unpack a stage3 into a folder, then chroot into it), build working packages for the base system, then merge those packages back outside the chroot. This should work fine unless things are really broken. :)
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
thorpe
l33t
l33t


Joined: 09 May 2005
Posts: 618
Location: Sydney, Australia.

PostPosted: Sat Jul 15, 2006 7:42 am    Post subject: Reply with quote

Yeah.. I guessed as much. I was pretty much going to rebuild the system anyway, theres nothing on it as yet so....
_________________
Research before taking any advice from me. I'm still coming to grips with this myself.
Back to top
View user's profile Send private message
JettLogic
n00b
n00b


Joined: 04 Jan 2006
Posts: 15

PostPosted: Thu Sep 14, 2006 3:25 pm    Post subject: Reply with quote

No no, you need to use gcc-config to select 4.1.1 as the default compiler
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Thu Sep 14, 2006 3:58 pm    Post subject: Reply with quote

He can't even compile gcc-4 (which is a requirement before switching to it...), he compiled with G4 support for a G3. That's not going to work. :p
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC 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