Building Factor from source is the recommended way to get Factor if you want to track development, because it saves bandwidth over downloading a binary every few days. It is also a requirement for contributors who wish to push patches to the Factor repository. New users and casual dabblers should use binaries instead, to save time and effort.
If you are using Linux, you may need to install development packages (gcc, libc headers, xorg development libraries, ...) before compiling Factor. If you are using Windows, you will need Cygwin. On Mac OS X, you will need Apple's developer tools.
You will also need git on all platforms.
To clone a copy of the Factor repository:
git clone git://factorcode.org/git/factor.git
Cloning from behind a restrictive corporate firewall:
git clone http://factorcode.org/git/factor.git
You can also browse the Factor repository online.
Once you have a clone of the repository, there are two ways to build Factor; you can build a clean branch, or the bleeding-edge sources.
A set of build servers monitor the Factor repository and do a full build every time changes are pushed. If all tests pass, a clean branch is made and a corresponding clean boot image is uploaded. Clean branches should be tracked by users who require a high degree of confidence that the source will compile and work. Every time a clean branch is made, a new binary package is uploaded. If you wish to be notified of build server activity, subscribe to the Factor-builds mailing list.
First, consult the list of clean branches to find the one for your platform.
Step 1: To track a clean branch, you will need to clone a repository first, then issue the following two commands to stay up to date:
git checkout -b clean-os-cpu origin/clean-os-cpu git pull git://factorcode.org/git/factor.git clean-os-cpu
Step 2: Download the latest clean boot image for your architecture. Place the boot image in the Factor directory.
Step 3: Compile the Factor VM by running make (gmake on *BSD).
Step 4: Bootstrap Factor by issuing a command like the following:
./factor -i=boot.arch.image
Instead of tracking a clean branch, you can also track the latest sources. Keep in mind that these might not always build or work correctly, so pay attention to the IRC channel and mailing list if you plan on doing this (read about getting help).
Step 1: To pull the latest patches, issue the following command in a cloned repository:
git pull origin master
Step 2: Download the latest boot image for your architecture. Place the boot image in the Factor directory.
Step 3: Compile the Factor VM by running make (gmake on *BSD).
Step 4: Bootstrap Factor by issuing a command like the following:
./factor -i=boot.arch.image