Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved]emerge --depclean deleted gcc-4.6.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
LoTeK
Apprentice
Apprentice


Joined: 26 Jul 2012
Posts: 270

PostPosted: Wed Jan 09, 2013 9:26 am    Post subject: [solved]emerge --depclean deleted gcc-4.6.3 Reply with quote

hi,
in the morning i ran:
Code:
emerge --update --deep --with-bdeps=y world
emerge --depclean
revdep-rebuild
and updated gcc. But depclean removed the older version 4.6.3 (I read that one has to be cautious with emerge --depclean and I guess it was rather stupid to let depclean remove gcc :) but I don't understand why, because emerge --update --deep world installed the new version..!?)

Now I can't compile packages and at the moment even worse I can't compile my C-programs, I've tried to reinstall gcc-4.6.3 but it doesn't compile, what can I do now?

output of gcc-config -l:
Code:
 * gcc-config: Active gcc profile is invalid!

 [1] x86_64-pc-linux-gnu-4.6.3
 [2] x86_64-pc-linux-gnu-4.6.3-hardenednopie
 [3] x86_64-pc-linux-gnu-4.6.3-hardenednopiessp
 [4] x86_64-pc-linux-gnu-4.6.3-hardenednossp
 [5] x86_64-pc-linux-gnu-4.6.3-vanilla


error message:
Code:
configure: error: in `/var/tmp/portage/sys-devel/gcc-4.6.3/work/build':
configure: error: C compiler cannot create executables
See `config.log' for more details.
 * ERROR: sys-devel/gcc-4.6.3 failed (compile phase):
 *   failed to run configure
 *
 * Call stack:
 *     ebuild.sh, line   93:  Called src_compile
 *   environment, line 4073:  Called toolchain_src_compile
 *   environment, line 4729:  Called gcc_do_configure
 *   environment, line 2302:  Called die
 * The specific snippet of code:
 *       "${S}"/configure "$@" || die "failed to run configure";
 *
 * If you need support, post the output of `emerge --info '=sys-devel/gcc-4.6.3'`,
 * the complete build log and the output of `emerge -pqv '=sys-devel/gcc-4.6.3'`.
 *
 * Please include /var/tmp/portage/sys-devel/gcc-4.6.3/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.6.3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/gcc-4.6.3/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-devel/gcc-4.6.3/work/build'
 * S: '/var/tmp/portage/sys-devel/gcc-4.6.3/work/gcc-4.6.3'

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

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

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

 *
 * LTO support is still experimental and unstable.
 * Any bugs resulting from the use of LTO will not be fixed.
 *
 * ERROR: sys-devel/gcc-4.6.3 failed (compile phase):
 *   failed to run configure
 *
 * Call stack:
 *     ebuild.sh, line   93:  Called src_compile
 *   environment, line 4073:  Called toolchain_src_compile
 *   environment, line 4729:  Called gcc_do_configure
 *   environment, line 2302:  Called die
 * The specific snippet of code:
 *       "${S}"/configure "$@" || die "failed to run configure";
 *
 * If you need support, post the output of `emerge --info '=sys-devel/gcc-4.6.3'`,
 * the complete build log and the output of `emerge -pqv '=sys-devel/gcc-4.6.3'`.
 *
 * Please include /var/tmp/portage/sys-devel/gcc-4.6.3/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.6.3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/gcc-4.6.3/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-devel/gcc-4.6.3/work/build'
 * S: '/var/tmp/portage/sys-devel/gcc-4.6.3/work/gcc-4.6.3'


if I try to compile a program:
Code:
neo@M2-01 ~ $ gcc truthtable.c -o truthtable -std=gnu99
 * gcc-config: Could not get portage CHOST!
 * gcc-config: You should verify that CHOST is set in one of these places:
 * gcc-config:  - //etc/portage/make.conf
 * gcc-config:  - active environment
gcc-config: error: could not get compiler binary path: No such file or directory


Last edited by LoTeK on Wed Jan 09, 2013 10:44 am; edited 1 time in total
Back to top
View user's profile Send private message
LoTeK
Apprentice
Apprentice


Joined: 26 Jul 2012
Posts: 270

