The solution to many problems involves reconfiguring. If you do reconfigure, take note of the following:
If CMake is run after it has previously
been run, it may use information that was gathered during its
previous invocation. This information is stored in
CMake starts up, it looks for that file and
reads its contents if it exists, on the assumption that the
information is still correct. That assumption is invalid when
Each time you run CMake, you must run make again to recompile. However, you may want to remove old object files from previous builds first because they were compiled using different configuration options.
To prevent old object files or configuration information from being used, run these commands on Unix before re-running CMake:
Or, on Windows:
devenv MySQL.sln /cleanshell>
If you build out of the source tree, remove and recreate your build directory before re-running CMake. For instructions on building outside of the source tree, see How to Build MySQL Server with CMake.
On some systems, warnings may occur due to differences in system include files. The following list describes other problems that have been found to occur most often when compiling MySQL:
To define flags to be used by your C or C++ compilers, specify
them using the
CXXFLAGS environment variables. You can
also specify the compiler names this way using
CXX. For example:
export CC CFLAGS CXX CXXFLAGS
If compilation fails, check whether the
MYSQL_MAINTAINER_MODE option is
enabled. This mode causes compiler warnings to become errors,
so disabling it may enable compilation to proceed.
If your compile fails with errors such as any of the following, you must upgrade your version of make to GNU make:
make: Fatal error in reader: Makefile, line 18: Badly formed macro assignment
make: file `Makefile' line 18: Must be a separator (:
pthread.h: No such file or directory
Solaris and FreeBSD are known to have troublesome make programs.
GNU make 3.75 is known to work.
sql_yacc.cc file is generated from
sql_yacc.yy. Normally, the build process
does not need to create
because MySQL comes with a pregenerated copy. However, if you
do need to re-create it, you might encounter this error:
xxxfatal: default action causes potential...
This is a sign that your version of yacc is deficient. You probably need to install bison (the GNU version of yacc) and use that instead.
Versions of bison older than 1.75 may report this error:
sql_yacc.yy:#####: fatal error: maximum table size (32767) exceeded
The maximum table size is not actually exceeded; the error is caused by bugs in older versions of bison.
For information about acquiring or updating tools, see the system requirements in Section 2.10, “Installing MySQL from Source”.