Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A few questions about FreeBSD

  1. Where/how should I obtain the source code (ex. through terminal, Download off website)

  2. How (on ubuntu) should I build it?

  3. Before I build it can I customize it (in other words is possible)?

share|improve this question
up vote 4 down vote accepted

You can check the source for FreeBSD out of version control here. The developer's handbook answers a lot of questions about developing FreeBSD. Why aren't you building it from FreeBSD itself? It seems kind of... odd to be building from Ubuntu.

share|improve this answer
FreeBSD can be cross-compiled, else you wouldn't find it used in embedded systems. But in this case, I agree: probably not the right way to go about it. – Warren Young Apr 2 '12 at 23:05
@WarrenYoung Can it? You can compile FreeBSD for another architecture, but compiling a whole FreeBSD system under Linux looks like it's more work than running FreeBSD in a VM. – Gilles Apr 2 '12 at 23:28
There's nothing magic about GCC running on FreeBSD as compared to a FreeBSD cross-dev version of GCC for Linux. All building on FreeBSD for FreeBSD would buy you is that you'd already have the right headers, libraries and dev tools in place already, assuming you're targeting the same OS version that you're running under. To cross-compile for FreeBSD under Linux, you'd have to build up the cross toolchain, then make copies of FreeBSD /lib, /usr/lib, /usr/include, etc., then point the cross-dev tools at those directories. Again, not advocating it, just pointing out it can be done. – Warren Young Apr 3 '12 at 0:20
Oh, I agree, but the effort to get the toolchain and bits in place on a linux system seems like a lot of work. – jsbillings Apr 3 '12 at 16:52
You'd also need the correct make version. The FreeBSD build system does not use GNU Make. Just don't bother: build FreeBSD on FreeBSD, Linux on Linux and Windows on Windows. To do otherwise is simply begging for pain and suffering. – Kristof Provost Apr 5 '12 at 11:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.