Change location to the directory you want to work from, and
then use the following command to make a local copy of the
MySQL 5.1 branch:
shell> sfioball -r+ bk://mysql.bkbits.net/mysql-5.1-new mysql-5.1
In the preceding example, the source tree is set up in the
mysql-5.1/
subdirectory of
your current directory.
The initial download of the source tree may take a while,
depending on the speed of your connection. Please be
patient.
You need GNU make,
autoconf 2.58 (or newer),
automake 1.8, libtool
1.5, and m4 to run the next set of
commands. Even though many operating systems come with their
own implementation of make, chances are
high that the compilation fails with strange error messages.
Therefore, it is highly recommended that you use GNU
make (sometimes named
gmake) instead.
Fortunately, a large number of operating systems ship with
the GNU toolchain preinstalled or supply installable
packages of these. In any case, they can also be downloaded
from the following locations:
To configure MySQL 5.1, you also need GNU
bison 1.75 or later. Older versions of
bison may report this error:
sql_yacc.yy:#####: fatal error: maximum table size (32767) exceeded
Note: The maximum table size is not actually exceeded; the
error is caused by bugs in older versions of
bison.
The following example shows the typical commands required to
configure a source tree. The first cd
command changes location into the top-level directory of the
tree; replace mysql-5.1
with the appropriate directory name.
shell> cd mysql-5.1
shell> aclocal; autoheader
shell> libtoolize --automake --force
shell> automake --force --add-missing; autoconf
shell> (cd storage/innobase; aclocal; autoheader; autoconf; automake)
shell> (cd storage/bdb/dist; sh s_all)
shell> ./configure # Add your favorite options here
shell> make
Or you can use BUILD/autorun.sh as a
shortcut for the following sequence of commands:
shell> aclocal; autoheader
shell> libtoolize --automake --force
shell> automake --force --add-missing; autoconf
shell> (cd storage/innobase; aclocal; autoheader; autoconf; automake)
shell> (cd storage/bdb/dist; sh s_all)
The command lines that change directory into the
storage/innobase
and
storage/bdb/dist
directories are used
to configure the InnoDB
and Berkeley DB
(BDB
) storage engines. You can omit these
command lines if you to not require
InnoDB
or BDB
support.
Note: Beginning with MySQL
5.1, code specific to storage engines has been moved under a
storage
directory. For example,
InnoDB
code is now found in
storage/innobase
and
NDBCluster
code is in
storage/ndb
.
If you get some strange errors during this stage, verify
that you really have libtool installed.
A collection of our standard configuration scripts is
located in the BUILD/
subdirectory. You
may find it more convenient to use the
BUILD/compile-pentium-debug
script than
the preceding set of shell commands. To compile on a
different architecture, modify the script by removing flags
that are Pentium-specific.