Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problems compiling gcc 4.2.3
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Simba7
l33t
l33t


Joined: 22 Jan 2007
Posts: 704
Location: Billings, MT, USA

PostPosted: Wed Mar 05, 2008 6:11 am    Post subject: Problems compiling gcc 4.2.3 Reply with quote

This is rather recently since I compiled the same box 2 weeks ago and had to recompile it due to a hard drive problem..

I always have done a Stage1 with the System Rescue CD and it has worked in the past (even on my i586 systems), but now I'm getting these problems during the ./bootstrap.sh:

Code:
gcc   -O2 -march=pentium3 -pipe -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute    -DHAVE_CONFIG_H  -o cc1-dummy c-lang.o stub-objc.o attribs.o c-errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o c-convert.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  c-gimplify.o tree-mudflap.o c-pretty-print.o c-omp.o dummy-checksum.o \
          main.o  libbackend.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a ../libcpp/libcpp.a   ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a
gcc   -O2 -march=pentium3 -pipe -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute    -DHAVE_CONFIG_H -DGENERATOR_FILE  -o build/genchecksum \
            build/genchecksum.o .././libiberty/libiberty.a
build/genchecksum cc1-dummy > cc1-checksum.c
gcc -c   -O2 -march=pentium3 -pipe -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute    -DHAVE_CONFIG_H -I. -I. -I/var/tmp/portage/sys-devel/gcc-4.2.3/work/gcc-4.2.3/gcc -I/var/tmp/portage/sys-devel/gcc-4.2.3/work/gcc-4.2.3/gcc/. -I/var/tmp/portage/sys-devel/gcc-4.2.3/work/gcc-4.2.3/gcc/../include -I/var/tmp/portage/sys-devel/gcc-4.2.3/work/gcc-4.2.3/gcc/../libcpp/include  -I/var/tmp/portage/sys-devel/gcc-4.2.3/work/gcc-4.2.3/gcc/../libdecnumber -I../libdecnumber    cc1-checksum.c -o cc1-checksum.o
cc1: error: unrecognized command line option "-Wno-overlength-strings"
make[2]: *** [cc1-checksum.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.2.3/work/build/gcc'
make[1]: *** [install-gcc] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.2.3/work/build'
make: *** [install] Error 2
Back to top
View user's profile Send private message
alex.blackbit
Advocate
Advocate


Joined: 26 Jul 2005
Posts: 2397

PostPosted: Wed Mar 05, 2008 8:14 pm    Post subject: Reply with quote

the version of gcc that is doing the compiling during this step seems to not support the warning option "-Wno-overlength-strings".
a (fully functional) gcc-4.2.3 does. well, something is wrong here, but of course you know that yourself.
i believe stage1 installs are unsupported now, maybe this is one reason for that.
Back to top
View user's profile Send private message
Simba7
l33t
l33t


Joined: 22 Jan 2007
Posts: 704
Location: Billings, MT, USA

PostPosted: Wed Mar 05, 2008 8:21 pm    Post subject: Reply with quote

alex.blackbit wrote:
the version of gcc that is doing the compiling during this step seems to not support the warning option "-Wno-overlength-strings".
a (fully functional) gcc-4.2.3 does. well, something is wrong here, but of course you know that yourself.
i believe stage1 installs are unsupported now, maybe this is one reason for that.

I know Stage1 installs are unsupported.. I've had the same reply in several other posts.. It's just my thing that I like Stage1 installs better..

The thing is.. It worked.. Uh.. With 4.2.2.. Hmm.. I'll compile GCC 4.2.2 during the bootstrap and 4.2.3 during the emerge -e system and see if it works.
Back to top
View user's profile Send private message
Simba7
l33t
l33t


Joined: 22 Jan 2007
Posts: 704
Location: Billings, MT, USA

PostPosted: Fri Mar 07, 2008 5:03 am    Post subject: Reply with quote

Yep.. gcc 4.2.2 compiled just fine and 4.2.3 coughed up that error.. Looks like a problem within 4.2.3.

I'll compile 4.2.3 after the ./bootstrap.sh and see if it gives the same error. If not, it's off to emerge -e system.
Back to top
View user's profile Send private message
alex.blackbit
Advocate
Advocate


Joined: 26 Jul 2005
Posts: 2397

PostPosted: Fri Mar 07, 2008 3:20 pm    Post subject: Reply with quote

well... okay. i believe the dev people use stage1 bootstraps to create install cd's and stuff (but i am not sure about that).
contact one of the devs about that (e.g. irc). since most people here in the forums don't do stage1 installations, irc would be a better place for your problem.
Back to top
View user's profile Send private message
Simba7
l33t
l33t


Joined: 22 Jan 2007
Posts: 704
Location: Billings, MT, USA

PostPosted: Fri Mar 07, 2008 4:52 pm    Post subject: Reply with quote

Ok.. gcc 4.2.3 compiles fine after compiling 4.2.2 during the ./bootstrap.sh. I guess it doesn't like the 4.1.1 -> 4.2.3 jump for some reason.

So.. Basically change the 2007.0 profile (packages file) to compile =gcc-4.2.2 only (instead of >=sys-devel/gcc-3.3.4-r1). After that's completed, you can change it back so it'll compile gcc-4.2.3. This will probably change with the 2008 stage coming up.

So, this is how I've been compiling my systems (using ACCEPT_KEYWORDS="~x86"):

*Change /usr/portage/profiles/default-linux/x86/2007.0/packages for =gcc-4.2.2 only*
./bootstrap.sh
*Change the file back to >=sys-devel/gcc-3.3.4-r1*
emerge gcc
emerge expat
emerge readline
emerge --oneshot --nodeps gettext
emerge -C mktemp
emerge perl util-linux help2man
emerge -e system

..then follow the rest of the handbook.. There's no problems after this.

..and Alex.. there are at least 50 people here that still do stage1 builds.. I'm just trying to help them, too. I do agree that stage1 builds are for more advanced users.
Back to top
View user's profile Send private message
cheater1034
Veteran
Veteran


Joined: 09 Sep 2004
Posts: 1558

PostPosted: Sun Jul 20, 2008 6:43 am    Post subject: Reply with quote

Sorry for bumping an old thread, but now with gcc 4.1.2 bootstrapping to a newer toolkit (gcc 4.2+) won't work.

It gives the exact same error as gcc 4.1.2 does not support -wno-overlength.

Basically, the only fixes i see at the moment are:

1) The gentoo stages gcc 4.1.2 is built with the following patch:
http://www.linuxfromscratch.org/patches/hlfs/svn/gcc-4.1.2-Wno_overlength_strings-1.patch

