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.

Change to latest profile
To emerge related to FreeBSD 10.3 is necessary to change the profile.

Get a list of available profiles:

Set the profile of 10.3:

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

After confirming that masked by: EAPI error does not appear, please upgrade.

Please add --exclude sys-freebsd/* option if failed messages sys-freebsd packages are mask is displayed.

Successfully updated, please check the version:

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

Recheck the version:

In addition, check that it includes preserve-libs to FEATURES. If it does not, please add FEATURES="preserve-libs" in.

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

Move
Be aware that has been moved to. If it exists in please move it to the  location.

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

Package updates the minimum required
Update the minimal packages needed to upgrade:

Toolchain update
The latest binutils and gcc is required:

Set latest gcc:

Kernel update
First of all, you need to update your kernel. It is because the package of a userland may use the new function of a kernel.

Please be sure to update a 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? Now we restart.

After rebooting your machine, please check if the kernel is new.

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

Let's check:

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

Updating FreeBSD userland
The first emerge the core library:

Update the userland of FreeBSD:

Please to emerge again sys-freebsd packages. Some of the package is in need of include files of 10.3, did not use it when the upgrade:

Cleanup, utmp related files:

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

x86-fbsd users:

amd64-fbsd users:

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.

Recreate all packages.

Failure to compile the package if any, 'emerge --resume --skipfirst' is your friend. Also, please bug report the problem if you like.

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