Hardware Reference
In-Depth Information
The
./configure
command will configure all defaults and install into
/usr/local
. If you wanted to install into a
different path, say, for example,
/usr/local/crosstool
, you can use the
-prefix
option to tell the configure tool to
install into
/usr/local/crosstool
. The full command would be this:
#./configure -prefix=/usr/local/crosstool
Just ensure that the directory exists before you run the
configure
script because the configure tool will not create
it for you.
This process must exit cleanly; if there are any errors, fix them before you make the build. If you do get missing
build components, ensure that you have installed the
install build-essential
group for Ubuntu or, under the
Fedora install, the “Development Tools” group; of course, if you are a Gentoo user all the tools will already be present.
In Figure
6-5
you can see the command I used and the end result of a successful configure. There is a lot of output in
between but I have removed it as long as the exit status is clean.
Figure 6-5.
Running the configure script
Why am I echoing
$?
? Exactly what is the
$?
? The
$?
is the numeric exit code of the previously run command on
the bash shell. Once the configure stage has run, I echoed the exit code of the configure state to the running terminal.
As you can see it has an exit code of zero, so all is well: anything above zero would indicate a problem.
Once you have successfully generated the make file with the configure tool, it's time to build and install
crosstool-NG. The next step is to run the
make
command.
make
will read the make file generated by the
configure
script
and will build the install. You can run
make
as a regular user.
make
should also exit with no errors. The
make
process
should be pretty quick. Once it's done, the next step is to install crosstool-NG. This is what the
make install
command
will do. You need to have root privileges for this step. If you're on Ubuntu or Fedora you may need to use the
sudo
tool
to run
make install
. Because I am using Gentoo I will become the root user and run the
make install
command:
# make
Once this has finished, run the following command:
# make install