(this won't happen as there won't be another official gentoo stage for a long while)

2) Don't use the warning flag -Wno-overlength-strings when building gcc 4.2.4/gcc 4.3.1 before the bootstrap.

Here's a patched overlay with gcc 4.2.4 and gcc 4.3.1, with similar patches respectively:
http://conrad.whitesouls.com/gcc.tar.bz2

This only affects stage1 installs planning to upgrade to gcc 4.2.x or gcc 4.3.1 during the bootstrap, how you would use it is

First, unmask the respective files, gcc 4.2 or gcc 4.3
Second, run USE="-* build" emerge =sys-devel/gcc-4.2.4 or =sys-devel/gcc-4.3.1-r1 (of course make sure you define the PORTDIR_OVERLAY)
Third, Delete the overlay (you won't need it any more)
Fourth, run bootstrap as normal and it will not fail
_________________
IRC!: #zen-sources on irc.rizon.net
zen-kernel.org
--
Lost in android development land.
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Sun Jul 20, 2008 3:57 pm    Post subject: Reply with quote

Simba7 wrote:
there are at least 50 people here that still do stage1 builds..

Actually I stopped doing stage1 installations a while back. Now I do stage0 which is basically building your own stage tarball.

You start with an up-to-date host system, and an empty directory, then emerge packages into it.
Code:
# mkdir /mnt/gentoo
# ROOT="/mnt/gentoo" emerge system

Next you need to setup a couple of things manually (/etc/make.profile symlink, /etc/make.conf, /etc/portage/*, /etc/locale.gen ...).

What you end up with is a clean, custom stage3 that you can chroot into, and continue your installation.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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