The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
Difference between revisions of "Toolchain update"
Line 4: | Line 4: | ||
== Current toolchain == | == Current toolchain == | ||
Funtoo currently provides the following core package versions: | Funtoo currently provides the following core package versions for stable branch: | ||
*sys-devel/gcc-4.6.4-r2 | *sys-devel/gcc-4.6.4-r2 | ||
*sys-devel/binutils-2.22 | *sys-devel/binutils-2.22 | ||
*sys-kernel/linux-headers-3.4-r2 | *sys-kernel/linux-headers-3.4-r2 | ||
*sys-libs/glibc-2.15-r4 | *sys-libs/glibc-2.15-r4 | ||
== Toolchain update == | == Toolchain update == | ||
Those core packages will be updated to the following versions | Those core packages will be updated to the following versions. These packages now included in current branch | ||
*sys-devel/gcc-4.8.1- | *sys-devel/gcc-4.8.1-r3 | ||
*sys-devel/binutils-2.23. | *sys-devel/binutils-2.23.2 | ||
*sys-kernel/linux-headers-3.7 | *sys-kernel/linux-headers-3.7 | ||
*sys-libs/glibc-2.18 | *sys-libs/glibc-2.18 | ||
== Unmasking the packages == | == Unmasking the packages == | ||
Line 23: | Line 22: | ||
To unmask the packages, run <tt>emerge --sync</tt>. If you are using the funtoo-current, they should now be unmasked. To perform this manually (no longer necessary,) do this: | To unmask the packages, run <tt>emerge --sync</tt>. If you are using the funtoo-current, they should now be unmasked. To perform this manually (no longer necessary,) do this: | ||
< | <console> | ||
# install -d /etc/portage/package.unmask | # ##i##install -d /etc/portage/package.unmask | ||
# echo ">=sys-devel/gcc-4.8.1" >> /etc/portage/package.unmask/toolchain | # ##i##echo ">=sys-devel/gcc-4.8.1" >> /etc/portage/package.unmask/toolchain | ||
# echo "=sys-devel/binutils-2.23.1" >> /etc/portage/package.unmask/toolchain | # ##i##echo "=sys-devel/binutils-2.23.1" >> /etc/portage/package.unmask/toolchain | ||
# echo "=sys-kernel/linux-headers-3.7" >> /etc/portage/package.unmask/toolchain | # ##i##echo "=sys-kernel/linux-headers-3.7" >> /etc/portage/package.unmask/toolchain | ||
# echo "=sys-libs/glibc-2.18" >> /etc/portage/package.unmask/toolchain | # ##i##echo "=sys-libs/glibc-2.18" >> /etc/portage/package.unmask/toolchain | ||
# echo "=sys-fs/udev-171-r9" >> /etc/portage/package.unmask/toolchain | # ##i##echo "=sys-fs/udev-171-r9" >> /etc/portage/package.unmask/toolchain | ||
</ | </console> | ||
Easier way is to copy <code>funtoo-toolchain</code> from /usr/portage/profiles/package.mask, assuming that /etc/portage/package.unmask is a directory: | Easier way is to copy <code>funtoo-toolchain</code> from /usr/portage/profiles/package.mask, assuming that /etc/portage/package.unmask is a directory: | ||
< | <console> | ||
# cp /usr/portage/profiles/package.mask/funtoo-toolchain /etc/portage/package.unmask | # ##i##cp /usr/portage/profiles/package.mask/funtoo-toolchain /etc/portage/package.unmask | ||
</ | </console> | ||
== Keywords changes for ''stable'' users == | == Keywords changes for ''stable'' users == | ||
If ''Stable'' users are not afraid to upgrade their toolchain, they must add the correct keywords too: | If ''Stable'' users are not afraid to upgrade their toolchain, they must add the correct keywords too: | ||
< | <console> | ||
# install -d /etc/portage/package.keywords | # ##i##install -d /etc/portage/package.keywords | ||
# echo ">=sys-devel/gcc-4.8.1 **" >> /etc/portage/package.keywords/toolchain | # ##i##echo ">=sys-devel/gcc-4.8.1 **" >> /etc/portage/package.keywords/toolchain | ||
# echo "=sys-devel/binutils-2.23.1 **" >> /etc/portage/package.keywords/toolchain | # ##i##echo "=sys-devel/binutils-2.23.1 **" >> /etc/portage/package.keywords/toolchain | ||
# echo "=sys-kernel/linux-headers-3.7 **" >> /etc/portage/package.keywords/toolchain | # ##i##echo "=sys-kernel/linux-headers-3.7 **" >> /etc/portage/package.keywords/toolchain | ||
# echo "=sys-libs/glibc-2.18 **" >> /etc/portage/package.keywords/toolchain | # ##i##echo "=sys-libs/glibc-2.18 **" >> /etc/portage/package.keywords/toolchain | ||
# echo "=sys-fs/udev-171-r9 **" >> /etc/portage/package.keywords/toolchain | # ##i##echo "=sys-fs/udev-171-r9 **" >> /etc/portage/package.keywords/toolchain | ||
</ | </console> | ||
== Upgrading to the new toolchain == | == Upgrading to the new toolchain == | ||
As the dependencies have been adjusted so the packages are built in the right order, no user manipulation is required. Updating everything should work out of the box, but to ensure that no unwanted package is updated between the toolchain parts, proceed as following: | As the dependencies have been adjusted so the packages are built in the right order, no user manipulation is required. Updating everything should work out of the box, but to ensure that no unwanted package is updated between the toolchain parts, proceed as following: | ||
< | <console> | ||
# emerge --sync | # ##i##emerge --sync | ||
# emerge -1 glibc | # ##i##emerge -1 glibc | ||
# emerge -uNDav @world | # ##i##emerge -uNDav @world | ||
</ | </console> | ||
Done! | Done! | ||
== What about libtool? == | == What about libtool? == | ||
libtool is automatically rebuilt during the update process. This avoids any manual steps to be executed after the update. | libtool is automatically rebuilt during the update process. This avoids any manual steps to be executed after the update. (This step need verification, libtool no longer auto-emerged...Oleg) | ||
== Rebuilding the whole system? == | == Rebuilding the whole system? == | ||
Line 66: | Line 65: | ||
== Case of depclean == | == Case of depclean == | ||
After switching to new gcc, it can be cleaned (accidentally) by emerge ---depclean, it is recommended to save older gcc for failover | After switching to new gcc, it can be cleaned (accidentally) by emerge ---depclean, it is recommended to save older gcc for failover | ||
< | <console> | ||
# emerge -av --depclean --exclude sys-devel/gcc | # ##i##emerge -av --depclean --exclude sys-devel/gcc | ||
</ | </console> | ||
== Troubleshooting == | == Troubleshooting == | ||
After the update, if any package fails to start with a shared library missing problem, try to run: | After the update, if any package fails to start with a shared library missing problem, try to run: | ||
< | <console> | ||
# revdep-rebuild | # ##i##revdep-rebuild | ||
</ | </console> | ||
Sometime, with toolchain update, system can be damaged. If such issues experienced, follow resurrection guide | |||
http://www.funtoo.org/System_resurrection | |||
[[Category:HOWTO]] | [[Category:HOWTO]] |
Revision as of 05:43, January 11, 2014
This guide explains how to upgrade the Funtoo toolchain to the new version available. With this toolchain update comes some other core packages bumps that were depending on the new toolchain.
This toolchain update affects the users of the current tree. Stable users should not update to this toolchain yet as many stable packages may not build with it.
Current toolchain
Funtoo currently provides the following core package versions for stable branch:
- sys-devel/gcc-4.6.4-r2
- sys-devel/binutils-2.22
- sys-kernel/linux-headers-3.4-r2
- sys-libs/glibc-2.15-r4
Toolchain update
Those core packages will be updated to the following versions. These packages now included in current branch
- sys-devel/gcc-4.8.1-r3
- sys-devel/binutils-2.23.2
- sys-kernel/linux-headers-3.7
- sys-libs/glibc-2.18
Unmasking the packages
To unmask the packages, run emerge --sync. If you are using the funtoo-current, they should now be unmasked. To perform this manually (no longer necessary,) do this:
root # install -d /etc/portage/package.unmask root # echo ">=sys-devel/gcc-4.8.1" >> /etc/portage/package.unmask/toolchain root # echo "=sys-devel/binutils-2.23.1" >> /etc/portage/package.unmask/toolchain root # echo "=sys-kernel/linux-headers-3.7" >> /etc/portage/package.unmask/toolchain root # echo "=sys-libs/glibc-2.18" >> /etc/portage/package.unmask/toolchain root # echo "=sys-fs/udev-171-r9" >> /etc/portage/package.unmask/toolchain
Easier way is to copy funtoo-toolchain
from /usr/portage/profiles/package.mask, assuming that /etc/portage/package.unmask is a directory:
root # cp /usr/portage/profiles/package.mask/funtoo-toolchain /etc/portage/package.unmask
Keywords changes for stable users
If Stable users are not afraid to upgrade their toolchain, they must add the correct keywords too:
root # install -d /etc/portage/package.keywords root # echo ">=sys-devel/gcc-4.8.1 **" >> /etc/portage/package.keywords/toolchain root # echo "=sys-devel/binutils-2.23.1 **" >> /etc/portage/package.keywords/toolchain root # echo "=sys-kernel/linux-headers-3.7 **" >> /etc/portage/package.keywords/toolchain root # echo "=sys-libs/glibc-2.18 **" >> /etc/portage/package.keywords/toolchain root # echo "=sys-fs/udev-171-r9 **" >> /etc/portage/package.keywords/toolchain
Upgrading to the new toolchain
As the dependencies have been adjusted so the packages are built in the right order, no user manipulation is required. Updating everything should work out of the box, but to ensure that no unwanted package is updated between the toolchain parts, proceed as following:
root # emerge --sync root # emerge -1 glibc root # emerge -uNDav @world
Done!
What about libtool?
libtool is automatically rebuilt during the update process. This avoids any manual steps to be executed after the update. (This step need verification, libtool no longer auto-emerged...Oleg)
Rebuilding the whole system?
Some people argue that this is necessary to rebuild the whole system (even twice) after a toolchain upgrade. This is never necessary, but users who changed their CFLAGS or CXXFLAGS due to a new available arch or optimization flag are welcome to do so, if they want. However, remember that this is never necessary.
Case of depclean
After switching to new gcc, it can be cleaned (accidentally) by emerge ---depclean, it is recommended to save older gcc for failover
root # emerge -av --depclean --exclude sys-devel/gcc
Troubleshooting
After the update, if any package fails to start with a shared library missing problem, try to run:
root # revdep-rebuild
Sometime, with toolchain update, system can be damaged. If such issues experienced, follow resurrection guide http://www.funtoo.org/System_resurrection