Building FreeBSD from Source

I'm not at all familiarabou building FreeBSD from source although I may have tried it once or twice over the last ten years, but I think I would like to become more familiar with the process and am trying to follow a guide:-


Does this guide look like something I should follow? Is there anything missing or assumed?
 
It's been a while since I did this, but that looks about right. If you're on ZFS, make sure to get a snapshot before installing anything. Don't go too crazy with optimization flags the first time you do it, you can always make customization on future runs, once you've had success.

The handbook has this as well and from what I can tell it's the same.
 
Looks good enough. It assumes a native reinstall. Use make installworld DESTDIR=<dir> to put everything somewhere else and not touch the host installation.
 
Doesn't the Handbook cover this?
At one time it was considered a right of passage to build from source.
It does. I'm not sure why OP is going with that page as the handbook page is the same information from what I can tell and probably easier to follow. I haven't personally bothered recompiling things in quite a while,, so I didn't realize that mergemaster is gone now.
 
Does this guide look like something I should follow?
Definitively not. First "buildworld", then "buildkernel" (not the other way around), to provide up-to-date tools to build the kernel.

The correct order to build from source is described in the FreeBSD handbook, chapter 26.6. Updating FreeBSD from Source. See also build(7), and src.conf(5), for source build options.

Furthermore, have a look at /usr/src/UPDATING, "COMMON ITEMS:"at the end of the file.

Take note of:
Code:
        General Notes
        -------------
        Sometimes, obscure build problems are the result of environment
        poisoning.  This can happen because the make utility reads its
        environment when searching for values for global variables.  To run
        your build attempts in an "environmental clean room", prefix all make
        commands with 'env -i '.  See the env(1) manual page for more details.
Pay also attention of the other notes.

You will also find examples of various use cases for compiling from source code.
 
Please read 'COMMON ITEMS: General Notes' in /usr/src/UPDATING.
If you are trying to build FreeBSD 9.0 i386, see the source from that time.
Edit: I think there was a warning before I posted that there was a new post, but it wasn't displayed.
 
Please read 'COMMON ITEMS: General Notes' in /usr/src/UPDATING.
If you are trying to build FreeBSD 9.0 i386, see the source from that time.
Edit: I think there was a warning before I posted that there was a new post, but it wasn't displayed.
Actually, my eventual aim is to try and build every release of FreeBSD.

At the end of this project, I may figure out how to build v1.0.
 
It's been a while since I did this, but that looks about right. If you're on ZFS, make sure to get a snapshot before installing anything. Don't go too crazy with optimization flags the first time you do it, you can always make customization on future runs, once you've had success.

The handbook has this as well and from what I can tell it's the same.
One of the problems I find with The Handbook, is that you never really know if it is uptodate with the the latest release.

FreeBSD has been around since 1993, that's 33 years, so there will be thousands of guides and you never really know if you have the most uptodate version.
 
I wouldn't use information I find from third-party sites for FreeBSD unless I was completely out of other options.

A lot of information is out of date and sometimes written by users who primarily use Linux or other UNIX systems. Sometimes they unknowingly bring their habits from that system where it might not be appropriate for FreeBSD.

Regarding whether the Handbook and official documentation is out of date, if it is, then you can be certain other resources will be as well.

If your goal is to build FreeBSD systems back to 1.x, you're going to need the Handbooks anyway.
 
Back
Top