View previous topic :: View next topic |
Author |
Message |
esa n00b
Joined: 17 Mar 2009 Posts: 33
|
Posted: Mon May 02, 2016 6:21 am Post subject: GCC no more installed-[SOLVED] |
|
|
Dear,
I uninstalled GCC by mistake.
My fault !
Now, I get :
gcc-config -l
* gcc-config: Active gcc profile is invalid!
emerge --info
!!! No gcc found. You probably need to 'source /etc/profile'
!!! to update the environment of this terminal and possibly
!!! other terminals also.
Which procedure to follow to install it again?
Thank
Last edited by esa on Wed May 11, 2016 8:52 pm; edited 1 time in total |
|
Back to top |
|
|
The Doctor Moderator
Joined: 27 Jul 2010 Posts: 2678
|
Posted: Mon May 02, 2016 6:30 am Post subject: |
|
|
Do you have another Gentoo machine available?
If so you want to build gcc on that machine with the binary package option set (-B) and then copy the binary gcc package onto your broken machine (-k) and emerge the binary package. It will be put in the /usr/portage/packages directory
If you don't, my recommendation would be to make a gentoo chroot. Just download and untar a fresh stage3 in an empty directory and use that to build your binary package. Do NOT overwrite your current root as that will make it worse. You can bind the /usr/portage directory between the host and chroot to save syncing and save the trouble of copying the package. _________________ First things first, but not necessarily in that order.
Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box. |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Mon May 02, 2016 10:18 am Post subject: |
|
|
you can use a livecd, mount your root on it and
PKGDIR="/mnt/gentoo/usr/portage/packages" quickpkg gcc
it will create a binary of the livecd gcc.
now chroot and ask portage to install that version (using -B option), if any deps are needed, grab them from another shell the same way (PKGDIR=...) |
|
Back to top |
|
|
Buffoon Veteran
Joined: 17 Jun 2015 Posts: 1369 Location: EU or US
|
Posted: Mon May 02, 2016 10:32 am Post subject: |
|
|
Is there a gcc in liveCD? |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Mon May 02, 2016 10:47 am Post subject: |
|
|
good question Buffon
now that you ask, i doubt, gcc might comes from the stage3 file, been a long time i didn't use any. |
|
Back to top |
|
|
esa n00b
Joined: 17 Mar 2009 Posts: 33
|
Posted: Thu May 05, 2016 6:32 am Post subject: |
|
|
Dear,
Thank a lot for your advices.
I tried several time but I'm not able to compile GCC in the CHROOT.
I also take several binary GCC on "tinderbox.dev.gentoo.org" and untar on my root, but it says Invalid profile after I select it "gcc-config 1"
Code: | gcc-config -l
* gcc-config: Active gcc profile is invalid!
[1] i486-pc-linux-gnu-4.8.3
|
My system Hard disk is like this :
SDA1 = /boot (grub) --> I don't need to mount this partition.
SDA2 = SWAP
SDA3 = root + usr
SDA4 = Extended
SDA 5 + SDA6 = Home --> I don't need this partition
So, I think I just need the SDA3 in the CHROOT
This is what I have realized :
Boot with the “Minimal boot CD” (last version).
Mount the broken install :
• mount /dev/sda3 /mnt/gentoo
Create a folder for the Chroot which will be used for emerge packages.
• mkdir /mnt/gentoo/home/rescue
Untar stage 3 which is on the Hard Dik root :
• cd /mnt/gentoo
Remark : it's the stage 3 I used to realize my system "stage3-i686-hardened-20151020.tar.bz2"
It's a "hardened" I don't remember why. Is it important to take a similar and how can I check I have a hardened system or profile?
Code: | eselect profile list
Available profile symlink targets:
[1] default/linux/x86/13.0 *
[2] default/linux/x86/13.0/selinux
[3] default/linux/x86/13.0/desktop
[4] default/linux/x86/13.0/desktop/gnome
[5] default/linux/x86/13.0/desktop/gnome/systemd
[6] default/linux/x86/13.0/desktop/kde
[7] default/linux/x86/13.0/desktop/kde/systemd
[8] default/linux/x86/13.0/desktop/plasma
[9] default/linux/x86/13.0/desktop/plasma/systemd
[10] default/linux/x86/13.0/developer
[11] default/linux/x86/13.0/systemd
[12] hardened/linux/x86
[13] hardened/linux/x86/selinux
[14] hardened/linux/musl/x86
[15] default/linux/uclibc/x86
[16] hardened/linux/uclibc/x86 |
• tar xpvf stage3-i686* -C /mnt/gentoo/home/rescue
• cp /etc/resolv.conf /mnt/gentoo/home/rescue/etc
• mount --bind /proc /mnt/gentoo/home/rescue/proc
• mount --bind /sys /mnt/gentoo/home/rescue/sys
• mount --bind /dev /mnt/gentoo/home/rescue/dev
• mount --bind /dev/pts /mnt/gentoo/home/rescue/dev/pts
Mount bind portage :
• mkdir /mnt/gentoo/home/rescue/usr/portage
• mount -o bind /mnt/gentoo/usr/portage /mnt/gentoo/home/rescue/usr/portage
copy :
• cp -r /mnt/gentoo/etc/portage/* /mnt/gentoo/home/rescue/etc/portage
Chroot :
• chroot /mnt/gentoo/home/rescue
• source /etc/profile
• env-update
Change make.conf so portage will create binary packages
FEATURES="buildpkg"
• Emerge –buildpkgonly -av gcc
I didn't do it already, but next step would be :
Mount the broken system to /mnt/Gentoo
• mount /dev/sda3 /mnt/gentoo
• chroot /mnt/ gentoo
• source /etc/profile
• env-update
Emerge : emerge -k sys-devel/gcc
EMERGE GCC in CHROOT ERROR :
Code: |
ERROR: compile
ERROR: sys-devel/gcc-4.9.3::gentoo failed (compile phase):
emake failed
If you need support, post the output of `emerge --info '=sys-devel/gcc-4.9.3::gentoo'`,
the complete build log and the output of `emerge -pqv '=sys-devel/gcc-4.9.3::gentoo'`.
The complete build log is located at '/var/tmp/portage/sys-devel/gcc-4.9.3/temp/build.log'.
The ebuild environment file is located at '/var/tmp/portage/sys-devel/gcc-4.9.3/temp/environment'.
Working directory: '/var/tmp/portage/sys-devel/gcc-4.9.3/work/build'
S: '/var/tmp/portage/sys-devel/gcc-4.9.3/work/gcc-4.9.3'
ERROR: other
|
Also tried with gcc- 4.1.2 :
/var/tmp/portage/sys-devel/gcc-4.1.2/work/gcc-build-logs.tar.bz2 in your bug report.
Code: | QA Notice: Package triggers severe warnings which indicate that it
may exhibit random runtime failures.
^[[01m^[[K/var/tmp/portage/sys-devel/gcc-4.1.2/work/gcc-4.1.2/libiberty/md5.c:113:3:^[[m^[[K ^[[01;35m^[[Kwarning: ^[[m$
|
Thank for help |
|
Back to top |
|
|
ONEEYEMAN Advocate
Joined: 01 Mar 2005 Posts: 3610
|
Posted: Thu May 05, 2016 2:54 pm Post subject: |
|
|
Hi,
You didn't posted an actual error.
Please post the results of
Code: |
emerge --info '=sys-devel/gcc-4.9.3::Gentoo
emerge -pqv '=sys-devel/gcc-4.9.3::Gentoo
cat /var/tmp/portage/sys-devel/gcc-4.9.3/temp/build.log
|
as requested by the error message.
Thank you. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54244 Location: 56N 3W
|
Posted: Thu May 05, 2016 6:35 pm Post subject: |
|
|
esa,
Fix My Gentoo should work for you.
It describes how to rescue a system that won't boot. Its simpler if your system boots but you can use it as is if you prefer. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
esa n00b
Joined: 17 Mar 2009 Posts: 33
|
Posted: Wed May 11, 2016 8:52 pm Post subject: |
|
|
Dear,
Finally, I am able to compile the gcc 4.9.3.
I followed the same procedure but I downloaded the last stage 3 (in place of using my original stage3).
Maybe it wasn't the cause of the issue.
Thank for your help |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Wed May 11, 2016 9:39 pm Post subject: |
|
|
esa wrote: | Code: | gcc-config -l
* gcc-config: Active gcc profile is invalid!
[1] i486-pc-linux-gnu-4.8.3 |
|
esa ... for the sake of completeness ... the issue here is that the previous 'profile' is gone, and you hadn't set it to the available profile (via 'gcc-config i486-pc-linux-gnu-4.8.3'). Doing so whould have resolved the issue (and saved you having to take the stage3 route).
Also, keeping a binpkg handy is ... well ... handy, 'quickpkg =sys-devel/gcc-4.9.3' will then allow you to 'emerge --usepkgonly sys-devel/gcc-4.9.3'.
best ... khay |
|
Back to top |
|
|
|