View previous topic :: View next topic |
Author |
Message |
juanbobo n00b
Joined: 22 Sep 2007 Posts: 39
|
Posted: Tue Dec 15, 2009 7:39 pm Post subject: What to recompile when moving to a new version of gcc? |
|
|
When changing your default version of gcc are there any general guidelines for what you should recompile to ensure you don't have any linking or runtime incompatibilities? I've run into issues before, sometimes needing to recompile kdelibs, but as I have not tested all software on my system I can't know what is potentially broken. What does fix_libtool_files.sh actually solve? |
|
Back to top |
|
|
Sade Guru
Joined: 22 Mar 2005 Posts: 406 Location: Netherlands - Eindhoven
|
|
Back to top |
|
|
figueroa Advocate
Joined: 14 Aug 2005 Posts: 2964 Location: Edge of marsh USA
|
Posted: Sun Jan 17, 2010 8:19 pm Post subject: |
|
|
The answer "emerge -DuNav" seems to be seriously in conflict with the gcc upgrade guide which says:
Quote: | To be completely safe that your system is in a sane state, you must rebuild the toolchain and then world to make use of the new compiler.
Code Listing 2.2: Rebuilding system
# emerge -eav system
# emerge -eav world
|
Not doing emerge -e will leave almost everything as originally compiled with the older gcc version.
Now, it seems to me that the author of the gcc upgrade guide has no concern for redundancy and time it takes to follow the instructions at 2.2, but what else is an ordinary user who needs a stable system to do?
If not as in 2.2, why not? _________________ Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Sun Jan 17, 2010 8:23 pm Post subject: |
|
|
For my concern, each time that there is a new gcc version, I always run this :
Code: |
# emerge -eav system
# emerge -eav world
|
It's the best way to be 100% sure that your box was compiled with the new GCC. |
|
Back to top |
|
|
figueroa Advocate
Joined: 14 Aug 2005 Posts: 2964 Location: Edge of marsh USA
|
Posted: Sun Jan 17, 2010 8:33 pm Post subject: |
|
|
Thank you.
Rats! I was afraid that was the real answer. _________________ Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi |
|
Back to top |
|
|
DaggyStyle Watchman
Joined: 22 Mar 2006 Posts: 5909
|
Posted: Sun Jan 17, 2010 10:24 pm Post subject: |
|
|
figueroa wrote: | Thank you.
Rats! I was afraid that was the real answer. |
I reemerge world only when there is a major version change (like from 3.3.6 to 4) I've done numerous gcc changes, in all I haven't reemerged world and all was ok. _________________ Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Sun Jan 17, 2010 11:36 pm Post subject: |
|
|
the good way for a clean toolochain is
- emerge gcc && emerge glibc && emerge gcc and you'll end up with a gcc link to latest glibc build by itself.
this is why people may argue "emerge sysstem && emerge world" (as gcc is in system and glibc too) would be the best, but i don't think it is:
1/ building system to get a new gcc won't build the new gcc with the new glibc, only one or the other
2/ rebuilding twice others tools (because world include system) is just a lost of time. As you don't even change your gcc version, you're just recompiling the thing you already have link to your new glibc but still with the old gcc (emerge gcc won't switch your gcc profile to the new gcc)
in fact it could be even worst if you build "system then world" because in case a new glibc is out, you can even bork your own toolchain by
- building system might build new gcc (notice building the new gcc won't change the compiler to use that newly create gcc), build a new glibc, in that case you'll end up with new gcc build for an old glibc. For minor version emerge will even remove the old glibc version (that should be safe, but "should" isn't always safe)
To try to be clearer, let's say you have gcc1 and glibc1 and there's a new gcc2 and glibc2: emerge system will produce a gcc2 build by gcc1 that is build against gblic1 AND a glibc2 that is build with the gcc1.
So: emerge system && emerge world won't produce what you wish as you will just build a new gcc and rebuild all your programs twice with the old one AND you may bork your toolchain and rebuild these programs in a random state.
If you're really lazy, i think emerge gcc && emerge glibc && switching to new gcc && emerge world would do what you wish in a easier way. |
|
Back to top |
|
|
Mike Hunt Watchman
Joined: 19 Jul 2009 Posts: 5287
|
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Mon Jan 18, 2010 12:48 am Post subject: |
|
|
if you follow the explain closely you'll see i'm wrong
it should be emerge gcc && switch to it && emerge glibc && emerge gcc (or world for lazy version)
It wasn't a wanted mistake, i'm just tired. |
|
Back to top |
|
|
pianosaurus l33t
Joined: 19 Apr 2004 Posts: 944 Location: Bash$
|
Posted: Mon Jan 18, 2010 12:54 am Post subject: |
|
|
krinn wrote: | if you follow the explain closely you'll see i'm wrong
it should be emerge gcc && switch to it && emerge glibc && emerge gcc (or world for lazy version)
It wasn't a wanted mistake, i'm just tired. |
You should edit the post then.
Also: ++
This is what I have always done.
krinn wrote: | If you're really lazy, i think emerge gcc && emerge glibc && switching to new gcc && emerge world would do what you wish in a easier way. |
Wouldn't emerge gcc && switching to new gcc && emerge glibc && emerge world be better? _________________ PKA Cuber
Please add [SOLVED] to the subject of your original post when you feel that your problem is resolved.
Adopt an unanswered post |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Mon Jan 18, 2010 1:07 am Post subject: |
|
|
I wrote that a while ago and it was the resume of the big thread at the time :
http://gentoo-quebec.org/wiki/index.php/Recompilation_Toolchain
It seems that we can run this :
Code: |
# emerge -auDNv world
# gcc-config -l
# gcc-config set_newest_version
# emerge -av sys-kernel/linux-headers sys-libs/glibc sys-devel/binutils-config sys-devel/binutils sys-devel/gcc-config sys-devel/gcc
# emerge sys-libs/glibc sys-devel/binutils sys-devel/gcc
# emerge -e system
# emerge -e world
|
|
|
Back to top |
|
|
|