View previous topic :: View next topic |
Author |
Message |
mgwmgwmgw n00b
Joined: 27 Dec 2006 Posts: 56
|
Posted: Tue Nov 10, 2009 8:28 pm Post subject: Broken GCC [SOLVED] |
|
|
Something made GCC not work anymore.
Is it possible to tell emerge to emerge GCC
without assuming that there is a working
compiler in place? How can I do that?
I have not been able to figure out
where I can download the GCC binaries from.
Thanks,
Mary-Anne
Last edited by mgwmgwmgw on Wed Nov 18, 2009 4:49 am; edited 1 time in total |
|
Back to top |
|
|
bonzai.it n00b
Joined: 09 Oct 2009 Posts: 47 Location: Somewhere in the Apennines
|
Posted: Tue Nov 10, 2009 9:22 pm Post subject: |
|
|
Please post gcc-config -l and emerge --info. _________________ " ... I have became comfortably dumb ... " |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54236 Location: 56N 3W
|
Posted: Tue Nov 10, 2009 9:22 pm Post subject: |
|
|
mgwmgwmgw,
You can get binary tarballs from tinderbox.dev.gentoo.org.
Put the tarball in your / (root) dir and untar it there. Ignore the warning at the end of the tar operation.
Use gcc-config to select a gcc, then build gcc for yourself. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
few Guru
Joined: 03 Mar 2008 Posts: 448
|
Posted: Tue Nov 10, 2009 10:02 pm Post subject: |
|
|
Before using a binary tell us first what happened to your gcc or what the symptoms are in case you don't know the former.
If you use the binary, don't untar it. Put it in /usr/portage/packages and add -K to the emerge options. |
|
Back to top |
|
|
mgwmgwmgw n00b
Joined: 27 Dec 2006 Posts: 56
|
Posted: Wed Nov 11, 2009 11:09 pm Post subject: |
|
|
I was doing emerge world and I ran out of disk,
so I did emerge --depclean.
After this gcc and similar refused to work.
So then I went to /usr/bin and renamed all the gcc to badgcc etc.
Then I tried to emerge gcc again
and it had no way to compile without an existing compiler.
So I renamed them back.
I tried putting a CD into my machine
and the machine froze up.
I tried to ssh in and it would not respond.
Then I power-cycled.
Now the machine came up but X refuses to work.
Then I tried revdep-rebuild
and I got a lot of complaints about missing libstdc++
so I emerged libstdc++ and that worked,
but it seems to be the wrong version, 5 instead of 6.
I also got a lot of complaints about missing libdb,
and I saw some discussion which says I need to
rebuild each thing that complains about that,
but it is a LOT more than the three in the discussion.
So now I am trying again to emerge gcc so I can tell you
very exactly what the error message is.
This is what I get when I save the emacs buffer
and transfer it to another machine.
I think the color codings got mangled. Sorry.
Code: | checking whether ln -s works... yes
checking for i686-pc-linux-gnu-gcc... i686-pc-linux-gnu-gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
[31;01m*[0m
[31;01m*[0m ERROR: sys-devel/gcc-4.3.4 failed.
[31;01m*[0m Call stack:
[31;01m*[0m ebuild.sh, line 49: Called src_compile
[31;01m*[0m environment, line 4879: Called toolchain_src_compile
[31;01m*[0m environment, line 5405: Called gcc_src_compile
[31;01m*[0m environment, line 3077: Called gcc_do_configure
[31;01m*[0m environment, line 2790: Called die
[31;01m*[0m The specific snippet of code:
[31;01m*[0m "${S}"/configure "$@" || die "failed to run configure";
[31;01m*[0m The die message:
[31;01m*[0m failed to run configure
[31;01m*[0m
[31;01m*[0m If you need support, post the topmost build error, and the call stack if relevant.
[31;01m*[0m A complete build log is located at '/var/log/portage/sys-devel:gcc-4.3.4:20091111-224947.log'.
[31;01m*[0m The ebuild environment file is located at '/var/tmp/portage/sys-devel/gcc-4.3.4/temp/environment'.
[31;01m*[0m
>>> [31;01mFailed[39;49;00m to emerge [32msys-devel/gcc-4.3.4[39;49;00m, Log file:
>>> '[32m/var/log/portage/sys-devel:gcc-4.3.4:20091111-224947.log[39;49;00m'
|
Also, when I run gcc with no parameters from the command-line, as root, I get the error
Quote: | gcc-config: error: could not run/locate 'gcc' |
So...I am wondering whether the best solution
is to download the gcc binaries.
What do you think?
What other information would be helpful?
Mary-Anne |
|
Back to top |
|
|
Mike Hunt Watchman
Joined: 19 Jul 2009 Posts: 5287
|
Posted: Wed Nov 11, 2009 11:50 pm Post subject: |
|
|
Yep, fetch a sys-devel/gcc from tinderbox and untar it on /
run env-update && source /etc/profile
and
gcc-config -l
and set your gcc if it isn't set correctly
then |
|
Back to top |
|
|
mgwmgwmgw n00b
Joined: 27 Dec 2006 Posts: 56
|
Posted: Thu Nov 12, 2009 6:00 am Post subject: Still no success |
|
|
Thank-you very much for the help.
I have still not succeeded.
I got the file here
http://tinderbox.dev.gentoo.org/default-linux/x86/sys-devel/
and its name was gcc-config not gcc.
My system did not have a /usr/portage/packages.
I had to mkdir it.
Where emerge looks is the value of the $PKGDIR environment variable,
which was already set to /usr/portage/packages
I emerged using
emerge -k gcc-config.
and the emerge died with the message
compiler wrapper.
So then I tried
emerge -ek system
and that failed on
emake || die
So then I unzipped the file manually with
cd /
bzp2 -cd /usr/portage/packages/gcc-config-1.4.1.tbz2 | tar xvf -
followed by
env-update
source /etc/profile
gcc-config -l
and that said
gcc-config: Active gcc profile is invalid!
[1] i386-pc-linux-gnu-3.4.4
[2] i386-pc-linux-gnu-3.4.4.hardened
[3] i386-pc-linux-gnu-3.4.4.hardenednopie
[4] i386-pc-linux-gnu-3.4.4.hardenednopiessp
[5] i386-pc-linux-gnu-3.4.4.hardenednossp
So then I tried to set my gcc with
gcc-config -f i386-pc-linux-gnu-3.4.4
and I got the error
gcc-config: Could not locate 'i386-pc-linux-gnu-gcc-3.4.4' in '/etc/env.d/gcc' !
which is strange because ls shows it there.
So then I tried
emerge -e system
to see whether that would fix the problem
while portage seemed to compile okay,
but zlib died on
emake || die
So then I tried to set my gcc with
gcc-config i386-pc-linux-gnu-3.4.4
and I got the error
gcc-config: Could not locate 'i386-pc-linux-gnu-gcc-3.4.4' in '/etc/env.d/gcc' !
So then I tried
gcc-config config-i686-pc-linux-gnu
and got the error
gcc-config: Profile does not exist or invalid setting for /etc/envd/gcc/config-i686-pc-linux-gnu
Switching native-compiler to config-i686-pc=linux-gnu ...
ls: cannot access /etc/env.d/gcc/i686-pc-linux-gnu-*: No such file or directory.
Your gcc has a big with GCC_SPECS.
Please re-emerge gcc.
https://bugs.gentoo.org/68395
/usr/bin/gcc-config: line 154: ///gcc: No such file or directory
>>> Regenerating /etc/ld.so.cache...
If you intend to use the gcc from the new profile in an already
running shell, please remember to do:
# source /etc/profile
So I went to the referenced bug report
and it said to do
unset GCC_SPECS
emerge gcc
So I tried that,
and the emerge died with the message
failed to run configure.
So...what did I miss? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54236 Location: 56N 3W
|
Posted: Thu Nov 12, 2009 7:54 pm Post subject: |
|
|
mgwmgwmgw,
You fetched the wrong version of gcc from the tinderbox. i386...3.4.* is very old. It will not work with a current glibc.
You need a i686...4.x.x version.
It looks like you did all the right things but with the wrong tarball. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
mgwmgwmgw n00b
Joined: 27 Dec 2006 Posts: 56
|
Posted: Thu Nov 12, 2009 9:10 pm Post subject: |
|
|
Thanks again.
There are no i686 binaries that look like the correct choice.
I tried some and none of them work.
What URL do I get them from?
Mary-Anne |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54236 Location: 56N 3W
|
Posted: Fri Nov 13, 2009 9:01 pm Post subject: |
|
|
mgwmgwmgw,
gcc is there.
Thats the i686 gcc.
Untar it to your / (root) Code: | tar -xjpf gcc-4.3.4.tbz2 -C / | the p option is essential to preserve the permissions, or the execute permission will be removed. Its just like a minature stage3 tarball.
When thats done, useto select your new gcc. Lastly use gcc to emerge gcc, so you are back where yu expected to be. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
sera Retired Dev
Joined: 29 Feb 2008 Posts: 1017 Location: CET
|
Posted: Sat Nov 14, 2009 9:34 am Post subject: |
|
|
few wrote: | If you use the binary, don't untar it. Put it in /usr/portage/packages and add -K to the emerge options. |
That's the best one can do with gentoo package files (tbz2). BTW, it's a capital K. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54236 Location: 56N 3W
|
Posted: Sat Nov 14, 2009 2:27 pm Post subject: |
|
|
Without gcc, you cannot always use emerge. Not even emerge -K
If you don't have /usr/portage/packages, it needs a lot more than putting the tarball there to use emerge -K _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
mgwmgwmgw n00b
Joined: 27 Dec 2006 Posts: 56
|
Posted: Sun Nov 15, 2009 4:21 am Post subject: |
|
|
Excellent progress.
I did what was suggested in the previous post
and gcc successfully emerged.
I was not able to get revdep-rebuild to work
until I removed some of the extra gcc libraries
I had untarred and until I manually unmasked
some things.
Revdep-rebuild is running, and taking a long time.
After it is done I plan to
emerge -sync
and emerge ... world.
I'll post again when I know whether that works too.
Thanks again for all the help.
Mary-Anne |
|
Back to top |
|
|
mgwmgwmgw n00b
Joined: 27 Dec 2006 Posts: 56
|
Posted: Wed Nov 18, 2009 4:49 am Post subject: Success! |
|
|
It took a while, but it worked.
Thanks again. |
|
Back to top |
|
|
Mike Hunt Watchman
Joined: 19 Jul 2009 Posts: 5287
|
Posted: Wed Nov 18, 2009 4:53 am Post subject: |
|
|
Awesome, glad you got that working. |
|
Back to top |
|
|
MLongmire n00b
Joined: 25 Apr 2005 Posts: 4 Location: New Hampshire, USA
|
Posted: Mon Jan 21, 2013 11:55 pm Post subject: |
|
|
For me, I just had to set the current gcc.
Code: | gcc-config x86_64-pc-linux-gnu-4.6.3
| Then compiles worked fine.
I think the last emerge that upgraded gcc caused this. |
|
Back to top |
|
|
P.Kosunen Guru
Joined: 21 Nov 2005 Posts: 309 Location: Finland
|
Posted: Sun Feb 08, 2015 3:27 pm Post subject: |
|
|
MLongmire wrote: | For me, I just had to set the current gcc. |
Just had same error and this worked for me also. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54236 Location: 56N 3W
|
Posted: Sun Feb 08, 2015 5:34 pm Post subject: |
|
|
P.Kosunen, MLongmire,
Its not the upgrade of gcc that casues this, its the --depclean afterwards.
The process goes like this ... emerge -uD @world pulls in a new gcc.
emerge --depclean remeves the old but still active gcc.
You notice that emerge/gcc no longer works.
This is because your new gcc is not active until you select it.. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
krenshala Tux's lil' helper
Joined: 28 Jan 2006 Posts: 85 Location: Austin TX, NorAm, Sol III
|
Posted: Mon Sep 12, 2016 8:08 pm Post subject: |
|
|
NeddySeagoon wrote: | mgwmgwmgw,
gcc is there.
Thats the i686 gcc.
Untar it to your / (root) Code: | tar -xjpf gcc-4.3.4.tbz2 -C / | the p option is essential to preserve the permissions, or the execute permission will be removed. Its just like a minature stage3 tarball.
When thats done, useto select your new gcc. Lastly use gcc to emerge gcc, so you are back where yu expected to be. |
Just wanted to post that the final step above (running gcc-config then emerge gcc) fixed the broken gcc I was sufferring from after trying to upgrade java (iced-tea a while ago). So nice to not see gcc say it can't configure stuff.
gcc-config informed me I had an invalid gcc config selected, which is probably why this was all I had to do. I'm guessing Neddy's post above is what I suffered from as well. Damn PEBKAC errors. _________________ krenshala
:wq |
|
Back to top |
|
|
|