Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Replacing borked gcc installation?
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
Lupin_the_3rd
Apprentice
Apprentice


Joined: 03 Apr 2005
Posts: 168

PostPosted: Thu Jan 17, 2013 3:59 pm    Post subject: Replacing borked gcc installation? Reply with quote

I recently upgraded my gcc to 4.6.3, as it was marked stable on my architecture. A few days later, 4.6.3 was reverted back to testing, and 4.5.4 was once again the latest stable release.

Foolishly, I removed 4.5.4 immediately after upgrading to 4.6.3. And now I'm having problems with 4.6.3. I can't emerge 4.5.4; the build fails, presumably due to issues with 4.6.3.

How can I get my system back to a working gcc?

Thanks for any insight you may have.
_________________
Compaq XP1000 Alpha EV67 667Mhz w/ 2GB ECC
32bit PCI: ATI Radeon 9100 (DRI works!)
32bit PCI: Generic Firewire 400 card
64bit PCI: BCM5703 Gig-E (Compaq NC7771)
64bit PCI: Sil3124 SATA w/ mdadm RAID1 (pair of WD VelociRaptors)
Back to top
View user's profile Send private message
LoTeK
Apprentice
Apprentice


Joined: 26 Jul 2012
Posts: 270

PostPosted: Thu Jan 17, 2013 4:04 pm    Post subject: Reply with quote

I'm not sure if you have the same problem as I had, (I've deleted the old gcc with depclean):
https://forums.gentoo.org/viewtopic-t-947428-highlight-.html
Back to top
View user's profile Send private message
Lupin_the_3rd
Apprentice
Apprentice


Joined: 03 Apr 2005
Posts: 168

PostPosted: Fri Jan 18, 2013 2:12 am    Post subject: Reply with quote

No not the same issue. Compiling gcc 4.5.4 using 4.6.3 fails for me with this error:

alpha-unknown-linux-gnu-ranlib libbackend.a
alpha-unknown-linux-gnu-gcc -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat -DHAVE_CONFIG_H -Wl,-O1 -Wl,--as-needed -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-ppoutput.o c-cppbuiltin.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 -lmpc -lmpfr -lgmp -rdynamic -ldl -lz
/usr/lib/gcc/alpha-unknown-linux-gnu/4.6.3/crtend.o:(.init+0x10): relocation truncated to fit: ELF_LITERAL against `.text'
libbackend.a(lto-streamer-out.o): In function `VEC_tree_heap_reserve':
(.text+0x260): relocation truncated to fit: ELF_LITERAL against `.text'
libbackend.a(lto-streamer-out.o): In function `VEC_tree_heap_safe_push':
(.text+0x32c): relocation truncated to fit: ELF_LITERAL against `.text'
libbackend.a(lto-streamer-out.o): In function `ei_end_p':
(.text+0x858): relocation truncated to fit: ELF_LITERAL against `.text'
libbackend.a(lto-streamer-out.o): In function `ei_next':
(.text+0x914): relocation truncated to fit: ELF_LITERAL against `.text'
libbackend.a(lto-streamer-out.o): In function `ei_edge':
(.text+0x9f8): relocation truncated to fit: ELF_LITERAL against `.text'
libbackend.a(lto-streamer-out.o): In function `gimple_statement_structure':
(.text+0xc10): relocation truncated to fit: ELF_LITERAL against `.text'
libbackend.a(lto-streamer-out.o): In function `gimple_has_ops':
(.text+0xd58): relocation truncated to fit: ELF_LITERAL against `.text'
libbackend.a(lto-streamer-out.o): In function `gimple_has_ops':
(.text+0xd78): relocation truncated to fit: ELF_LITERAL against `.text'
libbackend.a(lto-streamer-out.o): In function `gimple_has_mem_ops':
(.text+0xde4): relocation truncated to fit: ELF_LITERAL against `.text'
libbackend.a(lto-streamer-out.o): In function `gimple_has_mem_ops':
(.text+0xe0c): additional relocation overflows omitted from the output
collect2: ld returned 1 exit status
make[3]: *** [cc1-dummy] Error 1
make[3]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.5.4/work/build/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.5.4/work/build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.5.4/work/build'
make: *** [bootstrap-lean] Error 2
emake failed
* ERROR: sys-devel/gcc-4.5.4 failed (compile phase):
* emake failed with bootstrap-lean
*
* Call stack:
* ebuild.sh, line 93: Called src_compile
* environment, line 4062: Called toolchain_src_compile
* environment, line 4718: Called gcc_do_make
* environment, line 2371: Called die
* The specific snippet of code:
* emake LDFLAGS="${LDFLAGS}" STAGE1_CFLAGS="${STAGE1_CFLAGS}" LIBPATH="${LIBPATH}" BOOT_CFLAGS="${BOOT_CFLAGS}" ${GCC_MAKE_TARGET} || die "emake failed with ${GCC_MAKE_TARGET}";
*
* If you need support, post the output of `emerge --info '=sys-devel/gcc-4.5.4'`,
* the complete build log and the output of `emerge -pqv '=sys-devel/gcc-4.5.4'`.
*
* Please include /var/tmp/portage/sys-devel/gcc-4.5.4/work/build/gcc-build-logs.tar.bz2 in your bug report
*
* The complete build log is located at '/var/tmp/portage/sys-devel/gcc-4.5.4/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/sys-devel/gcc-4.5.4/temp/environment'.
* Working directory: '/var/tmp/portage/sys-devel/gcc-4.5.4/work/build'
* S: '/var/tmp/portage/sys-devel/gcc-4.5.4/work/build'

