Erlend wrote:I've always recompiled xorg from within xorg and I don't remember having any problems - I'm not saying you won't have problems just that any problems I had were so minor I never noticed.
That's good news!
But - what Desktop Environment are you using?
I suspect some environments to be more fragile than others when recompiling them while they are running.
Erlend wrote:Why is the script more efficient than just doing "emerge -e world" once after upgrading to gcc 4.1.1?
Well - at least it will not recompile GCC a second time
But to be a bit more serious: Just go and consider the output of
Now notice the top entries of the generated list. On my system this are:
Code: Select all
[ebuild N ] sys-libs/zlib-1.2.3 USE="-build" 415 kB
[ebuild N ] sys-libs/gpm-1.20.1-r5 559 kB
[ebuild N ] sys-libs/ncurses-5.5-r2 USE="gpm unicode -bootstrap -build -debug -doc -minimal -nocxx" 2,259 kB
[ebuild N ] app-shells/bash-3.1_p16 USE="nls -afs -bashlogger -build" 2,514 kB
[ebuild N ] sys-libs/readline-5.1_p4 1,986 kB
[ebuild N ] virtual/libiconv-0 0 kB
[ebuild N ] sys-devel/gettext-0.14.5 USE="emacs nls -doc -nocxx" 6,939 kB
[ebuild N ] sys-apps/diffutils-2.8.7-r1 USE="nls -static" 1,037 kB
and finally, in line 75:
Code: Select all
[ebuild N ] sys-libs/glibc-2.4-r3 USE="nls nptl nptlonly -build -glibc-omitfp -hardened -profile" 0 kB
That's why. The order is
not optimal. glibc should not be the 75th package to be compiled, but one of the first ones.
Basically, my script does nothing else than run an
emerge -e world, only that it reorders items, and excludes GCC from the list, because GCC has already been installed.
"Is 'emerge -e' flawed then?" one may ask.
No. But "emerge -e" assumes there is
absolutely nothing there when it starts its job.
Which is not the reality if you are running an emerge from an installed gentoo System.
For instance, you may already have the new GCC, binutils etc. installed.
Exploiting this fact, you can optimize the order in which "emerge -e" does things, and even skip some of the packages (GCC).
Besides that, my script is identical to "emerge -e" world.
It does nothing what you couldn't do manually. (In fact, I
did all the steps manually before writing the script.)
So my script is only by one packet faster than what "emerge -e" does.
However - "emerge -e" has not yet done the full job!
Remember those 75 packages that have been compiled
before glibc was updated?
"Just to be sure" one should recompile those 75 packages again after the emerge finishes, so that all of them are linked against the new glibc (although I doubt this will be necessary... but that's another story).
My script compiles glibc as the first package (emerges it as the second package; the first package is only header files), and thus makes any this sort of headache obsolete from the beginning.
Erlend wrote:Is it possible, in general, to tell what compiler version a package was compiled with? I already compiled some packages with emerge -e system (as per
http://www.gentoo.org/doc/en/gcc-upgrading.xml) before reading about this script, but your script tries to compile these again (at least as far as I can see)... I think it would be useful if it wouldn't.
Well, that's the problem.
Actually, it is not even necessary to recompile all packages which have been compiled with the old compiler, because the C ABI is pretty stable (see my posting with the explanations for my guide for more of this).
It would be sufficient to recompile only those source files, which have been written in the C++ language by the old compiler.
Unfortunately, it's hard if not even possible to find that out in a safe, automated way (see also my explanation posting).
So we better recompile everything, just to be sure not to miss one of those C++ sources.
Plus we have the benefit that then everything is compiled using the presumably better code generator of the new compiler.