trouble compiling on windows with vs2010

Asked by Yehuda Katz

I have Visual Studio 2010 Ultimate on Windows 7 Pro x64.
I can not build using "sh win/make_mariadb_win_dist", since it is for VS2008 x86, so I tried building using the instructions in "INSTALL-WIN-SOURCE"
(Note: if this file is wrong, it should not be in the source distribution.)
Issues with "cscript win\configure.js WITH_INNOBASE_STORAGE_ENGINE MYSQL_TCP_PORT=33061"
The file produced had an extra double quote in it, meaning cmake choked on it.
----------------------------
SET (MYSQL_UNIX_ADDR "/tmp/mysql.sock"
")
----------------------------
I fixed that manually.
I created a build batch file for vs2010 which ran fine with one warning:
----------------------------
CMake Warning (dev) at CMakeLists.txt:330 (ADD_SUBDIRECTORY):
  The source directory

    C:/Webserv/mariadb-5.1.44/unittest/examples

  does not contain a CMakeLists.txt file.

  CMake does not support this case but it used to work accidentally and is
  being allowed for compatibility.

  Policy CMP0014 is not set: Input directories must have CMakeLists.txt. Run
  "cmake --help-policy CMP0014" for policy details. Use the cmake_policy
  command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.
----------------------------
In the VS2010 configuration manager, I chose Release x64 and then Build Solution.
It produces ~100 errors an ~1500 warnings.

Anyone know where to go from here?

Question information

Language:
English Edit question
Status:
Answered
For:
MariaDB Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Kazuhisa Ichikawa (kahzoo) said :
#1

Hi,

I have successfully built MariaDB with Visual Studio 2010 Express on Windows XP SP3(32bit). But I needed to do a couple of tweaks manually. Here are a couple of things that you might want to check.

1. If there are empty (file size = 0)*.map files which were generated by VS2010 during the build, remove all of them manually and then rebuild MariaDB.

2. If the errors are in sql/sql_lex.cc and the compiler complains that 'symbols' and 'sql_functions' are undefined, check whether sql/lex_hash.h is properly generated. If it is not (for example, its file size is 0), remove it and then rebuild MariaDB. (Cleaning the 'sql' project might have the same effect.)

3. If you want to build Maria storage engine, you need to get the latest sources using bzr, because there is a bug (Bug #550974) in 5.1.44 source which causes a VC++ compilation error while building Maria storage engine. Alternatively you can manually patch the 5.1.44 source as suggested in https://bugs.launchpad.net/maria/+bug/550974.

If none of the above applies to your build problem, providing the specific compilation error messages might help.

Revision history for this message
Launchpad Janitor (janitor) said :
#2

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Yehuda Katz (yakatz) said :
#3

I am in the middle of finals now (until the end of next week), but I will keep trying after that.

Revision history for this message
Launchpad Janitor (janitor) said :
#4

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Daniel Bartholomew (dbart) said :
#5

We've made some good progress in the last few months with our Windows build scripts so it's possible the errors you've seen have been fixed.

If you're still having trouble, post a question to the maria-developers mailing list http://launchpad.net/~maria-developers (you'll have to be approved to join the list, but they've never turned anyone down).

You can also find most of the developers in the #maria channel on freenode IRC (http://kb.askmonty.org/v/irc). Most of the developers work European hours, so don't be surprised if you don't find many people active at 8pm US Pacific time. :)

See also the "Building MariaDB on Windows" page in the Knowledgebase: http://kb.askmonty.org/v/building-mariadb-on-windows

Revision history for this message
Daniel Bartholomew (dbart) said :
#6

changing to open

Revision history for this message
Michael Widenius (monty) said :
#7

Changed state as there is now a proper answer

Can you help with this problem?

Provide an answer of your own, or ask Yehuda Katz for more information if necessary.

To post a message you must log in.