>>> Failed to emerge sys-devel/gcc-4.5.4, Log file:

>>> '/var/tmp/portage/sys-devel/gcc-4.5.4/temp/build.log'

* Messages for package sys-devel/gcc-4.5.4:

* ERROR: sys-devel/gcc-4.5.4 failed (compile phase):
* emake failed with bootstrap-lean
*
* Call stack:
* ebuild.sh, line 93: Called src_compile
* environment, line 4062: Called toolchain_src_compile
* environment, line 4718: Called gcc_do_make
* environment, line 2371: Called die
* The specific snippet of code:
* emake LDFLAGS="${LDFLAGS}" STAGE1_CFLAGS="${STAGE1_CFLAGS}" LIBPATH="${LIBPATH}" BOOT_CFLAGS="${BOOT_CFLAGS}" ${GCC_MAKE_TARGET} || die "emake failed with ${GCC_MAKE_TARGET}";
*
* If you need support, post the output of `emerge --info '=sys-devel/gcc-4.5.4'`,
* the complete build log and the output of `emerge -pqv '=sys-devel/gcc-4.5.4'`.
*
* Please include /var/tmp/portage/sys-devel/gcc-4.5.4/work/build/gcc-build-logs.tar.bz2 in your bug report
*
* The complete build log is located at '/var/tmp/portage/sys-devel/gcc-4.5.4/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/sys-devel/gcc-4.5.4/temp/environment'.
* Working directory: '/var/tmp/portage/sys-devel/gcc-4.5.4/work/build'
* S: '/var/tmp/portage/sys-devel/gcc-4.5.4/work/build'
_________________
Compaq XP1000 Alpha EV67 667Mhz w/ 2GB ECC
32bit PCI: ATI Radeon 9100 (DRI works!)
32bit PCI: Generic Firewire 400 card
64bit PCI: BCM5703 Gig-E (Compaq NC7771)
64bit PCI: Sil3124 SATA w/ mdadm RAID1 (pair of WD VelociRaptors)
Back to top
View user's profile Send private message
nlsa8z6zoz7lyih3ap
Guru
Guru


Joined: 25 Sep 2007
Posts: 388
Location: Canada

PostPosted: Fri Jan 18, 2013 4:53 am    Post subject: Reply with quote

Have you tried
Code:
USE="bootstrap" emerge -1v =gcc-4.5.4
?

It has worked for me when I have had troubles compiling gcc, of course there is no guarantee that it will for you.

Added in edit:
PS I don't think that the troubles with gcc-4.6.11 amount to very much. I also don't think that they are the problem here.

However many months ago I installed gcc-4.6.x, used it a while, deleted 4.5.x and then decided to switch back to 4.5.x. (A bad idea I think in retrospect.).

