Hand-Building a Cross Environment

If you are not running on some version of Fedora, you will need to build the cross environment for yourself. Here are instructions for doing this.

These instructions have been tested on a Fedora machine with the RPM-based tool chain deinstalled. The tree builds, but it is likely that there are many dependencies that are not addressed here. As you find them, please let us know what they are and we will try to update these instructions. Some of the issues we know about appear at the bottom of this page.

Before checking out the cross environment tree, you should begin by checking out the base coyotos tree as described here. Once that is checked out, you should clone the ccs-xenv package by:

cd coyotos/src # if necessary
hg clone http://dev.eros-os.com/hg/ccs-xenv/trunk ccs-xenv

Note: Technically the ccs-xenv tree does not need to sit within the coyotos tree at all. We recommend this configuration mainly because it is the one that we use and test.

Before building the cross tools, choose a directory where they should be installed. If you install them into /coyotos or /usr/local/coyotos, the makefile fragments in the main Coyotos tree will find them automatically. Otherwise you will need to set the environment variable COYOTOS_XENV before building the main tree. Do not install the cross tools within your working source tree.

In the following example, we will install into /home/shap/coyotos-xenv. Build the cross tools for your desired target(s) by typing:

cd coyotos/src/ccs-xenv # if necessary
make -f Makefile.xenv TARGETS="coyotos-i386" CROSSROOT=/home/shap/coyotos-xenv

If you do not provide a value for CROSSROOT, the default directory is assumed to be /coyotos. This is the preferred location if you are able to write it, because it will match the configuration used by the RPM-based cross tools. This is good, mainly because that is the configuration that we test against.

Once the cross environment is built, you should be able to compile the main tree by following the instructions.

Additional Requirements to Build Documentation

Note that the default build process does not recompile the documentation tree. If you plan to recompile that, you will also need to build and install the OSDoc tools. OSDoc was developed independent of Coyotos, and the source tree does not expect to live within the Coyotos tree.

Fetch the OSDoc distribution by:

hg clone http://dev.eros-os.com/hg/osdoc/trunk osdoc

Then compile and install it into your previously built cross tools tree by:

cd osdoc
./configure --prefix=/home/shap/coyotos/host
make install

Where /home/shap/coyotos should be replaced by the name of the directory where you installed the cross tools. Once this is installed, you should be able to build the documents by following the instructions.

Common Build Issues

  1. Missing libicu-devel

    The most common source of cross tool build failure is a complaint that the unicode.h header file is missing. This is supplied by either the libicu or the libicu-devel package, depending on your Linux system. The cross build takes a while, so do yourself a favor and make sure that is installed before you compile it.

  2. Use CROSSROOT, not COYOTOS_XENV

    If your cross environment does not live in /coyotos or /usr/local/coyotos, you need to set the COYOTOS_XENV environment variable to point at it in order to build the Coyotos tree.

    When you build the cross tools, the argument to make is CROSSROOT, not COYOTOS_XENV. The reason is that this helps avoid clobbering an existing cross environment by mistake. In particular, it helps us avoid accidently overwriting the RPM-based cross environment when we test the cross build.