Quantcast
Channel: Planet MySQL
Viewing all articles
Browse latest Browse all 18776

MySQL 5.5 Windows Build Appendix : Full Outputs and Common Errors from Building MySQL 5.5 on Windows

$
0
0

The other day, I posted a “how-to” article for building MySQL 5.5 on Windows from the source code tree.

In an attempt to keep the post as brief as possible, I omitted many outputs, as well as a number of common bugs/problems one could encounter, and so I just wanted to follow-up with some of that in this “appendix” of sorts.

This way, folks who run into any issues might find solutions to those problems here.

I’ll start with the outputs first, followed by the common problems.

Outputs (When works as expected):

..

Output from Obtaining Source Code:

C:\Users\Chris>cd C:\

C:\>bzr init-repo --trees mysql-5.5
Shared repository with trees (format: 2a)
Location:
  shared repository: mysql-5.5

C:\>cd mysql-5.5

C:\mysql-5.5>bzr branch lp:mysql-server/5.5 mysql-5.5
Connected (version 2.0, client Twisted)
Authentication (publickey) successful!
Secsh channel 1 opened.
Branched 3674 revision(s).

..

Output from Building/Compiling Source Code:

C:\mysql-5.5>cd mysql-5.5

C:\mysql-5.5\mysql-5.5>cmake . -DBUILD_CONFIG=mysql_release -G "Visual Studio 9 2008"
-- Check for working C compiler: cl
-- Check for working C compiler: cl -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: cl
-- Check for working CXX compiler: cl -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of void *
-- Check size of void * - done
-- MySQL 5.5.21
-- Disable authenticode signing for executables
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - not found.
-- Found Threads: TRUE
-- Looking for fedisableexcept
-- Looking for fedisableexcept - not found
-- Check size of time_t
-- Check size of time_t - done
-- Performing Test TIME_T_UNSIGNED
-- Performing Test TIME_T_UNSIGNED - Failed
-- Cannot find wix 3, installer project will not be generated
-- Configuring done
-- Generating done
-- Build files have been written to: C:/mysql-5.5/mysql-5.5

..

Output from VS 2008 Express Build:

1>------ Build started: Project: ZERO_CHECK, Configuration: Debug Win32 ------
1>Checking Build System
1>CMake is re-running because build system is out-of-date.
1>-- MySQL 5.5.21
1>-- Configuring done
1>-- Generating done
1>-- Build files have been written to: C:/mysql-5.5/mysql-5.5
..........................................
...  ...
..........................................
========== Build: 93 succeeded, 0 failed, 5 up-to-date, 10 skipped ==========

..

Output from Testing:

-DBUILD_CONFIG=mysql_release

mysql> select version();
+------------------+
| version()        |
+------------------+
| 5.5.21-debug-log |
+------------------+
mysql> show engines;
+--------------------+---------+-------------------...
| Engine             | Support | Comment	   ...
+--------------------+---------+-------------------...
| FEDERATED          | NO      | Federated MySQL st...
| MRG_MYISAM         | YES     | Collection of iden...
| MyISAM             | YES     | MyISAM storage eng...
| BLACKHOLE          | YES     | /dev/null storage ...
| CSV                | YES     | CSV storage engine...
| MEMORY             | YES     | Hash based, stored...
| ARCHIVE            | YES     | Archive storage en...
| InnoDB             | DEFAULT | Supports transacti...
| PERFORMANCE_SCHEMA | YES     | Performance Schema...
+--------------------+---------+-------------------...

..

Error Section:

..

Error Connecting to Launchpad via Bazaar (bzr):

C:>bzr branch lp:mysql-server/5.5 mysql-5.5

Connected (version 2.0, client Twisted)
Authentication (publickey) failed.
bzr: ERROR: Connection error: Unable to authenticate to SSH host as
  chriscalender@bazaar.launchpad.net
supported auth types: ['publickey']

Solution:

If you encounter the above, then likely you’ve selected the wrong key or it’s not correct. See this page for even further details.

..

CMake Errors:

Signtool.exe Error:

CMake Error at cmake/install_macros.cmake:155 (MESSAGE):
  signtool is not found.  Signing executables not possible
-- Configuring incomplete, errors occurred!

Solution:

In my case, I searched my computer and had a signtool.exe, just not in a location that was in the $PATH, so I added that tool to the $PATH.

..

Stdint.h not found Error:

-- Looking for stdint.h
-- Looking for stdint.h - not found

Solution:

You can download stdint.h from here, and then save it to C:\Program Files\Microsoft Visual Studio 9.0\VC\include\.

Before re-running CMake again, you should delete CMakeCache.txt.

..

CMAKE_HAVE_PTHREAD_H not found Error:

-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - not found.

Solution:

This is a known bug, but harmless on Windows, so you can ignore it.

..

CMake TIME_T_UNSIGNED Failed Error:

-- Performing Test TIME_T_UNSIGNED
-- Performing Test TIME_T_UNSIGNED - Failed

Solution:

This is also a known bug, but it can also be safely ignored.

..

CMakeLists.txt Location Error:

CMake Error: The source directory "C:/build/mysql-5.5" does not appear to contain CMakeLists.txt.

Solution:

You’re in the wrong directory, ‘cd’ to the location where CMakeLists.txt resides.

..

Build / Compile Errors:

..

Visual Studio 2005 Errors:

If you try to compile MySQL 5.5 with VS 2005, you’ll likely see tons of syntax errors (I won’t post them all here). While you can use VS 2005 for building MySQL 5.1 and MariaDB 5.1, you’ll need to use VS 2008 to build MySQL 5.5.

..

m4: Invalid argument Error:

4>------ Build started: Project: GenServerSource, Configuration: Debug Win32 ------
4>Generating sql_yacc.cc, sql_yacc.h
4>C:\Program Files\GnuWin32\bin\bison.exe: m4: Invalid argument
4>Project : error PRJ0019: A tool returned an error code from "Generating sql_yacc.cc, sql_yacc.h"

Installing this to a location with no spaces should help. However, I did that and still had problems. The only way I found to move past this (at least for now) is to copy the file to $BUILD-DIR/sql/ (specifically, in this case, C:\mysql-5.5\mysql-5.5\sql\). After that, and after deleting CMakeCache.txt (in $BUILD/), I could finally move past this error.

..

Hope this helps :)

 
 


PlanetMySQL Voting: Vote UP / Vote DOWN

Viewing all articles
Browse latest Browse all 18776

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>