I had to use the USE="bootstrap" trick to get it to work. Hope that it works for you.
Back to top
View user's profile Send private message
Lupin_the_3rd
Apprentice
Apprentice


Joined: 03 Apr 2005
Posts: 168

PostPosted: Fri Jan 18, 2013 2:30 pm    Post subject: Reply with quote

nlsa8z6zoz7lyih3ap wrote:
Have you tried
Code:
USE="bootstrap" emerge -1v =gcc-4.5.4

I gave it a try, it dies with same error.
_________________
Compaq XP1000 Alpha EV67 667Mhz w/ 2GB ECC
32bit PCI: ATI Radeon 9100 (DRI works!)
32bit PCI: Generic Firewire 400 card
64bit PCI: BCM5703 Gig-E (Compaq NC7771)
64bit PCI: Sil3124 SATA w/ mdadm RAID1 (pair of WD VelociRaptors)
Back to top
View user's profile Send private message
nlsa8z6zoz7lyih3ap
Guru
Guru


Joined: 25 Sep 2007
Posts: 388
Location: Canada

PostPosted: Fri Jan 18, 2013 5:02 pm    Post subject: Reply with quote

Sorry that it didn't work.

Could your CFLAGS in /etc/make.conf be the problem? If you wish to pursue this possibility, comment them out while trying to compile. You could also
try disabling your personal USE flags by adding the following line to /etc/portage/package.use

Code:
sys-devel/gcc


There also the possibility of trying gcc-4.4.x or
Quote:
USE="vanilla"

At this point I am just shooting in the dark, I should stop because I don't have any more informed suggestions to make.

You might be interested in the following 2 bugs

(1)
Quote:
https://bugs.gentoo.org/show_bug.cgi?id=418383
, and
(2)
Quote:
https://bugs.gentoo.org/show_bug.cgi?id=452768
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Fri Jan 18, 2013 7:31 pm    Post subject: Reply with quote

Make sure your binutils is recent to use it with gcc 4.6 so prior to rebuilding your older gcc version.
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5909

PostPosted: Fri Jan 18, 2013 8:09 pm    Post subject: Reply with quote

wouldn't it be more easier to just keyword the specific version of gcc and keep it?
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
Lupin_the_3rd
Apprentice
Apprentice


Joined: 03 Apr 2005
Posts: 168

PostPosted: Sat Jan 19, 2013 11:51 pm    Post subject: Reply with quote

DaggyStyle wrote:
wouldn't it be more easier to just keyword the specific version of gcc and keep it?

No, because it doesn't work properly. There are known problems with it.

FYI I ended up backing up my /root /home /etc /var and /boot and rebuilt the system from scratch today.
_________________
Compaq XP1000 Alpha EV67 667Mhz w/ 2GB ECC
32bit PCI: ATI Radeon 9100 (DRI works!)
32bit PCI: Generic Firewire 400 card
64bit PCI: BCM5703 Gig-E (Compaq NC7771)
64bit PCI: Sil3124 SATA w/ mdadm RAID1 (pair of WD VelociRaptors)
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5909

PostPosted: Sun Jan 20, 2013 6:28 am    Post subject: Reply with quote

Lupin_the_3rd wrote:
DaggyStyle wrote:
wouldn't it be more easier to just keyword the specific version of gcc and keep it?

No, because it doesn't work properly. There are known problems with it.

FYI I ended up backing up my /root /home /etc /var and /boot and rebuilt the system from scratch today.

define "doesn't work properly. There are known problems with it." please
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
Lupin_the_3rd
Apprentice
Apprentice


Joined: 03 Apr 2005
Posts: 168

PostPosted: Sun Jan 20, 2013 7:06 pm    Post subject: Reply with quote

DaggyStyle wrote:
Lupin_the_3rd wrote:
DaggyStyle wrote:
wouldn't it be more easier to just keyword the specific version of gcc and keep it?

No, because it doesn't work properly. There are known problems with it.

FYI I ended up backing up my /root /home /etc /var and /boot and rebuilt the system from scratch today.

define "doesn't work properly. There are known problems with it." please