PostPosted: Wed Jan 09, 2013 10:40 am    Post subject: Reply with quote

well I just tried
Code:
gcc-config -f 1
and it worked.. now I can compile again, but I don't really understand why, so solved, but if anyone could explain it would be appreciated :)

Last edited by LoTeK on Wed Jan 30, 2013 10:18 pm; edited 1 time in total
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 1:45 am    Post subject: Reply with quote

gcc-config will show a * next to the active profile. You have to manually select a profile using gcc-config. So if you upgraded gcc and removed the old version and did not select a new profile in between, you'll get the error that you did.
_________________
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
Pindrop
Apprentice
Apprentice


Joined: 09 Jul 2002
Posts: 165
Location: Virginia, USA

PostPosted: Wed Jan 30, 2013 5:45 pm    Post subject: Reply with quote

LoTeK wrote:
well I just tried
Code:
gcc -config -f 1
and it worked.. now I can compile again, but I don't really understand why, so solved, but if anyone could explain it would be appreciated :)
Awesome, this solution worked for me too. Minor note: there is a space between gcc and -config that shouldn't be there. :twisted:
Back to top
View user's profile Send private message
LoTeK
Apprentice
Apprentice


Joined: 26 Jul 2012
Posts: 270

PostPosted: Wed Jan 30, 2013 10:18 pm    Post subject: Reply with quote

Did you have the same problem?
oh yes, sorry :oops:, I corrected the mistake, now he lives only in your quote :)
_________________
"I want to see gamma rays! I want to hear X-rays! Do you see the absurdity of what I am? I can't even express these things properly because I have to conceptualize complex ideas in this stupid limiting spoken language!"
Back to top
View user's profile Send private message
Allan Wegan
n00b
n00b


Joined: 06 Apr 2012
Posts: 23

PostPosted: Sat Feb 09, 2013 9:53 am    Post subject: Reply with quote

"gcc-config 1" worked for me (did not had to force it *g*).

But surely, that could have been handled better from a usability-point-of-view. Its not that i had expected the regular update procedure (and "emerge --depclean" is recommended by emerge after @world updates) to break the following revdep-rebuild...

Maybe, unmerging software currently "selected" to be used (especially by portage itself!) should not be that easy (it's almost automatic now). There should be a hint, that the package is in use and how to change that. In the case of gcc it should mention use of gcc-config to select another version and refuse to unmerge the currently selected one.

And of course, "emerge --depclean" should know about packages currently in use and not suggest their removal (at least for the packages needed by portage itself).
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Sat Feb 09, 2013 10:08 am    Post subject: Reply with quote

http://www.gentoo.org/doc/en/gcc-upgrading.xml
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6095
Location: Dallas area

PostPosted: Sat Feb 09, 2013 11:15 am    Post subject: Reply with quote

when in doubt, run emerge and depclean with the -p flag
BEFORE actually emerging or deleting. Yes it takes a little more time
but saves much aggravation.
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
Allan Wegan
n00b
n00b


Joined: 06 Apr 2012
Posts: 23

PostPosted: Sat Feb 09, 2013 7:40 pm    Post subject: Reply with quote

Anon-E-moose wrote:
when in doubt, run emerge and depclean with the -p flag
BEFORE actually emerging or deleting. Yes it takes a little more time
but saves much aggravation.


I did use emerge -vatDuN and therefore saw, that gcc was about to be updated along with 30+ other packages. I even added the new and default-deselected cups use flag, introduced in some packages, to my make.conf avoiding breaking the printing functionality. I also researched udev and decided to just disable that use flag where it got newly introduced - do not know, if that will break something or not as i just did not find enough information about it (but had a bad feeling about udev trying to sneak into the GPU driver. Looks like udev is building up dependencies to make itself indispensable before becomming unseparateable from systemd)...

I saw the old gcc in the depclean list afterwards and thought "well, i just upgraded -> the old one is no longer needed".
I use Gentoo for only two years now and never used gcc-config before. The encountered behaviour was surprising and showed just once again that updating Gentoo is a lot more risky than updating other Distributions.

I really like Gentoo and will stay with it. Only wished updates would be less surprising.
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