Let's say after doing a stage 3 installation I would like to recompile *everything* in my system with my own flags and stuff. That is, rebuild the whole toolchain and everything, like in a stage1 install. Is

Code:

emerge -e system && emerge -e world

enough to do this, or are there still things that need to be recompiled manually?

Last edited by batistuta on Thu Feb 23, 2006 8:54 am; edited 1 time in total

Let's say after doing a stage 3 installation I would like to recompile *everything* in my system with my own flags and stuff. That is, rebuild the whole toolchain and everything, like in a stage1 install. Is

Code:

emerge -e system && emerge -e world

enough to do this, or are there still things that need to be recompiled manually?

I found that

Code:

emerge -e system && emerge -e world

is redundant and a

Code:

emerge -e world

should do. Rebuilding world rebuilds system as well. I wasted a couple of hours running

Code:

emerge -e system

prior to a world rebuild when upgrading gcc-3.3.6 to gcc-3.4.4 ...

If there is a valid reason why one should rebuild system prior to world I'd really like to know about it

If there is a valid reason why one should rebuild system prior to world I'd really like to know about it

Circular dependencies. The sanity of your packages depends on the sanity of your toolchain, which depends on the sanity of it's dependencies. That is, in order to be absolutely sure you have a well working toolchain, you should first build system with your reconfigured USE and CFLAGS set. Assuming all goes well, you now have a working system built on dependencies using the old configuration. Then you rebuild system, creating dependencies with the new configuration, using a compiler etc. made with the new configuration.

Rob Moss, a Gentoo dev, suggests going further still: By the same reasoning, your world packages are built with the old config, on dependencies with the old config. To get the world packages properly rebuilt, you should also do this twice (and yes, I know world contains the system packages; there is a certain redundancy here, but IMO ensuring the sanity of your system packages is a necessary first step). That is, if you significantly change configuration (new C{XX}FLAGS, new gcc or similar), the rebuild process is

After emerging a new version of GCC, we need to pause for a moment and think about what we've done. We've just used GCC 3.3.5 and a toolchain built with GCC 3.3.5 to compile GCC 3.4.4. Before we spend any more time building our Gentoo system we should rebuild the entire toolchain, re-compiling it so that we have GCC 3.4.4 that was built with GCC 3.4.4.

Before we do this we need to examine /etc/make.conf and make changes to the CFLAGS statements in order to take advantage of the new performance-enhancing features of GCC 3.4.4. After making necessary updates to /etc/make.conf we need to rebuild the toolkit using the new GCC 3.4.4 compiler. The result will be a 3.4.4 tooklit, compiled by a 3.4.4 toolkit that was built with a 3.3.5 toolkit. Clear as mud?

If there is a valid reason why one should rebuild system prior to world I'd really like to know about it

Circular dependencies. The sanity of your packages depends on the sanity of your toolchain, which depends on the sanity of it's dependencies. That is, in order to be absolutely sure you have a well working toolchain, you should first build system with your reconfigured USE and CFLAGS set. Assuming all goes well, you now have a working system built on dependencies using the old configuration. Then you rebuild system, creating dependencies with the new configuration, using a compiler etc. made with the new configuration.

Rob Moss, a Gentoo dev, suggests going further still: By the same reasoning, your world packages are built with the old config, on dependencies with the old config. To get the world packages properly rebuilt, you should also do this twice (and yes, I know world contains the system packages; there is a certain redundancy here, but IMO ensuring the sanity of your system packages is a necessary first step). That is, if you significantly change configuration (new C{XX}FLAGS, new gcc or similar), the rebuild process is