Fails to compile a lot of things, including itself. There are known issues, I'm sure they can be found on bugs.gentoo.org if you do a search. Hence the reason its stable package status was "revoked". Perhaps the issues are specific to alpha architecture, since 4.6.3 is still marked as stable on other archs. I'm not a developer, I can't speak to the technical nature of the failures, but as a user, I can say with confidence that it doesn't work properly on alpha.
_________________
Compaq XP1000 Alpha EV67 667Mhz w/ 2GB ECC
32bit PCI: ATI Radeon 9100 (DRI works!)
32bit PCI: Generic Firewire 400 card
64bit PCI: BCM5703 Gig-E (Compaq NC7771)
64bit PCI: Sil3124 SATA w/ mdadm RAID1 (pair of WD VelociRaptors)
Back to top
View user's profile Send private message
nlsa8z6zoz7lyih3ap
Guru
Guru


Joined: 25 Sep 2007
Posts: 388
Location: Canada

PostPosted: Sun Jan 20, 2013 8:24 pm    Post subject: Reply with quote

Quote:
Fails to compile a lot of things, including itself.


I am sorry that I wasn't able to help you. However my curiosity about this has been piqued. I understand that 4.6.x won't compile 4.5.x for you and certainly understand that such things can happen. However if you also mean that 4.6.3 won't compile 4.6.3 ( i.e. itself), that is indeed rather bizarre (and a fascinating question to look into) It is hard to see that upstream would even release 4.6.3 in that state, so perhaps the problems lies elsewhere in the toolchain.

There are some experiments that would address these questions, and if they interest you enough to try them, I would be very interested in learning the results.

(1) Rebuild the entire toolchain with
Code:
emerge -e --keep-going=y @system
, noting what doesn't compile and then trying separately to compile the failed packages with
Code:
emerge -1 packages
afterwards. Then try to emerge gcc-4.5.x

(2) Trying (1) with USE="vanilla" added to gcc."

I just say these things because I like to "play" with my system and have borked gcc installations several times over a 12 year period with gentoo,
always when trying to downgrade. In all of these cases I eventually succeeded and in no cases was it the fault of gcc.

Now if you have reinstalled these may not be possible to perform, but I would be most interested if in the new installation, 4.6.3 won't compile 4.6.3
and if in the new installation, 4.6.3 won't compile 4.5.x.

I certainly understand that you might not want to pursue these questions, but if you do, the results would interest me.
Back to top
View user's profile Send private message
Lupin_the_3rd
Apprentice
Apprentice


Joined: 03 Apr 2005
Posts: 168

PostPosted: Mon Jan 21, 2013 1:59 am    Post subject: Reply with quote

nlsa8z, thank you for the interesting commands. Unfortunately, I needed to get my system back up and running quickly, so I've already re-built it all from scratch.

I'd love to be able to test scenarios like this, unfortunately the Gentoo install CD for alpha platforms is missing the drivers for both the Sil3124 SATA card, and the Firewire card in my system - the two storage interfaces to which I have drives attached (I don't use the crufty old parallel SCSI stuff anymore). I'd love to do gcc toolchain testing, but I can't afford to bork my main system.

If/when the devs get the SATA_SIL24 driver added to the install CD, along with FIREWIRE_CORE, FIREWIRE_OHCI, and FIREWIRE_SBP2, I'll be much better equipped to do testing and contribute to the Gentoo project. I've filed feature enhancement bug reports recently to get these drivers added to the CD, so hopefully the devs are able to do that in the near future.

Thanks
_________________
Compaq XP1000 Alpha EV67 667Mhz w/ 2GB ECC
32bit PCI: ATI Radeon 9100 (DRI works!)
32bit PCI: Generic Firewire 400 card
64bit PCI: BCM5703 Gig-E (Compaq NC7771)
64bit PCI: Sil3124 SATA w/ mdadm RAID1 (pair of WD VelociRaptors)
Back to top
View user's profile Send private message
nlsa8z6zoz7lyih3ap
Guru
Guru


Joined: 25 Sep 2007
Posts: 388
Location: Canada

PostPosted: Mon Jan 21, 2013 2:47 am    Post subject: Reply with quote

Quote:
lsa8z, thank you for the interesting commands. Unfortunately, I needed to get my system back up and running quickly, so I've already re-built it all from scratch.


Thanks for getting back to me. I do understand the need to get a system up and running to do other things.

