Gentoo FreeBSD/Upgrade Guide

This guide will show you how to upgrade Gentoo/FreeBSD 10.3 from previous version.

If you want to upgrade to 11.0, please see Gentoo FreeBSD/Upgrade Guide/11.0.

Changing to the latest profile
It is necessary to change the profile to emerge packages related to FreeBSD 10.3.

Get a list of available profiles:

Set the profile to 10.3:

Updating sys-apps/portage
Please check first, what will be installed:

If you got error "masked by: EAPI", please forcibly update the portage. Details For too old x86-fbsd stages

Please add --exclude sys-freebsd/* option. It is a workaround for sys-freebsd packages is masked.

Successfully updated, please check the version:

need version 2.2. If it is not 2.2, update portage again:

Recheck the version:

In addition, please check whether preserve-libs in FEATURES. If necessary, please add FEATURES="preserve-libs" in.

For too old x86-fbsd stages.
Currently, profile requests EAPI=5. However, very old x86 stage doesn't support it. Please forcibly update the portage.

Move
Currently, has been moved to. If it exists in, please move it to the location.

In addition, remove LDFLAGS from. If it is set, the upgrade may fail.

Package updates the minimum required
Update, minimum packages requirements:

Toolchain update
The latest binutils and gcc are required:

Set latest gcc:

Kernel update
First of all, you need to update your kernel. That is because some userland packages may require functions of the new kernel.

Please be sure to update the kernel first!

Failed to compile the kernel
Please get the GENERIC kernel of FreeBSD if you fail to compile the kernel. If you are using amd64-fbsd, please replace the i386 to amd64 in URL.

Reboot
Don't have a problem? Let's restart to actually use the new kernel.

After rebooting your machine, please check if the upgrade was successful.

Prepare of multilib (for amd64-fbsd users)
If you're using the old amd64-fbsd stages, additional steps are required.

Let's check:

Please execute additional when "need prepare multilib" is displayed:

Updating FreeBSD userland
First emerge the core library:

Update the userland of FreeBSD:

Please emerge the sys-freebsd packages again. Some of the packages are in need of include files of 10.3, which they couldn't use during the previous upgrade.

Clean, utmp related files:

Changing the CHOST variable and rebuilding the toolchain
Change the CHOST variable, and emerge binutils&gcc. (FYI, Changing the CHOST variable)

x86-fbsd users should issue:

amd64-fbsd users should issue:

Emerge binutils and gcc:

Check gcc's 9.x stuff:

Remove 9.x stuff:

Also check binutils:

Remove FreeBSD 9.x env data:

The target file name is in this case.

Rebuild all packages.

If one of the packages fails to compile you can issue 'emerge --resume --skipfirst' to continue emerging the remaining packages. Also, consider filing a bug report of the problem.

Cleaning
Let's remove the backup files when you have finished all the steps:

Re-select profile
Please re-select the profile if exists in.

Sample script to update automatically
You can get the sample script for easy updates.

https://gitweb.gentoo.org/proj/gentoo-bsd.git/plain/scripts/automatic_updater.sh