I have been using Gentoo for 12 years and also have on occasion been frustrated by breakage when I need to do other important things.

Nonetheless I also really enjoy playing with Gentoo when I do have spare time, and 99% of the time it runs really well.

PS To avoid being unable to do useful things when my "playing" breaks something, I keep 2 /root partitions and 2 /boot partitions
and 1 /home partition.

One has the currrent updated gentoo. After it has been thoroughly used for a week and found to be OK, I copy it over to the second route and boot
before doing another update on the first. If an update breaks something, I just copy the second route and boot back to the first and carry on with something that has already been proven to work. Most of this is semi-automated with simple scripts that I wrote for my own situation,
so that /etc/fstab etc are appropriately reset to whatever partition they are on. You may or may not mount the /home partition on your backup route, depending on your wishes. If you do, you will always have at least one working system. With something like a gcc or glibc update, I usually try it for a couple of weeks before copying it over to my second route partition.

It is a bit of fuss to set this all up, but it has saved me many hours of frustration over the years.

Well, here's to hoping that gcc-4.6.x is soon stable on all architectures.
Back to top
View user's profile Send private message
rhill
Retired Dev
Retired Dev


Joined: 22 Oct 2004
Posts: 1629
Location: sk.ca

PostPosted: Tue Jan 29, 2013 3:47 am    Post subject: Reply with quote

Yeah, looks like 4.6 can't build itself on alpha. Follow along on bug 454426.
_________________
by design, by neglect
for a fact or just for effect
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3432
Location: Gainesville, Florida

PostPosted: Tue Jan 29, 2013 2:49 pm    Post subject: Reply with quote

FWIW, as a long-time Gentoo ~Arch user, I've always made it a practice to occasionally make a quickpkg of my currently working toolchain packages such as gcc, binutils, libtool, and glibc.
_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
OpenRC Gentoo ~amd64 plasma, glibc-2.36-r7, gcc-13.2.1_p20230304
kernel-6.7.2 USE=experimental python3_11
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Wed Jan 30, 2013 7:08 am    Post subject: Reply with quote

An easier way to have something to roll back to, is to use FEATURES=buildpkg.
Back to top
View user's profile Send private message
Lupin_the_3rd
Apprentice
Apprentice


Joined: 03 Apr 2005
Posts: 168

PostPosted: Wed Jan 30, 2013 4:11 pm    Post subject: Reply with quote

wrc1944 wrote:
FWIW, as a long-time Gentoo ~Arch user, I've always made it a practice to occasionally make a quickpkg of my currently working toolchain packages such as gcc, binutils, libtool, and glibc.

steveL wrote:
An easier way to have something to roll back to, is to use FEATURES=buildpkg.

I've been using Gentoo on my Alphas since probably 2008, and this is the first I've heard of either of these capabilities. What useful and outstanding features! Thanks for sharing.
_________________
Compaq XP1000 Alpha EV67 667Mhz w/ 2GB ECC
32bit PCI: ATI Radeon 9100 (DRI works!)
32bit PCI: Generic Firewire 400 card
64bit PCI: BCM5703 Gig-E (Compaq NC7771)
64bit PCI: Sil3124 SATA w/ mdadm RAID1 (pair of WD VelociRaptors)
Back to top
View user's profile Send private message
CleanTestr
n00b
n00b


Joined: 15 Jan 2013
Posts: 47
Location: somewhere in Rural Nebraska, USA

PostPosted: Thu Apr 11, 2013 3:40 pm    Post subject: Reply with quote

As a long-time Linux user (since Minix/286 vs 1.3.5: floppy distro) I've found it useful to do 'stage4' installs with the like of:
Code:

cd /home
tar cvjp --exclude=/dev --exclude=/proc --exclude=/sys --exclude=/stage4.tar.bz2 --file stage4.tar.bz2 /


I 'tend' to keep stage4 for a non-xorg and a with-xorg 'working set'. /home, /boot, /tmp, /var/tmp, /usr/portage/distfiles are all separate partitions; I have 3 /root partitions of 12Gig each (one for 'working Xorg', one for 'working non-Xorg', and one for development).

My latest gaffe was to 'allow' a --ask --depclean to remove my gcc :o

..and when all else fails, unplug the battery..
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