Feature #1496

mroongaをWindowsでも利用できるようにする

Added by Kentaro HAYASHI over 5 years ago. Updated about 5 years ago.

Status:担当者作業中Start date:10/01/2012
Priority:NormalDue date:
Assignee:Kentaro HAYASHI% Done:

0%

Category:MariaDB対応
Target version:-

Description

h1. 動機

mroongaをWindowsでも利用できるようにしたい。

Windowsでも使えたらという要望はこれまでにも挙がっているので対応したい。

h1. ゴール

毎月のmroongaリリースにてrpm,debだけでなくwindows版も提供できるようになること。

h1. 実現方法

ビルドに必要な環境の整備を行い、ビルド手順を確立する。

  • CMake 2.6以降が必要
  • Visual Studio 2008が必要 (mysql-5.5.28/BUILD-CMAKEにはExpressでもコンパイルできるとある)
Compiler Tools
--------------
You will need  a working compiler and make utility on your OS. 
On Windows, install Visual Studio (Express editions will work too). 
On Mac OSX, install Xcode tools.

http://dev.mysql.com/doc/refman/5.1/ja/windows-source-build-cmake.html には以下のようにExpressではビルドできなかったようだが5.5系では改善された模様。

また win\build-vs8_x64.bat を使用して 64-ビット バージョンの MySQL をビルドできます。しかし、64-ビット バージョンを Visual Studio Express Edition ではビルドできません。Visual Studio 2005 (8.0) あるいはそれ以上を使用する必要があります。 

build.log - 2012/10/03 初回mroongaビルドエラーログ (88.8 KB) Kentaro HAYASHI, 10/03/2012 06:33 pm

error-20121003-1st.log (14.5 KB) Kentaro HAYASHI, 10/03/2012 07:39 pm

error-20121004-link.log - 2012/10/04 LINKエラー (167 KB) Kentaro HAYASHI, 10/04/2012 07:26 pm

error-20121005-nodefaultlib-and-mysqllib.log - /NODEFAULTLIBとmysqlライブラリをリンクしたときのエラー結果 (20.5 KB) Kentaro HAYASHI, 10/05/2012 02:20 pm


Related issues

Related to Feature #1691: MariaDB組み込みビルド用対応(windows版) 完了 03/27/2013

History

#1 Updated by Kentaro HAYASHI over 5 years ago

  • Description updated (diff)

#2 Updated by Kentaro HAYASHI over 5 years ago

h2. 参考リンク

http://dev.mysql.com/downloads/installer/ 32bitなオールインワン形式のインストーラが提供されている

http://dev.mysql.com/downloads/mysql/#downloads 32bit,64bit版のインストーラ及びzipアーカイブが提供されている

  • mysql-5.5.28-win32.msi 32bit installer
  • mysql-5.5.28-winx64.msi 64bit installer
  • mysql-5.5.28.zip 32bit zip ソースファイル一式
  • mysql-5.5.28-win32.zip 32bit zip バイナリ
  • mysql-5.5.28-winx64.zip 64bit zip バイナリ

h2. 提供形態について

  • インストーラ
  • zipアーカイブ

    • lib/plugin以下にビルドしたmroongaのバイナリを配置
    • プラグインの登録等はユーザにおまかせするか、バッチ提供などでフォローする

h2. TODO

  • mroongaのビルド開発環境の準備をする
  • mroongaのCMake&VS2008でビルドできるようにする

    • mroongaにはCMake対応がすでに入っているはず
  • mroongaがビルドできたらインストーラ/zipアーカイブを作成できるようにする

  • mroongaのWindows版に関してドキュメント更新する

  • mroongaのWindows版ビルド方法をとりまとめてリリース手順を更新する

#3 Updated by Kentaro HAYASHI over 5 years ago

Visual Studio 2008 Express で64bit環境のコンパイルを行うには追加で作業が必要。

参考: http://www.sharkpp.net/blog/2009/04/26/visual-c-2008-express-edition-enable-64-program.html

ただし若干情報が古くそのままでは適用できない。

#4 Updated by Kentaro HAYASHI over 5 years ago

  • Status changed from 新規 to 担当者作業中

参考: MariaDBのWindows版のビルドについて

VS2008およびVS2010をサポートしている。

https://kb.askmonty.org/en/Building_MariaDB_on_Windows/

Visual C++: We currently support Visual Studio 2008 and 2010, including the (free) express editions (generally we try to support the two most recent versions). Install latest service packs as well, which are (as of when this was written) SP1 for both VS2008 and VS2010.

#5 Updated by Kentaro HAYASHI over 5 years ago

mroongaのビルドで-DMYSQL_CONFIGを指定する必要があるが、 $fileの値がフルパスの状態でsub whichに渡されると必ずエラーになってしまう。 その問題を回避するためのメモ。

mysql_config.pl

--- C:/work/mysql/mysql-5.5.28-vs2010-x86/scripts/mysql_config.pl.orig  Tue Oct 02 18:42:23 2012
+++ C:/work/mysql/mysql-5.5.28-vs2010-x86/scripts/mysql_config.pl   Tue Oct 02 19:09:43 2012
@@ -61,6 +61,10 @@

my $IFS = $O eq "MSWin32" ? ";" : ":";

  • if ( -f "$file" )
  • {
  • return $file;
  • } foreach my $dir ( split($IFS, $ENV{PATH}) ) { if ( -f "$dir/$file" or -f "$dir/$file.exe" )

#6 Updated by Kentaro HAYASHI over 5 years ago

参考: mroongaをubuntu環境でcmakeを利用してビルドする場合

ソースパッケージを取得してからビルドする。(5.5.24)

sudo apt-get install mysql-source-5.5
cp /usr/src/mysql/mysql-5.5 ~/work/mysql/
cd ~/work/mysql/mysql-5.5
cmake . -G "Unix Makefiles" -DBUILD_CONFIG=mysql_release
make

注:include/mysqld_error.hがmake中に生成されるのでmakeは必要。

cd ~/work/mroonga/mroonga.cmake
cmake . -G "Unix Makefiles"  -DMYSQL_SOURCE_DIR=../../mysql/mysql-5.5 -DMYSQL_CONFIG=../../mysql/mysql-5.5/scripts/mysql_config
make
-[69853]% make
Scanning dependencies of target ha_mroonga
[ 11%] Building CXX object CMakeFiles/ha_mroonga.dir/mrn_sys.cpp.o
[ 22%] Building CXX object CMakeFiles/ha_mroonga.dir/ha_mroonga.cpp.o
[ 33%] Building CXX object CMakeFiles/ha_mroonga.dir/mrn_table.cpp.o
[ 44%] Building CXX object CMakeFiles/ha_mroonga.dir/lib/mrn_path_mapper.cpp.o
[ 55%] Building CXX object CMakeFiles/ha_mroonga.dir/lib/mrn_match_escalation_threshold_scope.cpp.o
[ 66%] Building CXX object CMakeFiles/ha_mroonga.dir/lib/mrn_index_table_name.cpp.o
[ 77%] Building CXX object CMakeFiles/ha_mroonga.dir/lib/mrn_debug_column_access.cpp.o
[ 88%] Building CXX object CMakeFiles/ha_mroonga.dir/lib/mrn_auto_increment_value_lock.cpp.o
[100%] Building CXX object CMakeFiles/ha_mroonga.dir/lib/mrn_external_lock.cpp.o
Linking CXX shared module ha_mroonga.so
[100%] Built target ha_mroonga
make  4.66s user 0.39s system 97% cpu 5.204 total

#7 Updated by Kentaro HAYASHI over 5 years ago

以下を参考にMySQLをビルドできることを確認。

http://d.hatena.ne.jp/torutk/20100927/p1

また、ビルド時にinclude/mysqld_error.hが生成されることを確認。

コンソールからビルドする場合には、devenvが使えないため、 以下のようにする必要がある。

msbuild MySQL.sln /p:Configuration=Release

mysql.exeはclient/Release以下に生成される。

c:\work\mysql\mysql-5.5.28-vs2010-x64>dir client\Release
 Volume in drive C has no label.
 Volume Serial Number is 5205-E186

 Directory of c:\work\mysql\mysql-5.5.28-vs2010-x64\client\Release

2012/10/03  14:06              .
2012/10/03  14:06              ..
2012/10/03  13:34            53,248 echo.exe
2012/10/03  13:34            61,440 echo.pdb
2012/10/03  14:06         3,336,704 mysql.exe
2012/10/03  13:38           126,976 mysql.pdb
2012/10/03  14:06         3,250,176 mysqladmin.exe
2012/10/03  13:38           118,784 mysqladmin.pdb
2012/10/03  14:06         3,320,320 mysqlbinlog.exe
2012/10/03  13:38           167,936 mysqlbinlog.pdb
2012/10/03  14:06         3,245,568 mysqlcheck.exe
2012/10/03  13:38           102,400 mysqlcheck.pdb
2012/10/03  14:06         3,317,248 mysqldump.exe
2012/10/03  13:38           110,592 mysqldump.pdb
2012/10/03  14:06         3,238,912 mysqlimport.exe
2012/10/03  13:38            94,208 mysqlimport.pdb
2012/10/03  14:06         3,241,472 mysqlshow.exe
2012/10/03  13:39            94,208 mysqlshow.pdb
2012/10/03  14:06         3,261,952 mysqlslap.exe
2012/10/03  13:39           102,400 mysqlslap.pdb
2012/10/03  14:06         3,486,208 mysqltest.exe
2012/10/03  13:39           135,168 mysqltest.pdb
2012/10/03  14:06         2,848,256 mysql_plugin.exe
2012/10/03  13:38            86,016 mysql_plugin.pdb
2012/10/03  14:06         2,925,056 mysql_upgrade.exe
2012/10/03  13:38            94,208 mysql_upgrade.pdb
              24 File(s)     36,819,456 bytes
               2 Dir(s)  149,905,424,384 bytes free

mysqld.exeはsql/Release以下に生成される。

c:\work\mysql\mysql-5.5.28-vs2010-x64>dir sql\Release
 Volume in drive C has no label.
 Volume Serial Number is 5205-E186

 Directory of c:\work\mysql\mysql-5.5.28-vs2010-x64\sql\Release

2012/10/03  14:05              .
2012/10/03  14:05              ..
2012/10/03  13:34            83,456 gen_lex_hash.exe
2012/10/03  13:34            77,824 gen_lex_hash.pdb
2012/10/03  14:05         9,244,160 mysqld.exe
2012/10/03  14:05         2,618,293 mysqld.exp
2012/10/03  14:05         4,220,220 mysqld.lib
2012/10/03  14:05            69,632 mysqld.pdb
2012/10/03  13:38         2,814,976 mysql_tzinfo_to_sql.exe
2012/10/03  13:38           126,976 mysql_tzinfo_to_sql.pdb
2012/10/03  13:35           407,518 partition.lib
2012/10/03  13:35           897,024 partition.pdb
2012/10/03  13:37           406,836 partition_embedded.lib
2012/10/03  13:37           897,024 partition_embedded.pdb
2012/10/03  14:05        36,690,462 sql.lib
2012/10/03  14:05         1,617,920 sql.pdb
2012/10/03  13:39            73,728 udf_example.dll
2012/10/03  13:39             3,475 udf_example.exp
2012/10/03  13:39             6,206 udf_example.lib
2012/10/03  13:39            86,016 udf_example.pdb
              18 File(s)     60,341,746 bytes
               2 Dir(s)  149,894,053,888 bytes free

#8 Updated by Kentaro HAYASHI over 5 years ago

mysql_config.plの対策をした上で、cmakeを再度実行した。

cmake . --debug-output -G "Visual Studio 10 Win64" -DMYSQL_SOURCE_DIR=..\..\mysql\mysql-5.5.28-vs2010-x64 -DMYSQL_BUILD_DIR=..\..\mysql\mysql-5.5.28-vs2010-x64 -DMYSQL_CONFIG=mysql_config.pl > debug.log 2>&1

このとき、以下のエラーとなる。

Running with debug output on.
-- Found Windows SDK v7.1: C:\Program Files\Microsoft SDKs\Windows\v7.1\
   Called from: [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt
-- Check for working C compiler using: Visual Studio 10 Win64
   Called from: [2] c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake
                [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt
-- Check for working C compiler using: Visual Studio 10 Win64 -- works
   Called from: [2] c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake
                [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt
-- Detecting C compiler ABI info
   Called from: [2] c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake
                [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt
-- Detecting C compiler ABI info - done
   Called from: [2] c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake
                [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt
-- Check for working CXX compiler using: Visual Studio 10 Win64
   Called from: [2] c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake
                [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt
-- Check for working CXX compiler using: Visual Studio 10 Win64 -- works
   Called from: [2] c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake
                [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt
-- Detecting CXX compiler ABI info
   Called from: [2] c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake
                [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt
-- Detecting CXX compiler ABI info - done
   Called from: [2] c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake
                [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt
CMake Error at CMakeLists.txt:62 (string):
  string sub-command STRIP requires two arguments.
Call Stack (most recent call first):
  CMakeLists.txt:66 (set_mysql_config_value)

Called from: [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt CMake Error at CMakeLists.txt:62 (string): string sub-command STRIP requires two arguments. Call Stack (most recent call first): CMakeLists.txt:67 (set_mysql_config_value)

Called from: [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt CMake Error at CMakeLists.txt:62 (string): string sub-command STRIP requires two arguments. Call Stack (most recent call first): CMakeLists.txt:68 (set_mysql_config_value)

Called from: [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) Called from: [2] c:/WinApp/cmake/share/cmake-2.8/Modules/FindPkgConfig.cmake [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt CMake Error at c:/WinApp/cmake/share/cmake-2.8/Modules/FindPkgConfig.cmake:319 (message): pkg-config tool not found Call Stack (most recent call first): c:/WinApp/cmake/share/cmake-2.8/Modules/FindPkgConfig.cmake:333 (_pkg_check_modules_internal) CMakeLists.txt:71 (pkg_check_modules)

Called from: [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt CMake Error at CMakeLists.txt:125 (install): install TARGETS given no LIBRARY DESTINATION for module target "ha_mroonga".

Called from: [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt -- Configuring incomplete, errors occurred!

#9 Updated by Kentaro HAYASHI over 5 years ago

CMakeCache.txtを削除して、詳細なトレースを確認してみた。 トレースは--traceを指定することにより取得した。

cmake . --trace -G "Visual Studio 10 Win64" -DMYSQL_SOURCE_DIR=..\..\mysql\mysql-5.5.28-vs2010-x64 -DMYSQL_BUILD_DIR=..\..\mysql\mysql-5.5.28-vs2010-x64 -DMYSQL_CONFIG=mysql_config.pl > trace.log 2>&1

エラーの要因となっているのは以下のマクロの処理中と判明。

macro(SET_MYSQL_CONFIG_VALUE OPTION VARIABLE)
  if(NOT ${VARIABLE})
    execute_process(COMMAND "${MYSQL_CONFIG}" ${OPTION}
      OUTPUT_VARIABLE MYSQL_CONFIG_OUTPUT)
    string(STRIP ${MYSQL_CONFIG_OUTPUT} ${VARIABLE})
  endif()
endmacro()

set_mysql_config_value("--plugindir" MYSQL_PLUGIN_DIR) set_mysql_config_value("--cflags" MYSQL_CFLAGS) set_mysql_config_value("--version" MYSQL_VERSION)

トレースログの詳細は以下の通り。

Running with trace output on.
C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt(17):  cmake_minimum_required(VERSION 2.6 )
C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt(18):  project(mroonga )
-- Found Windows SDK v7.1: C:\Program Files\Microsoft SDKs\Windows\v7.1\
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeVS10FindMake.cmake(18):  FIND_PROGRAM(CMAKE_MAKE_PROGRAM NAMES devenv HINTS [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\Setup\VS;EnvironmentDirectory] [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\Setup;Dbghelp_path] $ENV{ProgramFiles}/Microsoft Visual Studio 10.0/Common7/IDE $ENV{ProgramFiles}/Microsoft Visual Studio10.0/Common7/IDE $ENV{ProgramFiles}/Microsoft Visual Studio 10/Common7/IDE $ENV{ProgramFiles}/Microsoft Visual Studio10/Common7/IDE $ENV{ProgramFiles} (x86)/Microsoft Visual Studio 10.0/Common7/IDE $ENV{ProgramFiles} (x86)/Microsoft Visual Studio10.0/Common7/IDE $ENV{ProgramFiles} (x86)/Microsoft Visual Studio 10/Common7/IDE $ENV{ProgramFiles} (x86)/Microsoft Visual Studio10/Common7/IDE /Program Files/Microsoft Visual Studio 10.0/Common7/IDE/ /Program Files/Microsoft Visual Studio 10/Common7/IDE/ )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeVS10FindMake.cmake(42):  IF(NOT CMAKE_CROSSCOMPILING )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeVS10FindMake.cmake(43):  FIND_PROGRAM(CMAKE_MAKE_PROGRAM NAMES MSBuild HINTS [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\Setup\VS;ProductDir] $ENV{SYSTEMROOT}/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0;CLR Version]/ c:/WINDOWS/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0;CLR Version]/ $ENV{SYSTEMROOT}/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VCExpress\10.0;CLR Version]/ )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeVS10FindMake.cmake(52):  MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeVS10FindMake.cmake(53):  SET(MSVC10 1 )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeVS10FindMake.cmake(54):  SET(MSVC_VERSION 1600 )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(45):  IF(CMAKE_HOST_UNIX )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(73):  ELSE(CMAKE_HOST_UNIX )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(74):  IF(CMAKE_HOST_WIN32 )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(75):  SET(CMAKE_HOST_SYSTEM_NAME Windows )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(76):  SET(CMAKE_HOST_SYSTEM_PROCESSOR $ENV{PROCESSOR_ARCHITECTURE} )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(84):  IF(CMAKE_TOOLCHAIN_FILE )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(104):  IF(CMAKE_SYSTEM_NAME )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(109):  ELSE(CMAKE_SYSTEM_NAME )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(110):  SET(CMAKE_SYSTEM_NAME ${CMAKE_HOST_SYSTEM_NAME} )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(111):  SET(CMAKE_SYSTEM_VERSION ${CMAKE_HOST_SYSTEM_VERSION} )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(112):  SET(CMAKE_SYSTEM_PROCESSOR ${CMAKE_HOST_SYSTEM_PROCESSOR} )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(113):  SET(CMAKE_CROSSCOMPILING FALSE )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(114):  SET(PRESET_CMAKE_SYSTEM_NAME FALSE )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(118):  MACRO(ADJUST_CMAKE_SYSTEM_VARIABLES PREFIX )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(147):  ADJUST_CMAKE_SYSTEM_VARIABLES(CMAKE_SYSTEM )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(119):  IF(NOT CMAKE_SYSTEM_NAME )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(124):  IF(CMAKE_SYSTEM_NAME MATCHES BSD.OS )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(129):  IF(CMAKE_SYSTEM_NAME MATCHES kFreeBSD )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(134):  IF(CMAKE_SYSTEM_NAME MATCHES CYGWIN )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(139):  SET(CMAKE_SYSTEM ${CMAKE_SYSTEM_NAME} )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(141):  IF(CMAKE_SYSTEM_VERSION )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(142):  SET(CMAKE_SYSTEM ${CMAKE_SYSTEM}-${CMAKE_SYSTEM_VERSION} )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(148):  ADJUST_CMAKE_SYSTEM_VARIABLES(CMAKE_HOST_SYSTEM )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(119):  IF(NOT CMAKE_HOST_SYSTEM_NAME )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(124):  IF(CMAKE_HOST_SYSTEM_NAME MATCHES BSD.OS )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(129):  IF(CMAKE_HOST_SYSTEM_NAME MATCHES kFreeBSD )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(134):  IF(CMAKE_HOST_SYSTEM_NAME MATCHES CYGWIN )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(139):  SET(CMAKE_HOST_SYSTEM ${CMAKE_HOST_SYSTEM_NAME} )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(141):  IF(CMAKE_HOST_SYSTEM_VERSION )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(142):  SET(CMAKE_HOST_SYSTEM ${CMAKE_HOST_SYSTEM}-${CMAKE_HOST_SYSTEM_VERSION} )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(152):  IF(CMAKE_BINARY_DIR )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(154):  IF(PRESET_CMAKE_SYSTEM_NAME )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(159):  ELSE(PRESET_CMAKE_SYSTEM_NAME )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(160):  FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log The system is: ${CMAKE_SYSTEM_NAME} - ${CMAKE_SYSTEM_VERSION} - ${CMAKE_SYSTEM_PROCESSOR}\n )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(166):  SET(INCLUDE_CMAKE_TOOLCHAIN_FILE_IF_REQUIRED )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(167):  IF(DEFINED CMAKE_TOOLCHAIN_FILE )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(172):  CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeSystem.cmake.in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeSystem.cmake IMMEDIATE @ONLY )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeSystem.cmake(3):  SET(CMAKE_SYSTEM Windows-6.1 )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeSystem.cmake(4):  SET(CMAKE_SYSTEM_NAME Windows )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeSystem.cmake(5):  SET(CMAKE_SYSTEM_VERSION 6.1 )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeSystem.cmake(6):  SET(CMAKE_SYSTEM_PROCESSOR x86 )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeSystem.cmake(8):  SET(CMAKE_HOST_SYSTEM Windows-6.1 )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeSystem.cmake(9):  SET(CMAKE_HOST_SYSTEM_NAME Windows )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeSystem.cmake(10):  SET(CMAKE_HOST_SYSTEM_VERSION 6.1 )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeSystem.cmake(11):  SET(CMAKE_HOST_SYSTEM_PROCESSOR x86 )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeSystem.cmake(13):  SET(CMAKE_CROSSCOMPILING FALSE )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeSystem.cmake(15):  SET(CMAKE_SYSTEM_LOADED 1 )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake(34):  IF(NOT CMAKE_C_COMPILER )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake(35):  SET(CMAKE_C_COMPILER_INIT NOTFOUND )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake(38):  IF($ENV{CC} MATCHES .+ )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake(49):  IF(CMAKE_GENERATOR_CC )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake(50):  IF(NOT CMAKE_C_COMPILER_INIT )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake(51):  SET(CMAKE_C_COMPILER_INIT ${CMAKE_GENERATOR_CC} )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake(56):  IF(CMAKE_C_COMPILER_INIT )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake(57):  SET(CMAKE_C_COMPILER_LIST ${CMAKE_C_COMPILER_INIT} )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake(63):  IF(_CMAKE_USER_CXX_COMPILER_PATH )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake(66):  FIND_PROGRAM(CMAKE_C_COMPILER NAMES ${CMAKE_C_COMPILER_LIST} DOC C compiler )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake(68):  IF(CMAKE_C_COMPILER_INIT AND NOT CMAKE_C_COMPILER )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake(98):  MARK_AS_ADVANCED(CMAKE_C_COMPILER )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake(100):  IF(NOT CMAKE_TOOLCHAIN_LOCATION )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake(101):  GET_FILENAME_COMPONENT(_CMAKE_TOOLCHAIN_LOCATION ${CMAKE_C_COMPILER} PATH )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake(105):  IF(${CMAKE_GENERATOR} MATCHES Visual Studio )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake(106):  SET(CMAKE_C_COMPILER_ID_RUN 1 )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake(107):  SET(CMAKE_C_PLATFORM_ID Windows )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake(108):  SET(CMAKE_C_COMPILER_ID MSVC )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake(111):  IF(NOT CMAKE_C_COMPILER_ID_RUN )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake(150):  IF(CMAKE_CROSSCOMPILING AND ${CMAKE_C_COMPILER_ID} MATCHES GNU AND NOT CMAKE_TOOLCHAIN_PREFIX )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake(168):  INCLUDE(${CMAKE_ROOT}/Modules/CMakeClDeps.cmake )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeClDeps.cmake(23):  IF(MSVC_C_ARCHITECTURE_ID AND CMAKE_GENERATOR MATCHES Ninja AND CMAKE_C_COMPILER AND CMAKE_COMMAND )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake(169):  INCLUDE(CMakeFindBinUtils )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeFindBinUtils.cmake(33):  IF(${CMAKE_CXX_COMPILER_ID} MATCHES MSVC OR ${CMAKE_C_COMPILER_ID} MATCHES MSVC OR ${CMAKE_GENERATOR} MATCHES Visual Studio )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeFindBinUtils.cmake(37):  FIND_PROGRAM(CMAKE_LINKER NAMES link HINTS ${_CMAKE_TOOLCHAIN_LOCATION} )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeFindBinUtils.cmake(39):  MARK_AS_ADVANCED(CMAKE_LINKER )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeFindBinUtils.cmake(67):  IF(APPLE )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake(170):  IF(MSVC_C_ARCHITECTURE_ID )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake(171):  SET(SET_MSVC_C_ARCHITECTURE_ID SET(MSVC_C_ARCHITECTURE_ID ${MSVC_C_ARCHITECTURE_ID}) )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake(175):  CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in ${CMAKE_PLATFORM_ROOT_BIN}/CMakeCCompiler.cmake @ONLY IMMEDIATE )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake(179):  SET(CMAKE_C_COMPILER_ENV_VAR CC )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCCompiler.cmake(1):  SET(CMAKE_C_COMPILER c:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/cl.exe )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCCompiler.cmake(2):  SET(CMAKE_C_COMPILER_ARG1  )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCCompiler.cmake(3):  SET(CMAKE_C_COMPILER_ID MSVC )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCCompiler.cmake(4):  SET(CMAKE_C_COMPILER_VERSION  )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCCompiler.cmake(5):  SET(CMAKE_C_PLATFORM_ID Windows )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCCompiler.cmake(6):  SET(MSVC_C_ARCHITECTURE_ID x64 )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCCompiler.cmake(7):  SET(CMAKE_AR  )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCCompiler.cmake(8):  SET(CMAKE_RANLIB  )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCCompiler.cmake(9):  SET(CMAKE_LINKER c:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/link.exe )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCCompiler.cmake(10):  SET(CMAKE_COMPILER_IS_GNUCC )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCCompiler.cmake(11):  SET(CMAKE_C_COMPILER_LOADED 1 )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCCompiler.cmake(12):  SET(CMAKE_COMPILER_IS_MINGW )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCCompiler.cmake(13):  SET(CMAKE_COMPILER_IS_CYGWIN )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCCompiler.cmake(14):  IF(CMAKE_COMPILER_IS_CYGWIN )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCCompiler.cmake(19):  SET(CMAKE_C_COMPILER_ENV_VAR CC )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCCompiler.cmake(21):  IF(CMAKE_COMPILER_IS_MINGW )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCCompiler.cmake(24):  SET(CMAKE_C_COMPILER_ID_RUN 1 )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCCompiler.cmake(25):  SET(CMAKE_C_SOURCE_FILE_EXTENSIONS c )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCCompiler.cmake(26):  SET(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCCompiler.cmake(27):  SET(CMAKE_C_LINKER_PREFERENCE 10 )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCCompiler.cmake(30):  SET(CMAKE_C_SIZEOF_DATA_PTR  )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCCompiler.cmake(31):  SET(CMAKE_C_COMPILER_ABI  )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCCompiler.cmake(32):  SET(CMAKE_C_LIBRARY_ARCHITECTURE  )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCCompiler.cmake(34):  IF(CMAKE_C_SIZEOF_DATA_PTR )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCCompiler.cmake(38):  IF(CMAKE_C_COMPILER_ABI )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCCompiler.cmake(42):  IF(CMAKE_C_LIBRARY_ARCHITECTURE )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCCompiler.cmake(46):  SET(CMAKE_C_HAS_ISYSROOT  )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCCompiler.cmake(49):  SET(CMAKE_C_IMPLICIT_LINK_LIBRARIES  )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCCompiler.cmake(50):  SET(CMAKE_C_IMPLICIT_LINK_DIRECTORIES  )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake(33):  IF(NOT CMAKE_CXX_COMPILER )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake(34):  SET(CMAKECXX_COMPILER_INIT NOTFOUND )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake(37):  IF($ENV{CXX} MATCHES .+ )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake(48):  IF(CMAKE_GENERATOR_CXX )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake(49):  IF(NOT CMAKE_CXX_COMPILER_INIT )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake(50):  SET(CMAKE_CXX_COMPILER_INIT ${CMAKE_GENERATOR_CXX} )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake(55):  IF(CMAKE_CXX_COMPILER_INIT )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake(56):  SET(CMAKE_CXX_COMPILER_LIST ${CMAKE_CXX_COMPILER_INIT} )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake(62):  IF(_CMAKE_USER_C_COMPILER_PATH )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake(65):  FIND_PROGRAM(CMAKE_CXX_COMPILER NAMES ${CMAKE_CXX_COMPILER_LIST} DOC C++ compiler )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake(67):  IF(CMAKE_CXX_COMPILER_INIT AND NOT CMAKE_CXX_COMPILER )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake(98):  MARK_AS_ADVANCED(CMAKE_CXX_COMPILER )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake(100):  IF(NOT CMAKE_TOOLCHAIN_LOCATION )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake(117):  IF(${CMAKE_GENERATOR} MATCHES Visual Studio )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake(118):  SET(CMAKE_CXX_COMPILER_ID_RUN 1 )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake(119):  SET(CMAKE_CXX_PLATFORM_ID Windows )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake(120):  SET(CMAKE_CXX_COMPILER_ID MSVC )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake(122):  IF(NOT CMAKE_CXX_COMPILER_ID_RUN )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake(158):  IF(CMAKE_CROSSCOMPILING AND ${CMAKE_CXX_COMPILER_ID} MATCHES GNU AND NOT CMAKE_TOOLCHAIN_PREFIX )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake(176):  INCLUDE(${CMAKE_ROOT}/Modules/CMakeClDeps.cmake )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeClDeps.cmake(23):  IF(MSVC_C_ARCHITECTURE_ID AND CMAKE_GENERATOR MATCHES Ninja AND CMAKE_C_COMPILER AND CMAKE_COMMAND )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake(177):  INCLUDE(CMakeFindBinUtils )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeFindBinUtils.cmake(33):  IF(${CMAKE_CXX_COMPILERID} MATCHES MSVC OR ${CMAKE_C_COMPILER_ID} MATCHES MSVC OR ${CMAKE_GENERATOR} MATCHES Visual Studio )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeFindBinUtils.cmake(37):  FIND_PROGRAM(CMAKE_LINKER NAMES link HINTS ${_CMAKE_TOOLCHAIN_LOCATION} )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeFindBinUtils.cmake(39):  MARK_AS_ADVANCED(CMAKE_LINKER )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeFindBinUtils.cmake(67):  IF(APPLE )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake(178):  IF(MSVCCXX_ARCHITECTURE_ID )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake(179):  SET(SET_MSVC_CXX_ARCHITECTURE_ID SET(MSVC_CXX_ARCHITECTURE_ID ${MSVC_CXX_ARCHITECTURE_ID}) )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake(183):  CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeCXXCompiler.cmake.in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXCompiler.cmake @ONLY IMMEDIATE )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake(188):  SET(CMAKE_CXX_COMPILER_ENV_VAR CXX )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCXXCompiler.cmake(1):  SET(CMAKE_CXX_COMPILER c:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/cl.exe )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCXXCompiler.cmake(2):  SET(CMAKE_CXX_COMPILER_ARG1  )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCXXCompiler.cmake(3):  SET(CMAKE_CXX_COMPILER_ID MSVC )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCXXCompiler.cmake(4):  SET(CMAKE_CXX_COMPILER_VERSION  )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCXXCompiler.cmake(5):  SET(CMAKE_CXX_PLATFORM_ID Windows )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCXXCompiler.cmake(6):  SET(MSVC_CXX_ARCHITECTURE_ID x64 )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCXXCompiler.cmake(7):  SET(CMAKE_AR  )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCXXCompiler.cmake(8):  SET(CMAKE_RANLIB  )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCXXCompiler.cmake(9):  SET(CMAKE_LINKER c:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/link.exe )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCXXCompiler.cmake(10):  SET(CMAKECOMPILER_IS_GNUCXX )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCXXCompiler.cmake(11):  SET(CMAKE_CXX_COMPILER_LOADED 1 )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCXXCompiler.cmake(12):  SET(CMAKE_COMPILER_IS_MINGW )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCXXCompiler.cmake(13):  SET(CMAKE_COMPILER_IS_CYGWIN )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCXXCompiler.cmake(14):  IF(CMAKE_COMPILER_IS_CYGWIN )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCXXCompiler.cmake(19):  SET(CMAKE_CXX_COMPILER_ENV_VAR CXX )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCXXCompiler.cmake(21):  IF(CMAKE_COMPILER_IS_MINGW )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCXXCompiler.cmake(24):  SET(CMAKE_CXX_COMPILER_ID_RUN 1 )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCXXCompiler.cmake(25):  SET(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCXXCompiler.cmake(26):  SET(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;CPP )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCXXCompiler.cmake(27):  SET(CMAKE_CXX_LINKER_PREFERENCE 30 )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCXXCompiler.cmake(28):  SET(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1 )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCXXCompiler.cmake(31):  SET(CMAKE_CXX_SIZEOF_DATA_PTR  )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCXXCompiler.cmake(32):  SET(CMAKE_CXX_COMPILER_ABI  )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCXXCompiler.cmake(33):  SET(CMAKE_CXX_LIBRARY_ARCHITECTURE  )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCXXCompiler.cmake(35):  IF(CMAKE_CXX_SIZEOF_DATA_PTR )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCXXCompiler.cmake(39):  IF(CMAKE_CXX_COMPILER_ABI )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCXXCompiler.cmake(43):  IF(CMAKE_CXX_LIBRARY_ARCHITECTURE )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCXXCompiler.cmake(47):  SET(CMAKE_CXX_HAS_ISYSROOT  )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCXXCompiler.cmake(50):  SET(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES  )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeCXXCompiler.cmake(51):  SET(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES  )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeSystemSpecificInformation.cmake(24):  SET(APPLE )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeSystemSpecificInformation.cmake(25):  SET(UNIX )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeSystemSpecificInformation.cmake(26):  SET(CYGWIN )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeSystemSpecificInformation.cmake(27):  SET(WIN32 )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeSystemSpecificInformation.cmake(31):  INCLUDE(CMakeGenericSystem )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(15):  SET(CMAKE_SHARED_LIBRARY_C_FLAGS  )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(16):  SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS -shared )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(17):  SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS  )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(18):  SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG  )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(19):  SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP  )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(20):  SET(CMAKE_INCLUDE_FLAG_C -I )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(21):  SET(CMAKE_INCLUDE_FLAG_C_SEP  )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(22):  SET(CMAKE_LIBRARY_PATH_FLAG -L )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(23):  SET(CMAKE_LIBRARY_PATH_TERMINATOR  )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(24):  SET(CMAKE_LINK_LIBRARY_FLAG -l )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(26):  SET(CMAKE_LINK_LIBRARY_SUFFIX  )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(27):  SET(CMAKE_STATIC_LIBRARY_PREFIX lib )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(28):  SET(CMAKE_STATIC_LIBRARY_SUFFIX .a )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(29):  SET(CMAKE_SHARED_LIBRARY_PREFIX lib )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(30):  SET(CMAKE_SHARED_LIBRARY_SUFFIX .so )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(31):  SET(CMAKE_EXECUTABLE_SUFFIX  )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(32):  SET(CMAKE_DL_LIBS dl )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(34):  SET(CMAKE_FIND_LIBRARY_PREFIXES lib )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(35):  SET(CMAKE_FIND_LIBRARY_SUFFIXES .so .a )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(38):  SET_PROPERTY(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(40):  SET(CMAKE_SKIP_RPATH NO CACHE BOOL If set, runtime paths are not added when using shared libraries. )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(42):  SET(CMAKE_SKIP_INSTALL_RPATH NO CACHE BOOL If set, runtime paths are not added when installing shared libraries, but are added when building. )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(45):  SET(CMAKE_VERBOSE_MAKEFILE FALSE CACHE BOOL If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make.  This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo. )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(47):  IF(CMAKE_GENERATOR MATCHES Makefiles )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(63):  IF(CMAKE_GENERATOR MATCHES Ninja )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(77):  function(GetDefaultWindowsPrefixBase var )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(163):  IF(NOT DEFINED CMAKE_INSTALL_PREFIX )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(164):  SET(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT 1 )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(168):  IF(CMAKE_HOST_UNIX )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(171):  ELSE(CMAKE_HOST_UNIX )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(172):  GetDefaultWindowsPrefixBase(CMAKE_GENERIC_PROGRAM_FILES )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(84):  if(${CMAKE_GENERATOR} MATCHES (Win64|IA64) )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(85):  set(arch_hint x64 )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(94):  if(NOT arch_hint )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(116):  set(_PREFIX_ENV_VAR ProgramFiles )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(118):  if($ENV{ProgramW6432} STREQUAL  )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(122):  else()
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(124):  if($ENV{ProgramW6432} STREQUAL $ENV{ProgramFiles} )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(131):  else()
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(134):  if(${arch_hint} STREQUAL x64 )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(136):  set(_PREFIX_ENV_VAR ProgramW6432 )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(147):  if(NOT $ENV{${_PREFIX_ENV_VAR}} STREQUAL  )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(148):  file(TO_CMAKE_PATH $ENV{${_PREFIX_ENV_VAR}} base )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(155):  set(${var} ${_base} PARENT_SCOPE )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(173):  SET(CMAKE_INSTALL_PREFIX ${CMAKE_GENERIC_PROGRAM_FILES}/${PROJECT_NAME} CACHE PATH Install path prefix, prepended onto install directories. )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(176):  SET(CMAKE_GENERIC_PROGRAM_FILES )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(181):  SET(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME Unspecified )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeGenericSystem.cmake(183):  MARK_AS_ADVANCED(CMAKE_SKIP_RPATH CMAKE_SKIP_INSTALL_RPATH CMAKE_VERBOSE_MAKEFILE )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeSystemSpecificInformation.cmake(34):  SET(CMAKE_SYSTEM_INFO_FILE Platform/${CMAKE_SYSTEM_NAME} )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeSystemSpecificInformation.cmake(36):  INCLUDE(${CMAKE_SYSTEM_INFO_FILE} OPTIONAL RESULT_VARIABLE INCLUDED_SYSTEM_INFO_FILE )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows.cmake(1):  SET(WIN32 1 )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows.cmake(3):  SET(CMAKE_STATIC_LIBRARYPREFIX  )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows.cmake(4):  SET(CMAKE_STATIC_LIBRARY_SUFFIX .lib )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows.cmake(5):  SET(CMAKESHARED_LIBRARY_PREFIX  )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows.cmake(6):  SET(CMAKE_SHARED_LIBRARY_SUFFIX .dll )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows.cmake(7):  SET(CMAKE_IMPORT_LIBRARY_PREFIX  )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows.cmake(8):  SET(CMAKE_IMPORT_LIBRARY_SUFFIX .lib )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows.cmake(9):  SET(CMAKE_EXECUTABLE_SUFFIX .exe )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows.cmake(10):  SET(CMAKE_LINK_LIBRARY_SUFFIX .lib )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows.cmake(11):  SET(CMAKE_DL_LIBS  )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows.cmake(13):  SET(CMAKE_FIND_LIBRARY_PREFIXES  )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows.cmake(14):  SET(CMAKE_FIND_LIBRARY_SUFFIXES .lib )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows.cmake(18):  IF(CMAKE_GENERATOR MATCHES Borland )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows.cmake(25):  IF(CMAKE_GENERATOR MATCHES NMake )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows.cmake(30):  INCLUDE(Platform/WindowsPaths )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/WindowsPaths.cmake(20):  IF(_WINDOWS_PATHS_INCLUDED )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/WindowsPaths.cmake(23):  SET(__WINDOWS_PATHS_INCLUDED 1 )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/WindowsPaths.cmake(45):  IF(DEFINED ENV{ProgramW6432} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/WindowsPaths.cmake(48):  LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH $ENV{ProgramW6432} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/WindowsPaths.cmake(51):  IF(DEFINED ENV{ProgramFiles} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/WindowsPaths.cmake(52):  LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH $ENV{ProgramFiles} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/WindowsPaths.cmake(72):  GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR ${CMAKE_ROOT} PATH )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/WindowsPaths.cmake(73):  GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR ${_CMAKE_INSTALL_DIR} PATH )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/WindowsPaths.cmake(74):  LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH ${_CMAKE_INSTALL_DIR} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/WindowsPaths.cmake(77):  LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH ${CMAKE_INSTALL_PREFIX} / )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/WindowsPaths.cmake(85):  LIST(APPEND CMAKE_SYSTEM_INCLUDE_PATH )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/WindowsPaths.cmake(89):  LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_INSTALL_PREFIX}/bin ${_CMAKE_INSTALL_DIR}/bin /bin )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/WindowsPaths.cmake(95):  LIST(APPEND CMAKE_SYSTEM_PROGRAM_PATH )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeSystemSpecificInformation.cmake(38):  IF(NOT INCLUDED_SYSTEM_INFO_FILE )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeSystemSpecificInformation.cmake(53):  IF(CMAKE_EXTRA_GENERATOR )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeSystemSpecificInformation.cmake(63):  IF(NOT CMAKE_MODULE_EXISTS )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeSystemSpecificInformation.cmake(64):  SET(CMAKE_SHARED_MODULE_PREFIX ${CMAKE_SHARED_LIBRARY_PREFIX} )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeSystemSpecificInformation.cmake(65):  SET(CMAKE_SHARED_MODULE_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX} )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeSystemSpecificInformation.cmake(69):  SET(CMAKE_SYSTEM_SPECIFIC_INFORMATION_LOADED 1 )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(23):  IF(UNIX )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(25):  ELSE(UNIX )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(26):  SET(CMAKE_C_OUTPUT_EXTENSION .obj )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(29):  SET(_INCLUDED_FILE 0 )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(32):  IF(CMAKE_C_COMPILER_ID )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(33):  INCLUDE(Compiler/${CMAKE_C_COMPILER_ID}-C OPTIONAL )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(36):  SET(CMAKE_BASE_NAME )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(37):  GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_C_COMPILER} NAME_WE )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(38):  IF(CMAKE_COMPILER_IS_GNUCC )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(44):  IF(CMAKE_SYSTEM_PROCESSOR )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(45):  IF(CMAKE_C_COMPILER_ID )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(46):  INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-C-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE INCLUDED_FILE )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(48):  IF(NOT INCLUDED_FILE )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(49):  INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(55):  IF(CMAKE_C_COMPILER_ID )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(56):  INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-C OPTIONAL RESULT_VARIABLE INCLUDED_FILE )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(59):  IF(NOT INCLUDED_FILE )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(60):  INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL RESULT_VARIABLE INCLUDED_FILE )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(2):  INCLUDE(${CMAKE_PLATFORM_ROOT_BIN}/CMakeCPlatform.cmake OPTIONAL )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(4):  INCLUDE(${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake OPTIONAL )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(6):  SET(WIN32 1 )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(8):  INCLUDE(Platform/cl )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/cl.cmake(1):  SET(CMAKELIBRARY_PATH_FLAG -LIBPATH: )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/cl.cmake(2):  SET(CMAKELINK_LIBRARY_FLAG  )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/cl.cmake(3):  SET(MSVC 1 )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/cl.cmake(9):  IF(NOT DEFINED CMAKE_LINKER )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/cl.cmake(13):  IF(CMAKE_VERBOSE_MAKEFILE )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/cl.cmake(15):  ELSE(CMAKE_VERBOSE_MAKEFILE )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/cl.cmake(16):  SET(CMAKE_CL_NOLOGO /nologo )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/cl.cmake(19):  SET(CMAKE_CXX_CREATE_SHARED_LIBRARY  ${CMAKE_CL_NOLOGO}  ${CMAKE_START_TEMP_FILE} /out: /implib:<TARGETIMPLIB> /pdb: /dll /version:.   ${CMAKE_END_TEMP_FILE} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/cl.cmake(21):  SET(CMAKE_CXX_CREATE_SHARED_MODULE ${CMAKE_CXX_CREATE_SHARED_LIBRARY} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/cl.cmake(24):  SET(CMAKE_C_CREATE_SHARED_LIBRARY ${CMAKE_CXX_CREATE_SHARED_LIBRARY} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/cl.cmake(27):  SET(CMAKE_C_CREATE_SHARED_MODULE ${CMAKE_CXX_CREATE_SHARED_MODULE} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/cl.cmake(30):  SET(CMAKE_CXX_CREATE_STATIC_LIBRARY  /lib ${CMAKE_CL_NOLOGO}  /out:   )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/cl.cmake(33):  SET(CMAKE_C_CREATE_STATIC_LIBRARY ${CMAKE_CXX_CREATE_STATIC_LIBRARY} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/cl.cmake(36):  SET(CMAKE_CXX_COMPILE_OBJECT  ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}   /TP /Fo /Fd -c ${CMAKE_END_TEMP_FILE} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/cl.cmake(40):  SET(CMAKE_C_COMPILE_OBJECT  ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}   /Fo /Fd -c ${CMAKE_END_TEMP_FILE} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/cl.cmake(43):  SET(CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1 )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/cl.cmake(44):  SET(CMAKEC_LINK_EXECUTABLE  ${CMAKE_CL_NOLOGO}  ${CMAKE_START_TEMP_FILE}  /Fe /Fd -link /implib: /version:.   ${CMAKE_END_TEMP_FILE} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/cl.cmake(47):  SET(CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS 1 )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/cl.cmake(48):  SET(CMAKE_CXX_LINK_EXECUTABLE  ${CMAKE_CL_NOLOGO}  ${CMAKE_START_TEMP_FILE}  /Fe /Fd -link /implib: /version:.   ${CMAKE_END_TEMP_FILE} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/cl.cmake(51):  SET(CMAKE_C_CREATE_PREPROCESSED_SOURCE  >  ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}   -E ${CMAKE_END_TEMP_FILE} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/cl.cmake(54):  SET(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE  >  ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}   /TP -E ${CMAKE_END_TEMP_FILE} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/cl.cmake(57):  SET(CMAKE_C_CREATE_ASSEMBLY_SOURCE  ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}  /FAs /FoNUL /Fa /c ${CMAKE_END_TEMP_FILE} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/cl.cmake(60):  SET(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE  ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}  /TP /FAs /FoNUL /Fa /c ${CMAKE_END_TEMP_FILE} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(10):  SET(CMAKE_CREATE_WIN32_EXE /subsystem:windows )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(11):  SET(CMAKE_CREATE_CONSOLE_EXE /subsystem:console )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(13):  IF(CMAKE_GENERATOR MATCHES Visual Studio 6 )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(16):  IF(NOT CMAKE_NO_BUILD_TYPE AND CMAKE_GENERATOR MATCHES Visual Studio )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(17):  SET(CMAKE_NO_BUILD_TYPE 1 )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(18):  SET(CMAKE_CONFIGURATION_TYPES Debug;Release;MinSizeRel;RelWithDebInfo CACHE STRING Semicolon separated list of supported configuration types, only supports Debug, Release, MinSizeRel, and RelWithDebInfo, anything else will be ignored. )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(20):  MARK_AS_ADVANCED(CMAKE_CONFIGURATION_TYPES )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(23):  IF(CMAKE_GENERATOR MATCHES Visual Studio 8 )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(28):  ENABLE_LANGUAGE(RC )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineRCCompiler.cmake(21):  IF(NOT CMAKE_RC_COMPILER )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineRCCompiler.cmake(23):  IF($ENV{RC} MATCHES .+ )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineRCCompiler.cmake(35):  IF(CMAKE_GENERATOR_RC )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineRCCompiler.cmake(36):  IF(NOT CMAKE_RC_COMPILER_INIT )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineRCCompiler.cmake(37):  SET(CMAKE_RC_COMPILER_INIT ${CMAKE_GENERATORRC} )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineRCCompiler.cmake(42):  IF(CMAKE_RC_COMPILER_INIT )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineRCCompiler.cmake(43):  SET(CMAKE_RC_COMPILER_LIST ${CMAKE_RC_COMPILER_INIT} )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineRCCompiler.cmake(49):  FIND_PROGRAM(CMAKE_RC_COMPILER NAMES ${CMAKE_RC_COMPILER_LIST} DOC RC compiler )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineRCCompiler.cmake(50):  IF(CMAKE_RC_COMPILER_INIT AND NOT CMAKE_RC_COMPILER )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineRCCompiler.cmake(55):  MARK_AS_ADVANCED(CMAKE_RC_COMPILER )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineRCCompiler.cmake(57):  GET_FILENAME_COMPONENT(_CMAKE_RC_COMPILER_NAME_WE ${CMAKE_RC_COMPILER} NAME_WE )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineRCCompiler.cmake(58):  IF(_CMAKE_RC_COMPILER_NAME_WE STREQUAL windres )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineRCCompiler.cmake(60):  ELSE()
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineRCCompiler.cmake(61):  SET(CMAKE_RC_OUTPUT_EXTENSION .res )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineRCCompiler.cmake(65):  CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeRCCompiler.cmake.in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeRCCompiler.cmake IMMEDIATE )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeDetermineRCCompiler.cmake(67):  SET(CMAKE_RC_COMPILER_ENV_VAR RC )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeRCCompiler.cmake(1):  SET(CMAKE_RC_COMPILER C:/Program Files (x86)/Microsoft SDKs/Windows/v7.0A/Bin/RC.Exe )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeRCCompiler.cmake(2):  SET(CMAKE_RC_COMPILER_ARG1  )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeRCCompiler.cmake(3):  SET(CMAKE_RC_COMPILER_LOADED 1 )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeRCCompiler.cmake(4):  SET(CMAKE_RC_SOURCE_FILE_EXTENSIONS rc )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeRCCompiler.cmake(5):  SET(CMAKE_RC_OUTPUT_EXTENSION .res )
C:/work/mroonga/mroonga-vs2010-x64/CMakeFiles/CMakeRCCompiler.cmake(6):  SET(CMAKE_RC_COMPILER_ENV_VAR RC )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeRCInformation.cmake(21):  SET(CMAKE_BASE_NAME )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeRCInformation.cmake(22):  GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_RC_COMPILER} NAME_WE )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeRCInformation.cmake(23):  IF(${CMAKE_BASE_NAME} MATCHES windres )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeRCInformation.cmake(26):  SET(CMAKE_SYSTEM_AND_RC_COMPILER_INFO_FILE ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeRCInformation.cmake(28):  INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeRCInformation.cmake(32):  SET(CMAKE_RC_FLAGS $ENV{RCFLAGS} ${CMAKE_RC_FLAGS_INIT} CACHE STRING Flags for Fortran compiler. )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeRCInformation.cmake(38):  SET(CMAKE_RC_FLAG_REGEX -/ )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeRCInformation.cmake(42):  SET(CMAKE_INCLUDE_FLAG_RC -I )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeRCInformation.cmake(44):  IF(NOT CMAKE_RC_COMPILE_OBJECT )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeRCInformation.cmake(45):  SET(CMAKE_RC_COMPILE_OBJECT    /fo  )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeRCInformation.cmake(49):  MARK_AS_ADVANCED(CMAKE_RC_FLAGS )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeRCInformation.cmake(53):  SET(CMAKE_RC_INFORMATION_LOADED 1 )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestRCCompiler.cmake(23):  SET(CMAKE_RC_COMPILER_WORKS 1 CACHE INTERNAL  )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(29):  SET(CMAKE_COMPILE_RESOURCE rc  /fo  )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(39):  SET(MSVC_IDE 1 )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(40):  IF(CMAKE_GENERATOR MATCHES Makefiles OR CMAKE_GENERATOR MATCHES Ninja )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(130):  IF(MSVC_C_ARCHITECTURE_ID MATCHES 64 )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(131):  SET(CMAKE_CL_64 1 )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(135):  IF(CMAKE_FORCE_WIN64 OR CMAKE_FORCE_IA64 )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(136):  SET(CMAKE_CL_64 1 )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(139):  IF(${MSVC_VERSION} GREATER 1599 )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(140):  SET(MSVC_INCREMENTAL_DEFAULT ON )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(144):  IF(MSVC_VERSION GREATER 1310 )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(146):  SET(CMAKE_CXX_CREATE_SHARED_LIBRARY  -E vs_link_dll ${CMAKE_CXX_CREATE_SHARED_LIBRARY} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(147):  SET(CMAKE_CXX_CREATE_SHARED_MODULE  -E vs_link_dll ${CMAKE_CXX_CREATE_SHARED_MODULE} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(149):  SET(CMAKE_C_CREATE_SHARED_LIBRARY ${CMAKE_CXX_CREATE_SHARED_LIBRARY} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(151):  SET(CMAKE_C_CREATE_SHARED_MODULE ${CMAKE_CXX_CREATE_SHARED_MODULE} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(152):  SET(CMAKE_CXX_LINK_EXECUTABLE  -E vs_link_exe ${CMAKE_CXX_LINK_EXECUTABLE} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(153):  SET(CMAKE_C_LINK_EXECUTABLE  -E vs_link_exe ${CMAKE_C_LINK_EXECUTABLE} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(155):  SET(CMAKE_BUILD_TYPE_INIT Debug )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(156):  SET(CMAKE_CXX_FLAGS_INIT /DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(157):  SET(CMAKE_CXX_FLAGS_DEBUG_INIT /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(158):  SET(CMAKE_CXX_FLAGS_MINSIZEREL_INIT /MD /O1 /Ob1 /D NDEBUG )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(159):  SET(CMAKE_CXX_FLAGS_RELEASE_INIT /MD /O2 /Ob2 /D NDEBUG )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(160):  SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT /MD /Zi /O2 /Ob1 /D NDEBUG )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(161):  SET(CMAKE_C_FLAGS_INIT /DWIN32 /D_WINDOWS /W3 /Zm1000 )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(162):  SET(CMAKE_C_FLAGS_DEBUG_INIT /D_DEBUG /MDd /Zi  /Ob0 /Od /RTC1 )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(163):  SET(CMAKE_C_FLAGS_MINSIZEREL_INIT /MD /O1 /Ob1 /D NDEBUG )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(164):  SET(CMAKEC_FLAGS_RELEASE_INIT /MD /O2 /Ob2 /D NDEBUG )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(165):  SET(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT /MD /Zi /O2 /Ob1 /D NDEBUG )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(166):  SET(CMAKE_C_STANDARD_LIBRARIES_INIT kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib  )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(167):  SET(CMAKE_EXE_LINKER_FLAGS_INIT ${CMAKE_EXE_LINKER_FLAGS_INIT} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(198):  SET(CMAKE_CXX_STANDARD_LIBRARIES_INIT ${CMAKE_C_STANDARD_LIBRARIES_INIT} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(201):  SET(CMAKE_LINK_DEF_FILE_FLAG /DEF: )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(203):  SET(_MACHINE_ARCH_FLAG ${MSVC_C_ARCHITECTURE_ID} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(204):  IF(NOT MACHINE_ARCH_FLAG )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(207):  SET(CMAKE_EXE_LINKER_FLAGS_INIT ${CMAKE_EXE_LINKER_FLAGS_INIT} /STACK:10000000 /machine:${_MACHINE_ARCH_FLAG} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(212):  SET(MSVC_INCREMENTAL_YES_FLAG  )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(213):  IF(NOT MSVC_INCREMENTAL_DEFAULT )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(215):  ELSE()
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(216):  SET(MSVC_INCREMENTAL_YES_FLAG /INCREMENTAL )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(219):  IF(CMAKE_COMPILER_SUPPORTS_PDBTYPE )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(222):  ELSE(CMAKE_COMPILER_SUPPORTS_PDBTYPE )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(223):  SET(CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT /debug ${MSVC_INCREMENTAL_YES_FLAG} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(224):  SET(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT /debug ${MSVC_INCREMENTAL_YES_FLAG} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(227):  SET(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT /INCREMENTAL:NO )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(228):  SET(CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT /INCREMENTAL:NO )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(232):  SET(CMAKE_SHARED_LINKER_FLAGS_INIT ${CMAKE_EXE_LINKER_FLAGS_INIT} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(233):  SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(234):  SET(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(235):  SET(CMAKE_SHARED_LINKER_FLAGS_RELEASE_INIT ${CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(236):  SET(CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL_INIT ${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(238):  SET(CMAKE_MODULE_LINKER_FLAGS_INIT ${CMAKE_SHARED_LINKER_FLAGS_INIT} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(239):  SET(CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(240):  SET(CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(241):  SET(CMAKE_MODULE_LINKER_FLAGS_RELEASE_INIT ${CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(242):  SET(CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL_INIT ${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT} )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(245):  IF(NOT EXISTS ${CMAKE_PLATFORM_ROOT_BIN}/CMakeCPlatform.cmake )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(246):  CONFIGURE_FILE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake.in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCPlatform.cmake IMMEDIATE )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(250):  IF(NOT EXISTS ${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake )
c:/WinApp/cmake/share/cmake-2.8/Modules/Platform/Windows-cl.cmake(251):  CONFIGURE_FILE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake.in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXPlatform.cmake IMMEDIATE )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(67):  IF(NOT INCLUDED_FILE )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(71):  IF(CMAKE_C_SIZEOF_DATA_PTR )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(84):  IF(CMAKE_USER_MAKE_RULES_OVERRIDE )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(90):  IF(CMAKE_USER_MAKE_RULES_OVERRIDE_C )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(100):  IF(NOT CMAKE_MODULE_EXISTS )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(101):  SET(CMAKE_SHARED_MODULE_C_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS} )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(102):  SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS} )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(105):  SET(CMAKE_C_FLAGS_INIT $ENV{CFLAGS} ${CMAKE_C_FLAGS_INIT} )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(107):  IF(CMAKE_C_FLAGS_INIT STREQUAL   )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(110):  SET(CMAKE_C_FLAGS ${CMAKE_C_FLAGS_INIT} CACHE STRING Flags used by the compiler during all build types. )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(113):  IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(115):  IF(NOT CMAKE_NO_BUILD_TYPE )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(119):  SET(CMAKE_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG_INIT} CACHE STRING Flags used by the compiler during debug builds. )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(121):  SET(CMAKE_C_FLAGS_MINSIZEREL ${CMAKE_C_FLAGS_MINSIZEREL_INIT} CACHE STRING Flags used by the compiler during release minsize builds. )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(123):  SET(CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE_INIT} CACHE STRING Flags used by the compiler during release builds (/MD /Ob1 /Oi /Ot /Oy /Gs will produce slightly less optimized but smaller files). )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(125):  SET(CMAKEC_FLAGS_RELWITHDEBINFO ${CMAKE_C_FLAGS_RELWITHDEBINFO_INIT} CACHE STRING Flags used by the compiler during Release with Debug Info builds. )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(129):  IF(CMAKE_C_STANDARD_LIBRARIES_INIT )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(130):  SET(CMAKE_C_STANDARD_LIBRARIES ${CMAKE_C_STANDARD_LIBRARIES_INIT} CACHE STRING Libraries linked by defalut with all C applications. )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(132):  MARK_AS_ADVANCED(CMAKE_C_STANDARD_LIBRARIES )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(135):  INCLUDE(CMakeCommonLanguageInclude )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCommonLanguageInclude.cmake(19):  SET(CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS_INIT} $ENV{LDFLAGS} CACHE STRING Flags used by the linker. )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCommonLanguageInclude.cmake(23):  IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCommonLanguageInclude.cmake(25):  IF(NOT CMAKE_NO_BUILD_TYPE )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCommonLanguageInclude.cmake(30):  SET(CMAKE_EXE_LINKER_FLAGS_DEBUG ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT} CACHE STRING Flags used by the linker during debug builds. )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCommonLanguageInclude.cmake(33):  SET(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL ${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT} CACHE STRING Flags used by the linker during release minsize builds. )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCommonLanguageInclude.cmake(36):  SET(CMAKE_EXE_LINKER_FLAGS_RELEASE ${CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT} CACHE STRING Flags used by the linker during release builds. )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCommonLanguageInclude.cmake(39):  SET(CMAKEEXE_LINKER_FLAGS_RELWITHDEBINFO ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT} CACHE STRING Flags used by the linker during Release with Debug Info builds. )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCommonLanguageInclude.cmake(43):  SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT} CACHE STRING Flags used by the linker during debug builds. )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCommonLanguageInclude.cmake(46):  SET(CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL ${CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL_INIT} CACHE STRING Flags used by the linker during release minsize builds. )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCommonLanguageInclude.cmake(50):  SET(CMAKE_SHARED_LINKER_FLAGS_RELEASE ${CMAKE_SHARED_LINKER_FLAGS_RELEASE_INIT} CACHE STRING Flags used by the linker during release builds. )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCommonLanguageInclude.cmake(53):  SET(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO ${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT} CACHE STRING Flags used by the linker during Release with Debug Info builds. )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCommonLanguageInclude.cmake(57):  SET(CMAKE_MODULE_LINKER_FLAGS_DEBUG ${CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT} CACHE STRING Flags used by the linker during debug builds. )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCommonLanguageInclude.cmake(60):  SET(CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL ${CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL_INIT} CACHE STRING Flags used by the linker during release minsize builds. )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCommonLanguageInclude.cmake(64):  SET(CMAKE_MODULE_LINKER_FLAGS_RELEASE ${CMAKE_MODULE_LINKER_FLAGS_RELEASE_INIT} CACHE STRING Flags used by the linker during release builds. )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCommonLanguageInclude.cmake(67):  SET(CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO ${CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT} CACHE STRING Flags used by the linker during Release with Debug Info builds. )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCommonLanguageInclude.cmake(73):  SET(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS_INIT} $ENV{LDFLAGS} CACHE STRING Flags used by the linker during the creation of dll's. )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCommonLanguageInclude.cmake(77):  SET(CMAKE_MODULE_LINKER_FLAGS ${CMAKE_MODULE_LINKER_FLAGS_INIT} $ENV{LDFLAGS} CACHE STRING Flags used by the linker during the creation of modules. )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCommonLanguageInclude.cmake(80):  SET(CMAKE_BUILD_TOOL ${CMAKE_MAKE_PROGRAM} CACHE INTERNAL What is the target build tool cmake is generating for. )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCommonLanguageInclude.cmake(84):  MARK_AS_ADVANCED(CMAKE_BUILD_TOOL CMAKE_VERBOSE_MAKEFILE CMAKE_EXE_LINKER_FLAGS CMAKE_EXE_LINKER_FLAGS_DEBUG CMAKE_EXE_LINKER_FLAGS_MINSIZEREL CMAKE_EXE_LINKER_FLAGS_RELEASE CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO CMAKE_SHARED_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS_DEBUG CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL CMAKE_SHARED_LINKER_FLAGS_RELEASE CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO CMAKE_MODULE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS_DEBUG CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL CMAKE_MODULE_LINKER_FLAGS_RELEASE CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(165):  IF(NOT CMAKE_C_CREATE_SHARED_LIBRARY )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(171):  IF(NOT CMAKE_C_CREATE_SHARED_MODULE )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(177):  IF(NOT DEFINED CMAKE_C_ARCHIVE_CREATE )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(178):  SET(CMAKE_C_ARCHIVE_CREATE  cr    )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(180):  IF(NOT DEFINED CMAKE_C_ARCHIVE_APPEND )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(181):  SET(CMAKE_C_ARCHIVE_APPEND  r     )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(183):  IF(NOT DEFINED CMAKE_C_ARCHIVE_FINISH )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(184):  SET(CMAKE_C_ARCHIVE_FINISH   )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(188):  IF(NOT CMAKE_C_COMPILE_OBJECT )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(193):  IF(NOT CMAKE_C_LINK_EXECUTABLE )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(198):  IF(NOT CMAKE_EXECUTABLE_RUNTIME_C_FLAG )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(199):  SET(CMAKE_EXECUTABLE_RUNTIME_C_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG} )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(202):  IF(NOT CMAKE_EXECUTABLE_RUNTIME_C_FLAG_SEP )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(203):  SET(CMAKE_EXECUTABLE_RUNTIME_C_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP} )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(206):  IF(NOT CMAKE_EXECUTABLE_RPATH_LINK_C_FLAG )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(207):  SET(CMAKE_EXECUTABLE_RPATH_LINK_C_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG} )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(210):  MARK_AS_ADVANCED(CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeCInformation.cmake(217):  SET(CMAKE_C_INFORMATION_LOADED 1 )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake(15):  INCLUDE(CMakeTestCompilerCommon )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCompilerCommon.cmake(15):  function(PrintTestCompilerStatus LANG MSG )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake(22):  IF(NOT CMAKE_C_COMPILER_WORKS )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake(23):  PrintTestCompilerStatus(C  )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCompilerCommon.cmake(16):  IF(CMAKE_GENERATOR MATCHES Make )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCompilerCommon.cmake(18):  ELSE()
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCompilerCommon.cmake(19):  MESSAGE(STATUS Check for working ${LANG} compiler using: ${CMAKE_GENERATOR}${MSG} )
-- Check for working C compiler using: Visual Studio 10 Win64
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake(24):  FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler.c #ifdef cplusplus\n # error \"The CMAKE_C_COMPILER is set to a C++ compiler\"\n #endif\n #if defined(CLASSIC_C__)\n int main(argc, argv)\n   int argc;\n   char* argv[];\n #else\n int main(int argc, char* argv[])\n #endif\n { (void)argv; return argc-1;}\n )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake(36):  TRY_COMPILE(CMAKE_C_COMPILER_WORKS ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler.c OUTPUT_VARIABLE __CMAKE_C_COMPILER_OUTPUT )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake(39):  SET(C_TEST_WAS_RUN 1 )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake(42):  IF(NOT CMAKE_C_COMPILER_WORKS )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake(56):  ELSE(NOT CMAKE_C_COMPILER_WORKS )
c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake(57):

#10 Updated by Kentaro HAYASHI over 5 years ago

mysql_config.shには--plugindirオプションが用意されているけれども、 mysql_config.plには--plugindirオプションは存在しない。

#11 Updated by Kentaro HAYASHI over 5 years ago

参考: mysql_config.pl --cflagsおよびmysql_config.pl --versionの実行結果

mysql_config.pl --cflagsの実行結果

c:\work\mysql\mysql-5.5.28-vs2010-x64>scripts\mysql_config.pl --cflags
"-IC:\work\mysql\mysql-5.5.28-vs2010-x64/include/mysql" "/MT" "/Zi" "/O2" "/Ob1"
 "/D" "NDEBUG" "-DDBUG_OFF"

mysql_config.pl --versionの実行結果

c:\work\mysql\mysql-5.5.28-vs2010-x64>scripts\mysql_config.pl --version
5.5.28

#12 Updated by Kentaro HAYASHI over 5 years ago

MYSQL_CFLAGS,MYSQL_VERSIONを明示的に定義するようにすることで、コメント #9の問題について解決した。

変更後の実行例は以下の通り。

cmake . --debug-output -G "Visual Studio 10 Win64" -DMYSQL_SOURCE_DIR=....\mysql\mysql-5.5.28-vs2010-x64 -DMYSQL_BUILD_DIR=....\mysql\mysql-5.5.28-vs2010-x64 -DMYSQL_CONFIG=mysql_config.pl -DMYSQL_CFLAGS="\"-IC:\work\mysql\mysql-5.5.28-vs2010-x64/include/mysql\" \"/MT\" \"/Zi\" \"/O2\" \"/Ob1\" \"/DNDEBUG\" \"-DDBUG_OFF\"" -DMYSQL_VERSION=5.5.28 > debug.log 2>&1

結果として以下のエラーとなった。

  • pkg-configの存在しないエラー
  • インストール先を指定していないエラー

インストール先指定については-DCMAKE_INSTALL_PREFIXを指定して試す。

ログの詳細は以下の通り。

Running with debug output on.
-- Found Windows SDK v7.1: C:\Program Files\Microsoft SDKs\Windows\v7.1\
   Called from: [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt
-- Check for working C compiler using: Visual Studio 10 Win64
   Called from: [2] c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake
                [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt
-- Check for working C compiler using: Visual Studio 10 Win64 -- works
   Called from: [2] c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake
                [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt
-- Detecting C compiler ABI info
   Called from: [2] c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake
                [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt
-- Detecting C compiler ABI info - done
   Called from: [2] c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake
                [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt
-- Check for working CXX compiler using: Visual Studio 10 Win64
   Called from: [2] c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake
                [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt
-- Check for working CXX compiler using: Visual Studio 10 Win64 -- works
   Called from: [2] c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake
                [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt
-- Detecting CXX compiler ABI info
   Called from: [2] c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake
                [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt
-- Detecting CXX compiler ABI info - done
   Called from: [2] c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake
                [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt
CMake Error at CMakeLists.txt:62 (string):
  string sub-command STRIP requires two arguments.
Call Stack (most recent call first):
  CMakeLists.txt:66 (set_mysql_config_value)

Called from: [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) Called from: [2] c:/WinApp/cmake/share/cmake-2.8/Modules/FindPkgConfig.cmake [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt CMake Error at c:/WinApp/cmake/share/cmake-2.8/Modules/FindPkgConfig.cmake:319 (message): pkg-config tool not found Call Stack (most recent call first): c:/WinApp/cmake/share/cmake-2.8/Modules/FindPkgConfig.cmake:333 (_pkg_check_modules_internal) CMakeLists.txt:71 (pkg_check_modules)

Called from: [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt CMake Error at CMakeLists.txt:125 (install): install TARGETS given no LIBRARY DESTINATION for module target "ha_mroonga".

Called from: [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt -- Configuring incomplete, errors occurred!

#13 Updated by Kentaro HAYASHI over 5 years ago

問題となっている箇所はCMakeLists.txtの以下の通り。

pkg-configのエラー

include(FindPkgConfig)

インストール先に関するエラー

install(TARGETS ha_mroonga DESTINATION "${MYSQL_PLUGIN_DIR}")

#14 Updated by Kentaro HAYASHI over 5 years ago

pkg-configの実行エラーに関してコンパイル済みのpkg-configのバイナリは以下から入手することができる。

http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/

最低限pkg-config.exeの実行に必要なアーカイブは以下の通り。

  • pkg-config_0.26-1_win32.zip
  • glib_2.28.8-1_win32.zip
  • gettext-runtime_0.18.1.1-2_win32.zip
c:\work\mroonga\mroonga-vs2010-x64>pkg-config --version
0.26

#15 Updated by Kentaro HAYASHI over 5 years ago

pkg-configへパスを通した状態で再度cmakeを実行するとgroongaモジュールが 見つからないというエラーになった。

pkg-config --list-allでgroongaが見つかる状態にすることと、 pkg-config --modversion groongaでバージョンを取得できるようにする必要がある。

ログの詳細は以下の通り。

Running with debug output on.
-- Found Windows SDK v7.1: C:\Program Files\Microsoft SDKs\Windows\v7.1\
   Called from: [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt
-- Check for working C compiler using: Visual Studio 10 Win64
   Called from: [2] c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake
                [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt
-- Check for working C compiler using: Visual Studio 10 Win64 -- works
   Called from: [2] c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake
                [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt
-- Detecting C compiler ABI info
   Called from: [2] c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake
                [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt
-- Detecting C compiler ABI info - done
   Called from: [2] c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake
                [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt
-- Check for working CXX compiler using: Visual Studio 10 Win64
   Called from: [2] c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake
                [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt
-- Check for working CXX compiler using: Visual Studio 10 Win64 -- works
   Called from: [2] c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake
                [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt
-- Detecting CXX compiler ABI info
   Called from: [2] c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake
                [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt
-- Detecting CXX compiler ABI info - done
   Called from: [2] c:/WinApp/cmake/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake
                [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt
-- Found PkgConfig: c:/work/binary/bin/pkg-config.exe (found version "0.26") 
   Called from: [2] c:/WinApp/cmake/share/cmake-2.8/Modules/FindPkgConfig.cmake
                [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt
-- checking for module 'groonga >= 2.0.6'
   Called from: [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt
--   package 'groonga >= 2.0.6' not found
   Called from: [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt
CMake Error at c:/WinApp/cmake/share/cmake-2.8/Modules/FindPkgConfig.cmake:279 (message):
  A required package was not found
Call Stack (most recent call first):
  c:/WinApp/cmake/share/cmake-2.8/Modules/FindPkgConfig.cmake:333 (_pkg_check_modules_internal)
  CMakeLists.txt:71 (pkg_check_modules)

Called from: [1] C:/work/mroonga/mroonga-vs2010-x64/CMakeLists.txt -- Configuring incomplete, errors occurred!

#16 Updated by Kentaro HAYASHI over 5 years ago

groongaのビルド時には-DCMAKE_INSTALL_PREFIX=c:\groongaとしていたので、 まずはgroongaのインストールを試した。

msbuild groonga.sln /target:INSTALL

groonga.pcの内容が以下の通りなので、groongaのインストールができた状態で、 PKG_CONFIG_PATHを適宜設定した状態でcmakeを実行すれば、pkg-config.exeにより groongaが見つけられるという目論見。

prefix=c:/groonga
exec_prefix=c:/groonga
bindir=c:/groonga/bin
libdir=c:/groonga/lib
includedir=c:/groonga/include
datarootdir=c:/groonga/share
datadir=c:/groonga/share
document_root=c:/groonga/share/groonga/html/admin
groonga=${bindir}/groonga.exe
groonga_suggest_create_dataset=${bindir}/groonga-suggest-create-dataset.exe
groonga_version=2.0.7

Name: Groonga
Description: An Embeddable Fulltext Search Engine
Version: 2.0.7
Libs: -L${libdir} -lgroonga
Cflags: -I${includedir}/groonga

エラーの詳細は以下の通り。

c:\work\groonga\groonga-2.0.7-vs2010-x64>msbuild groonga.sln /p:Configuration=Re
lease /target:INSTALL
Microsoft (R) Build Engine Version 4.0.30319.1
[Microsoft .NET Framework, Version 4.0.30319.269]
Copyright (C) Microsoft Corporation 2007. All rights reserved.

Build started 2012/10/03 16:52:06. Project "c:\work\groonga\groonga-2.0.7-vs2010-x64\groonga.sln" on node 1 (INSTA LL target(s)). ValidateSolutionConfiguration: ????????? "Release|x64" ?????????? ValidateProjects: ?????? "INSTALL" ??????????? "Release|x64" ????????????????????? c:\work\groonga\groonga-2.0.7-vs2010-x64\groonga.sln.metaproj : error MSB4057: The target "INSTALL" does not exist in the project. [c:\work\groonga\groonga-2. 0.7-vs2010-x64\groonga.sln] Done Building Project "c:\work\groonga\groonga-2.0.7-vs2010-x64\groonga.sln" (I NSTALL target(s)) -- FAILED.

Build FAILED.

"c:\work\groonga\groonga-2.0.7-vs2010-x64\groonga.sln" (INSTALL target) (1) -> c:\work\groonga\groonga-2.0.7-vs2010-x64\groonga.sln.metaproj : error MSB4057 : The target "INSTALL" does not exist in the project. [c:\work\groonga\groonga- 2.0.7-vs2010-x64\groonga.sln]

0 Warning(s)
1 Error(s)

Time Elapsed 00:00:01.12

#17 Updated by Kentaro HAYASHI over 5 years ago

別のやり方で試した。

cmake . -build -target install --config Release

エラーログは以下の通り。

"c:\work\groonga\groonga-2.0.7-vs2010-x64\install.vcxproj" (default target) (1)
->
(PostBuildEvent target) ->
  C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(
113,5): error MSB3073: The command "setlocal [c:\work\groonga\groonga-2.0.7-vs20
10-x64\install.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(11
3,5): error MSB3073: c:\WinApp\cmake\bin\cmake.exe -DBUILD_TYPE=Release -P cmake
_install.cmake [c:\work\groonga\groonga-2.0.7-vs2010-x64\install.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(11
3,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [c:\work\groonga\groonga-
2.0.7-vs2010-x64\install.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(11
3,5): error MSB3073: :cmEnd [c:\work\groonga\groonga-2.0.7-vs2010-x64\install.vc
xproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(11
3,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone [
c:\work\groonga\groonga-2.0.7-vs2010-x64\install.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(11
3,5): error MSB3073: :cmErrorLevel [c:\work\groonga\groonga-2.0.7-vs2010-x64\ins
tall.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(11
3,5): error MSB3073: exit /b %1 [c:\work\groonga\groonga-2.0.7-vs2010-x64\instal
l.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(11
3,5): error MSB3073: :cmDone [c:\work\groonga\groonga-2.0.7-vs2010-x64\install.v
cxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(11
3,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd [c:\work\groonga\groonga-
2.0.7-vs2010-x64\install.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(11
3,5): error MSB3073: :VCEnd" exited with code 1. [c:\work\groonga\groonga-2.0.7-
vs2010-x64\install.vcxproj]

1182 Warning(s)
1 Error(s)

Time Elapsed 00:10:45.23

#18 Updated by Kentaro HAYASHI over 5 years ago

groongaのINSTALLターゲットについてはビルドディレクトリを別にしていたことが 要因のひとつであったため、再度ビルドしなおすことにした。

デバッグログ用

cmake . --debug-output -G "Visual Studio 10 Win64" -DCMAKE_INSTALL_PREFIX=c:\groonga  > usedebug.log 2>&1

トレースログ用

cmake . --trace-output -G "Visual Studio 10 Win64" -DCMAKE_INSTALL_PREFIX=c:\groonga  > usetrace.log 2>&1

#19 Updated by Kentaro HAYASHI over 5 years ago

再度ビルドしなおして、以下のようにしてインストール可能なことを確認した。

msbuild INSTALL.vcxproj

次、PKG_CONFIG_PATHを設定してから再度mroongaでcmake実行する。

インストール後の状態は以下の通り。

c:\groonga>tree /F
Folder PATH listing
Volume serial number is 5205-E186
C:.
├───bin
│       groonga-benchmark.exe
│       groonga-suggest-create-dataset.exe
│       groonga.dll
│       groonga.exe
│       groonga.lib
│
├───etc
│   └───groonga
│           groonga.conf
│
├───include
│   └───groonga
│       │   groonga.h
│       │
│       └───groonga
│               plugin.h
│               tokenizer.h
│
├───lib
│   ├───groonga
│   │   └───plugins
│   │       ├───suggest
│   │       │       suggest.dll
│   │       │
│   │       └───table
│   │               table.dll
│   │
│   └───pkgconfig
│           groonga.pc
│
└───share
    └───groonga
        └───html
            └───admin
                │   favicon.ico
                │   favicon.png
                │   favicon.svg
                │   index.html
                │
                ├───css
                │   │   groonga-admin.css
                │   │
                │   └───redmond
                │       │   jquery-ui-1.8.18.custom.css
                │       │
                │       └───images
                │               ui-bg_flat_0_aaaaaa_40x100.png
                │               ui-bg_flat_55_fbec88_40x100.png
                │               ui-bg_glass_75_d0e5f5_1x400.png
                │               ui-bg_glass_85_dfeffc_1x400.png
                │               ui-bg_glass_95_fef1ec_1x400.png
                │               ui-bg_gloss-wave_55_5c9ccc_500x100.png
                │               ui-bg_inset-hard_100_f5f8f9_1x100.png
                │               ui-bg_inset-hard_100_fcfdfd_1x100.png
                │               ui-icons_217bc0_256x240.png
                │               ui-icons_2e83ff_256x240.png
                │               ui-icons_469bdd_256x240.png
                │               ui-icons_6da8d5_256x240.png
                │               ui-icons_cd0a0a_256x240.png
                │               ui-icons_d8e7f3_256x240.png
                │               ui-icons_f9bd01_256x240.png
                │
                ├───images
                │       groonga.png
                │       groonga.svg
                │       loading.gif
                │
                └───js
                        groonga-admin.js
                        jquery-1.7.2.min.js
                        jquery-ui-1.8.18.custom.min.js
                        jquery.flot-0.7.min.js
                        jquery.flot.license.txt
                        jquery.json-2.2.min.js

#20 Updated by Kentaro HAYASHI over 5 years ago

以下のようにしてPKG_CONFIG_PATHの値を設定してから 再度cmakeを実行し、mroongaのソリューションファイルが生成されることを確認した。

set PKG_CONFIG_PATH=%PKG_CONFIG_PATH%;c:/groonga/lib/pkgconfig

cmake実行内容を再掲。

cmake . --debug-output -G "Visual Studio 10 Win64" -DMYSQL_SOURCE_DIR=....\mysql\mysql-5.5.28-vs2010-x64 -DMYSQL_BUILD_DIR=....\mysql\mysql-5.5.28-vs2010-x64 -DMYSQL_CONFIG=mysql_config.pl -DMYSQL_CFLAGS="\"-IC:\work\mysql\mysql-5.5.28-vs2010-x64/include/mysql\" \"/MT\" \"/Zi\" \"/O2\" \"/Ob1\" \"/DNDEBUG\" \"-DDBUG_OFF\"" -DMYSQL_VERSION=5.5.28 -DMYSQL_PLUGIN_DIR=..\lib\plugin -DCMAKE_INSTALL_PREFIX=c:\groonga  > usedebug.log 2>&1

#21 Updated by Kentaro HAYASHI over 5 years ago

以下のコマンドでmroongaをビルドした。

msbuild mroonga.sln /p:Configuration=Release

大別して、以下の警告、エラーが発生した。

  • _CRT_SECURE_NO_WARNINGS関連の警告
  • 型の違いによる警告
  • 未定義によるエラー

ビルド結果抜粋は以下の通り。

 ha_mroonga.cpp(12904): error C2059: syntax error : ')' [c:\work\mroonga\mroon
a-vs2010-x64\ha_mroonga.vcxproj]

185 Warning(s) 45 Error(s)

Time Elapsed 00:00:05.17

:\work\mroonga\mroonga-vs2010-x64>msbuild mroonga.sln /p:Configuration=Release t:rebuild > build.log 2>&1

#22 Updated by Kentaro HAYASHI over 5 years ago

ソースコードをいくつかの箇所を修正する必要があることが判明した。

TODO:

  • C2057対策 VC++はC99の可変長配列の宣言に対応していない

  • roundには対応していない

  • S_IRWXU ha_mroonga.cpp(7441): error C2065: 'S_IRWXU' : undeclared identifier

  • mkdir ha_mroonga.cpp(7441): error C3861: 'mkdir': identifier not found

  • DBUG_RETURNマクロの#ifdefでエラーになっている。

    ha_mroonga.cpp(12904): error C2121: '#' : invalid character : possibly the result of a macro expansion [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
    ha_mroonga.cpp(12904): error C2065: 'ifdef' : undeclared identifier [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
    ha_mroonga.cpp(12904): error C2146: syntax error : missing ')' before identifier 'thd' [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
    ha_mroonga.cpp(12904): error C2121: '#' : invalid character : possibly the result of a macro expansion [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
    ha_mroonga.cpp(12904): error C2121: '#' : invalid character : possibly the result of a macro expansion [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
    ha_mroonga.cpp(12904): error C2121: '#' : invalid character : possibly the result of a macro expansion [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
    ha_mroonga.cpp(12904): error C2121: '#' : invalid character : possibly the result of a macro expansion [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
    ha_mroonga.cpp(12904): error C2121: '#' : invalid character : possibly the result of a macro expansion [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
    ha_mroonga.cpp(12904): error C2059: syntax error : ')' [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
    
    

#23 Updated by Kentaro HAYASHI over 5 years ago

エラー部分を抜き出したログを添付。

#24 Updated by Kentaro HAYASHI over 5 years ago

fix-for-visual-studioブランチを作成した。

https://github.com/mroonga/mroonga/tree/fix-for-visual-studio

#25 Updated by Kentaro HAYASHI over 5 years ago

mkdirは非推奨になっている。

This POSIX function is deprecated beginning in Visual C++ 2005. Use the ISO C++ conformant _mkdir instead.

http://msdn.microsoft.com/en-US/library/ms235326%28v=vs.80%29.aspx

#26 Updated by Kentaro HAYASHI over 5 years ago

備考: mroongaのリンクの際に必要なgroonga.libは/LIBPATH:c:/groonga/lib以下にあらかじめ配置しておく必要がある。groonga.libはリリースビルドならgroonga/lib/Release以下に生成される。

#27 Updated by Kentaro HAYASHI over 5 years ago

TODO:

  • mkdirの S_IRWXU対応
  • リンクエラーの対応
  • groonga.libがコピーされていない件の対応

#28 Updated by Kentaro HAYASHI over 5 years ago

別のランタイムと競合しないように/NODEFAULTLIBの追加が必要。

参考: http://msdn.microsoft.com/ja-jp/library/6wtdswk0%28v=vs.80%29.aspx

MSVCRT.lib(MSVCR100.dll) : error LNK2005: strncmp already defined in LIBCMT.lib(strncmp.obj) [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
MSVCRT.lib(MSVCR100.dll) : error LNK2005: _snprintf already defined in LIBCMT.lib(snprintf.obj) [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: __cdecl type_info::type_info(class type_info const &)" (??0type_info@@AEAA@AEBV0@@Z) already defined in LIBCMT.lib(typinfo.obj) [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __cdecl type_info::operator=(class type_info const &)" (??4type_info@@AEAAAEAV0@AEBV0@@Z) already defined in LIBCMT.lib(typinfo.obj) [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
     Creating library C:/work/mroonga/mroonga-vs2010-x64/Release/ha_mroonga.lib and object C:/work/mroonga/mroonga-vs2010-x64/Release/ha_mroonga.exp
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]

#29 Updated by Kentaro HAYASHI over 5 years ago

/NODEFAULTLIBをIDEでひとまず指定し、mysqlのインポートライブラリをリンクした場合に 出力されるエラーは以下の通り。

(Link target) -> 
  ha_mroonga.obj : error LNK2019: unresolved external symbol grn_obj_get_value_ referenced in function "private: void __cdecl ha_mroonga::storage_store_fields(unsigned char *,unsigned int)" (?storage_store_fields@ha_mroonga@@AEAAXPEAEI@Z) [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
  mrn_table.obj : error LNK2001: unresolved external symbol "char * mrn_default_parser" (?mrn_default_parser@@3PEADEA) [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
  mrn_table.obj : error LNK2001: unresolved external symbol "struct st_hash mrn_open_tables" (?mrn_open_tables@@3Ust_hash@@A) [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
  mrn_table.obj : error LNK2001: unresolved external symbol "struct _RTL_CRITICAL_SECTION mrn_open_tables_mutex" (?mrn_open_tables_mutex@@3U_RTL_CRITICAL_SECTION@@A) [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
  mrn_table.obj : error LNK2001: unresolved external symbol "struct st_hash mrn_allocated_thds" (?mrn_allocated_thds@@3Ust_hash@@A) [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
  mrn_table.obj : error LNK2001: unresolved external symbol "struct _RTL_CRITICAL_SECTION mrn_allocated_thds_mutex" (?mrn_allocated_thds_mutex@@3U_RTL_CRITICAL_SECTION@@A) [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
  mrn_table.obj : error LNK2001: unresolved external symbol "struct handlerton * mrn_hton_ptr" (?mrn_hton_ptr@@3PEAUhandlerton@@EA) [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
  mrn_table.obj : error LNK2001: unresolved external symbol "char * mrn_default_wrapper_engine" (?mrn_default_wrapper_engine@@3PEADEA) [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
  mrn_index_table_name.obj : error LNK2019: unresolved external symbol _db_return_ referenced in function "private: unsigned int __cdecl mrn::IndexTableName::encode(unsigned char *,unsigned char *,unsigned char const *,unsigned char const *)" (?encode@IndexTableName@mrn@@AEAAIPEAE0PEBE1@Z) [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
  mrn_index_table_name.obj : error LNK2019: unresolved external symbol _db_doprnt_ referenced in function "private: unsigned int __cdecl mrn::IndexTableName::encode(unsigned char *,unsigned char *,unsigned char const *,unsigned char const *)" (?encode@IndexTableName@mrn@@AEAAIPEAE0PEBE1@Z) [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
  mrn_index_table_name.obj : error LNK2019: unresolved external symbol _db_pargs_ referenced in function "private: unsigned int __cdecl mrn::IndexTableName::encode(unsigned char *,unsigned char *,unsigned char const *,unsigned char const *)" (?encode@IndexTableName@mrn@@AEAAIPEAE0PEBE1@Z) [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
  mrn_index_table_name.obj : error LNK2019: unresolved external symbol _db_enter_ referenced in function "private: unsigned int __cdecl mrn::IndexTableName::encode(unsigned char *,unsigned char *,unsigned char const *,unsigned char const *)" (?encode@IndexTableName@mrn@@AEAAIPEAE0PEBE1@Z) [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
  mysqlserver.lib(lib_sql.obj) : error LNK2001: unresolved external symbol tzname [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
  OLDNAMES.lib(tzname.obj) : error LNK2001: unresolved external symbol tzname [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
  C:\work\mroonga\mroonga-vs2010-x64\Release\ha_mroonga.dll : fatal error LNK1120: 13 unresolved externals [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]

    9 Warning(s)
    15 Error(s)

#30 Updated by Kentaro HAYASHI over 5 years ago

LNK2001が発生している件については、ソリューション全体としてはC++としてコンパイルされているが、ha_mroonga.cppにて定義している変数をmrn_tableから参照できていない。 これは、当該変数がextern "C"としてCのコード片としてコンパイルされているため。

mrn_tableの該当部分をextern "C"としてコンパイルするように修正する。

(Link target) -> 
  ha_mroonga.obj : error LNK2019: unresolved external symbol grn_obj_get_value_ referenced in function "private: void __cdecl ha_mroonga::storage_store_fields(unsigned char *,unsigned int)" (?storage_store_fields@ha_mroonga@@AEAAXPEAEI@Z) [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
  mrn_index_table_name.obj : error LNK2019: unresolved external symbol _db_return_ referenced in function "private: unsigned int __cdecl mrn::IndexTableName::encode(unsigned char *,unsigned char *,unsigned char const *,unsigned char const *)" (?encode@IndexTableName@mrn@@AEAAIPEAE0PEBE1@Z) [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
  mrn_index_table_name.obj : error LNK2019: unresolved external symbol _db_doprnt_ referenced in function "private: unsigned int __cdecl mrn::IndexTableName::encode(unsigned char *,unsigned char *,unsigned char const *,unsigned char const *)" (?encode@IndexTableName@mrn@@AEAAIPEAE0PEBE1@Z) [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
  mrn_index_table_name.obj : error LNK2019: unresolved external symbol _db_pargs_ referenced in function "private: unsigned int __cdecl mrn::IndexTableName::encode(unsigned char *,unsigned char *,unsigned char const *,unsigned char const *)" (?encode@IndexTableName@mrn@@AEAAIPEAE0PEBE1@Z) [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
  mrn_index_table_name.obj : error LNK2019: unresolved external symbol _db_enter_ referenced in function "private: unsigned int __cdecl mrn::IndexTableName::encode(unsigned char *,unsigned char *,unsigned char const *,unsigned char const *)" (?encode@IndexTableName@mrn@@AEAAIPEAE0PEBE1@Z) [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
  mysqlserver.lib(lib_sql.obj) : error LNK2001: unresolved external symbol tzname [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
  OLDNAMES.lib(tzname.obj) : error LNK2001: unresolved external symbol tzname [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
  C:\work\mroonga\mroonga-vs2010-x64\Release\ha_mroonga.dll : fatal error LNK1120: 6 unresolved externals [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]

    9 Warning(s)
    8 Error(s)

#31 Updated by Kentaro HAYASHI over 5 years ago

誤って指定していたクライアントの.libを削除することで error LNK2001: unresolved external symbol tznameのエラーが解消した。

(Link target) -> 
  ha_mroonga.obj : error LNK2019: unresolved external symbol grn_obj_get_value_ referenced in function "private: void __cdecl ha_mroonga::storage_store_fields(unsigned char *,unsigned int)" (?storage_store_fields@ha_mroonga@@AEAAXPEAEI@Z) [C:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
  mrn_index_table_name.obj : error LNK2019: unresolved external symbol _db_return_ referenced in function "private: unsigned int __cdecl mrn::IndexTableName::encode(unsigned char *,unsigned char *,unsigned char const *,unsigned char const *)" (?encode@IndexTableName@mrn@@AEAAIPEAE0PEBE1@Z) [C:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
  mrn_index_table_name.obj : error LNK2019: unresolved external symbol _db_doprnt_ referenced in function "private: unsigned int __cdecl mrn::IndexTableName::encode(unsigned char *,unsigned char *,unsigned char const *,unsigned char const *)" (?encode@IndexTableName@mrn@@AEAAIPEAE0PEBE1@Z) [C:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
  mrn_index_table_name.obj : error LNK2019: unresolved external symbol _db_pargs_ referenced in function "private: unsigned int __cdecl mrn::IndexTableName::encode(unsigned char *,unsigned char *,unsigned char const *,unsigned char const *)" (?encode@IndexTableName@mrn@@AEAAIPEAE0PEBE1@Z) [C:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
  mrn_index_table_name.obj : error LNK2019: unresolved external symbol _db_enter_ referenced in function "private: unsigned int __cdecl mrn::IndexTableName::encode(unsigned char *,unsigned char *,unsigned char const *,unsigned char const *)" (?encode@IndexTableName@mrn@@AEAAIPEAE0PEBE1@Z) [C:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
  C:\work\mroonga\mroonga-vs2010-x64\Release\ha_mroonga.dll : fatal error LNK1120: 5 unresolved externals [C:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]

    9 Warning(s)
    6 Error(s)

#32 Updated by Kentaro HAYASHI over 5 years ago

Release版ビルドにおいて、DBUG_OFFが未定義になっているので追加する必要がある。

(Link target) -> 
  ha_mroonga.obj : error LNK2019: unresolved external symbol grn_obj_get_value_ referenced in function "private: void __cdecl ha_mroonga::storage_store_fields(unsigned char *,unsigned int)" (?storage_store_fields@ha_mroonga@@AEAAXPEAEI@Z) [C:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]
  C:\work\mroonga\mroonga-vs2010-x64\Release\ha_mroonga.dll : fatal error LNK1120: 1 unresolved externals [C:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj]

    9 Warning(s)
    2 Error(s)

#33 Updated by Kentaro HAYASHI over 5 years ago

db.hにてgrn_obj_get_value_をエクスポートしてgroongaを再ビルドした。 再ビルドしたgroongaとmroongaをリンクし、MySQL(公式サイトで提供されているバイナリ)と ビルド済みha_mroonga.dllを配置してプラグインのインストールを試みた。

my.iniはmy-small.iniを元にして[client]セクションのsocketをコメントアウト、 default-character-setを追加。

#socket     = /tmp/mysql.sock
default-character-set=utf8

[mysqld]セクションにはbasedir,datadir,character-set-server=utf8の指定を追加。

mysqldは以下のようにして起動。

mysqld --defaults-file=my.ini --console

クライアントは以下のようにして接続。

mysql -u root

上記手順が済んだ状態で以下のようにしてプラグインをインストール。

install plugin mroonga soname 'ha_mroonga.dll';

インストール実行時にmysqldが強制終了する。以下はその際のログ。

This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

key_buffer_size=16384 read_buffer_size=262144 max_used_connections=1 max_threads=151 thread_count=1 connection_count=1 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 49887 K b ytes of memory Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x3798f30 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... 778be4b4 ntdll.dll!RtlDeNormalizeProcessParams() 778be3db ntdll.dll!RtlDeNormalizeProcessParams() 7fee905f890 ha_mroonga.dll!??? 7fee9002f6c ha_mroonga.dll!??? 7fee9016270 ha_mroonga.dll!??? 13f392c56 mysqld.exe!ha_initialize_handlerton()[handler.cc:543] 13f38c492 mysqld.exe!plugin_initialize()[sql_plugin.cc:1100] 13f391457 mysqld.exe!mysql_install_plugin()[sql_plugin.cc:1821] 13f3d694a mysqld.exe!mysql_execute_command()[sql_parse.cc:4342] 13f3d70ba mysqld.exe!mysql_parse()[sql_parse.cc:5632] 13f3d7e8c mysqld.exe!dispatch_command()[sql_parse.cc:1040] 13f3d8c9c mysqld.exe!do_command()[sql_parse.cc:773] 13f3fe6e6 mysqld.exe!do_handle_one_connection()[sql_connect.cc:840] 13f3fe7a4 mysqld.exe!handle_one_connection()[sql_connect.cc:761] 13f58567e mysqld.exe!pthread_start()[my_winthread.c:63] 13f72da97 mysqld.exe!_callthreadstartex()[threadex.c:348] 13f72db4b mysqld.exe!_threadstartex()[threadex.c:326] 773b652d kernel32.dll!BaseThreadInitThunk() 7789c521 ntdll.dll!RtlUserThreadStart()

Trying to get some variables. Some pointers may be invalid and cause the dump to abort. Query (37df820): install plugin mroonga soname 'ha_mroonga.dll'Connection ID (th read ID): 1 Status: NOT_KILLED

The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains information that should help you find out what is causing the crash.

次、まずランタイムを確認する。

#34 Updated by Kentaro HAYASHI over 5 years ago

mroongaをDebugでビルドするためのディレクトリを別で用意し、 msbuild mroonga.sln /p:Configuration=Debugにてビルドした。

再度install plugin mroonga soname 'ha_mroonga.dll';を実行した際のエラートレースは 以下の通りとなった。

02:54:29 UTC - mysqld got exception 0xc0000005 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

key_buffer_size=16384
read_buffer_size=262144
max_used_connections=1
max_threads=151
thread_count=1
connection_count=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 49887 K  b
ytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x3779cd0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
7732e4b4    ntdll.dll!RtlDeNormalizeProcessParams()
7732e3db    ntdll.dll!RtlDeNormalizeProcessParams()
7fee68667b0    ha_mroonga.dll!gmtime_r()[my_pthread.c:95]
7fee6800c73    ha_mroonga.dll!mrn_init_time()[ha_mroonga.cpp:1624]
7fee68003fd    ha_mroonga.dll!mrn_init()[ha_mroonga.cpp:1703]
13fe82c56    mysqld.exe!ha_initialize_handlerton()[handler.cc:543]
13fe7c492    mysqld.exe!plugin_initialize()[sql_plugin.cc:1100]
13fe81457    mysqld.exe!mysql_install_plugin()[sql_plugin.cc:1821]
13fec694a    mysqld.exe!mysql_execute_command()[sql_parse.cc:4342]
13fec70ba    mysqld.exe!mysql_parse()[sql_parse.cc:5632]
13fec7e8c    mysqld.exe!dispatch_command()[sql_parse.cc:1040]
13fec8c9c    mysqld.exe!do_command()[sql_parse.cc:773]
13feee6e6    mysqld.exe!do_handle_one_connection()[sql_connect.cc:840]
13feee7a4    mysqld.exe!handle_one_connection()[sql_connect.cc:761]
14007567e    mysqld.exe!pthread_start()[my_winthread.c:63]
14021da97    mysqld.exe!_callthreadstartex()[threadex.c:348]
14021db4b    mysqld.exe!_threadstartex()[threadex.c:326]
76d6652d    kernel32.dll!BaseThreadInitThunk()
7730c521    ntdll.dll!RtlUserThreadStart()

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (37c04c0): install plugin mroonga soname 'ha_mroonga.dll'Connection ID (th
read ID): 1
Status: NOT_KILLED

The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.

次、ha_mroonga.dllの依存関係の確認。

#35 Updated by Kentaro HAYASHI over 5 years ago

groongaおよびmroongaを/MTdでビルドしランタイムがMSVCR100へと依存しないようにして ビルドしたプラグインをMySQLバイナリ(公式配布)へとインストールを試みた。

結果としてはsegvしているのは同じ。 問題点としてランタイムが混在していることによるSEGVではないことがわかった。

次、selfビルドしたmysqlで再度リンクしたバイナリで試して違いがあるか確認する。

以下はSEGVしている結果のログ。

06:49:59 UTC - mysqld got exception 0xc0000005 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

key_buffer_size=16384 read_buffer_size=262144 max_used_connections=1 max_threads=151 thread_count=1 connection_count=1 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 49894 K b ytes of memory Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x340fef0 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... 7732e4b4 ntdll.dll!RtlDeNormalizeProcessParams() 7732e3db ntdll.dll!RtlDeNormalizeProcessParams() 7fee48067a0 ha_mroonga.dll!gmtime_r()[my_pthread.c:95] 7fee47a0c73 ha_mroonga.dll!mrn_init_time()[ha_mroonga.cpp:1624] 7fee47a03fd ha_mroonga.dll!mrn_init()[ha_mroonga.cpp:1703] 13f284a71 mysqld.exe!ha_initialize_handlerton()[handler.cc:543] 13f27a66f mysqld.exe!plugin_initialize()[sql_plugin.cc:1100] 13f27d112 mysqld.exe!mysql_install_plugin()[sql_plugin.cc:1821] 13f4038df mysqld.exe!mysql_execute_command()[sql_parse.cc:4340] 13f4078a5 mysqld.exe!mysql_parse()[sql_parse.cc:5627] 13f3fa99b mysqld.exe!dispatch_command()[sql_parse.cc:1040] 13f3f9e1a mysqld.exe!do_command()[sql_parse.cc:773] 13f2d83d9 mysqld.exe!do_handle_one_connection()[sql_connect.cc:840] 13f2d7da2 mysqld.exe!handle_one_connection()[sql_connect.cc:760] 13f62b186 mysqld.exe!pthread_start()[my_winthread.c:62] 13f9cda95 mysqld.exe!_callthreadstartex()[threadex.c:314] 13f9cda64 mysqld.exe!_threadstartex()[threadex.c:297] 76d6652d kernel32.dll!BaseThreadInitThunk() 7730c521 ntdll.dll!RtlUserThreadStart()

Trying to get some variables. Some pointers may be invalid and cause the dump to abort. Query (347a4c0): install plugin mroonga soname 'ha_mroonga.dll'Connection ID (th read ID): 1 Status: NOT_KILLED

The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains information that should help you find out what is causing the crash.

ランタイムが依存しなくなっていることはdumpbinコマンドにて確認した。

c:\work\mysql\mysql-5.5.28-winx64>dumpbin /dependents bin\groonga.dll
Microsoft (R) COFF/PE Dumper Version 10.00.40219.01
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file bin\groonga.dll

File Type: DLL

  Image has the following dependencies:

    KERNEL32.dll
    WS2_32.dll

  Summary

       58000 .data
        2000 .idata
        A000 .pdata
       73000 .rdata
        6000 .reloc
        1000 .rsrc
      3D3000 .text
        1000 text
c:\work\mysql\mysql-5.5.28-winx64>dumpbin /dependents lib\plugin\ha_mroonga.dll
Microsoft (R) COFF/PE Dumper Version 10.00.40219.01
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file lib\plugin\ha_mroonga.dll

File Type: DLL

  Image has the following dependencies:

    KERNEL32.dll
    groonga.dll
    WS2_32.dll
    dbghelp.dll
    USER32.dll
    ADVAPI32.dll

  Summary

      3F1000 .data
        4000 .idata
       43000 .pdata
      1CB000 .rdata
       2C000 .reloc
        1000 .rsrc
      53E000 .text
        8000 data
        3000 text
c:\work\mysql\mysql-5.5.28-winx64>dumpbin /dependents lib\groonga\plugins\sugges
t\suggest.dll
Microsoft (R) COFF/PE Dumper Version 10.00.40219.01
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file lib\groonga\plugins\suggest\suggest.dll

File Type: DLL

  Image has the following dependencies:

    groonga.dll
    KERNEL32.dll

  Summary

        6000 .data
        2000 .idata
        4000 .pdata
       15000 .rdata
        1000 .reloc
        1000 .rsrc
       73000 .text

c:\work\mysql\mysql-5.5.28-winx64>dumpbin /dependents lib\groonga\plugins\table\
table.dll
Microsoft (R) COFF/PE Dumper Version 10.00.40219.01
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file lib\groonga\plugins\table\table.dll

File Type: DLL

  Image has the following dependencies:

    KERNEL32.dll
    groonga.dll

  Summary

        6000 .data
        2000 .idata
        4000 .pdata
       14000 .rdata
        1000 .reloc
        1000 .rsrc
       6F000 .text

ha_mroonga.dllからエクスポートされている内容は以下の通り。

c:\work\mysql\mysql-5.5.28-winx64>dumpbin /exports lib\plugin\ha_mroonga.dll
Microsoft (R) COFF/PE Dumper Version 10.00.40219.01
Copyright (C) Microsoft Corporation.  All rights reserved.

Dump of file lib\plugin\ha_mroonga.dll

File Type: DLL

Section contains the following exports for ha_mroonga.dll

00000000 characteristics
50766AF6 time date stamp Thu Oct 11 15:45:10 2012
    0.00 version
       1 ordinal base
       3 number of functions
       3 number of names

ordinal hint RVA      name

      1    0 0070A420 _mysql_plugin_declarations_ = _mysql_plugin_declaratio

ns_ 2 1 0070A1FC mysql_plugin_interface_version = mysql_plugin_inter face_version 3 2 0070A258 mysql_sizeof_struct_st_plugin = mysql_sizeof_struct _stplugin_

Summary

  3F1000 .data
    4000 .idata
   43000 .pdata
  1CB000 .rdata
   2C000 .reloc
    1000 .rsrc
  53E000 .text
    8000 data
    3000 text

#36 Updated by Kentaro HAYASHI over 5 years ago

デバッガで追ってみたところ、mysql側で実装されているgmtime_r内部で呼んでいるmysql_mutex_lockの呼び出しで例外が発生していた。

試したこと * ha_mroonga.cppのmrn_init_time()内のgmtime_rをgmtime_sにて代用した

結果 * show engines;にて登録できることを確認した。 * create functionでudfは登録できない。(シンボルが見つからない) * create tableを実行したときは別の要因で例外発生している。

懸念点 * gmtime_sはgmtime_rと完全に同一ではない。gmtime_rはリエントラントであることが明記されている実装。gmtime_sはそうではない。

以下は試してみたパッチ。

--- C:/Users/khayashi/AppData/Local/Temp/ha_4887.tmp/ha_mroonga-e5f4dc8-left.cpp    Fri Oct 12 14:59:19 2012
+++ C:/work/mroonga/mroonga-vs2010-x64-debug/ha_mroonga.cpp Fri Oct 12 14:53:12 2012
@@ -41,6 +41,7 @@
 #ifdef WIN32
 #  include 
 #  include 
+#  include 
 #  define MRN_MKDIR(pathname, mode) mkdir((pathname))
 #  define MRN_ALLOCATE_VARIABLE_LENGTH_ARRAYS(type, variable_name, variable_size) \
     type *variable_name = (type *)_malloca(sizeof(type) * variable_size)
@@ -1620,7 +1621,11 @@
   struct tm nowtm;
   time_t now;
   time(&now);
+#ifdef MSC_VER
+  gmtime_s(&now_tm, &now);
+#else
   gmtime_r(&now, &now_tm);
+#endif
   mrnutc_diff_in_seconds = now - mktime(&now_tm);
 }

シンボルが見つからないときのエラー内容。

mysql> create function mroonga_snippet returns string soname 'ha_mroonga.dll';
ERROR 1127 (HY000): Can't find symbol 'mroonga_snippet' in library
mysql> create function last_insert_grn_id returns integer soname 'ha_mroonga.dll
';
ERROR 1127 (HY000): Can't find symbol 'last_insert_grn_id' in library
mysql>

#37 Updated by Kentaro HAYASHI over 5 years ago

現状まとめ(10/15)

成功しているもの

  • ha_mroonga.dllのビルド
  • install pluginによるプラグインの登録
  • create functionによるmroonga のUDFの登録

失敗しているもの

  • mroongaストレージエンジンを指定してテーブルを生成すること

以下、失敗の詳細

試したクエリ

mysql> create table diaries (id int primary key auto_increment,content varchar(2
55), fulltext index (content)) engine = mroonga default charset utf8;

Windows7 64bitインストーラを導入して上記クエリを試した結果のログ

01:26:00 UTC - mysqld got exception 0xc0000005 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

key_buffer_size=57671680 read_buffer_size=65536 max_used_connections=1 max_threads=100 thread_count=1 connection_count=1 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 89347 K b ytes of memory Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0xd7b5ae0 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... 7feee165cb0 ha_mroonga.dll!thd_sql_command()[sql_class.cc:626] 7feee12673f ha_mroonga.dll!ha_mroonga::table_flags()[ha_mroonga.cpp:2391] 13fb6261a mysqld.exe!?get_new_handler@@YAPEAVhandler@@PEAUTABLE_SHARE@@PEAUst mem_root@@PEAUhandlerton@@@Z() 13fc2a360 mysqld.exe!?mysql_create_table_no_lock@@YA_NPEAVTHD@@PEBD1PEAUst_ha create_information@@PEAVAlter_info@@_NIPEA_N@Z() 13fc2ac28 mysqld.exe!?mysql_create_table@@YA_NPEAVTHD@@PEAUTABLE_LIST@@PEAUst _ha_create_information@@PEAVAlter_info@@@Z() 13fba3f19 mysqld.exe!?mysqlexecute_command@@YAHPEAVTHD@@@Z() 13fba70ba mysqld.exe!?mysql_parse@@YAXPEAVTHD@@PEADIPEAVParser_state@@@Z() 13fba7e8c mysqld.exe!?dispatchcommand@@YA_NW4enum_server_command@@PEAVTHD@@P EADI@Z() 13fba8c9c mysqld.exe!?do_command@@YA_NPEAVTHD@@@Z() 13fbce6e6 mysqld.exe!?do_handle_one_connection@@YAXPEAVTHD@@@Z() 13fbce7a4 mysqld.exe!handle_one_connection() 13fd5567e mysqld.exe!win_pthread_mutex_trylock() 13fefda97 mysqld.exe!my_mb_ctype_mb() 13fefdb4b mysqld.exe!my_mb_ctype_mb() 76bd652d kernel32.dll!BaseThreadInitThunk() 772cc521 ntdll.dll!RtlUserThreadStart()

Trying to get some variables. Some pointers may be invalid and cause the dump to abort. Query (d855510): create table diaries (id int primary key auto_increment,content varchar(255), fulltext index (content)) engine = mroonga default charset utf8Co nnection ID (thread ID): 1 Status: NOT_KILLED

The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains information that should help you find out what is causing the crash.

#38 Updated by Kentaro HAYASHI over 5 years ago

確認手順

  • mysqld.exeを起動
  • mysqld.exeプロセスにアタッチする
  • mysql.exeで接続し、上述のクエリを実行

結果 * ha_mroonga::table_flagsでha_thd()によりTHD*を取得しているがNULL値 * thd_sql_commandにNULLが渡される * thd_sql_commandはthdとしてNULLが渡されることを想定していないためthd->lex NULLアクセスにより例外を吐く

ulonglong ha_mroonga::table_flags() const
{
  MRN_DBUG_ENTER_METHOD();

  ulonglong flags;
  if (!share && !analyzed_for_create &&
    (
      thd_sql_command(ha_thd()) == SQLCOM_CREATE_TABLE ||
      thd_sql_command(ha_thd()) == SQLCOM_CREATE_INDEX ||
      thd_sql_command(ha_thd()) == SQLCOM_ALTER_TABLE
    )
  ) {
    create_share_for_create();
  }

MariaDB 5.5.27についても同様か確認した。 MySQLでもMariaDBでも同様の結果となった。

詳細ログは以下の通り。

121015 18:39:50 [ERROR] mysqld got exception 0xc0000005 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.

To report this bug, see http://kb.askmonty.org/en/reporting-bugs

We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

Server version: 5.5.27-MariaDB
key_buffer_size=16384
read_buffer_size=262144
max_used_connections=1
max_threads=501
thread_count=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 162158 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x0x13a49fb0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
0x7fee5c08cd0    ha_mroonga.dll!thd_sql_command()[sql_class.cc:585]
0x7fee5bc6b4e    ha_mroonga.dll!ha_mroonga::table_flags()[ha_mroonga.cpp:2392]
0x13f7328a0    mysqld.exe!get_new_handler()[handler.cc:256]
0x13f7ee972    mysqld.exe!mysql_create_table_no_lock()[sql_table.cc:4130]
0x13f7ef1f8    mysqld.exe!mysql_create_table()[sql_table.cc:4572]
0x13f771b04    mysqld.exe!mysql_execute_command()[sql_parse.cc:2593]
0x13f774b10    mysqld.exe!mysql_parse()[sql_parse.cc:5741]
0x13f7758ae    mysqld.exe!dispatch_command()[sql_parse.cc:1058]
0x13f7766c2    mysqld.exe!do_command()[sql_parse.cc:794]
0x13f71c56b    mysqld.exe!threadpool_process_request()[threadpool_common.cc:225]

0x13f786b71    mysqld.exe!io_completion_callback()[threadpool_win.cc:584]
0x76c02ff2    kernel32.dll!BaseFormatTimeOut()
0x772b098a    ntdll.dll!RtlEqualDomainName()
0x772bfeff    ntdll.dll!RtlValidateHeap()
0x76bd652d    kernel32.dll!BaseThreadInitThunk()
0x772cc521    ntdll.dll!RtlUserThreadStart()

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x13ab7f08): create table diaries (id int primary key auto_increment,cont
ent varchar(255), fulltext index (content) ) engine =mroonga default charset utf
8
Connection ID (thread ID): 5
Status: NOT_KILLED

Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,
index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_p
ushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,fi
rstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_
match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_c
ost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,
join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_b
uffer_size=off,table_elimination=on,extended_keys=off

The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.

c:\Program Files\MariaDB 5.5>

#39 Updated by Kentaro HAYASHI over 5 years ago

mroongaで登録しているハンドラでTHD*を取得できるか確認した。

対象はmrn_initおよびmrn_deinitの2つ。 追加してクエリを投げたときのha_mroonga::table_flags()でも確認した。

確認のための手順としては以下のコードを追加してデバッガで値を調べた。

thd = current_thd;

結果

mrn_init,mrn_deinit,::table_flagsで取得したcurrent_thdの値はNULL値であった。

次、mysqld.hを見ると_WIN32が定義されているときは_current_thd_noinlineを使っているのでそちらが使用されているか確認しておく。

#40 Updated by Kentaro HAYASHI over 5 years ago

mysqld.hに#errorを仕込んで_current_thd_noinline()が使われることは確認済み。 従って、Windows向けのcurrent_thd()が使われていないことによる問題ではないことがわかった。

以下のようにして#errorを一時的に追加し

#if defined(MYSQL_DYNAMIC_PLUGIN) && defined(_WIN32)
extern "C" THD *_current_thd_noinline();
#define _current_thd() _current_thd_noinline()
#error "INCLUDED!!!!!"
#else

以下のようにエラーが期待通りに発生していることを確認した。

(ClCompile target) -> 
  c:\work\mysql\mysql-5.5.28-vs2010-x64-release\sql\mysqld.h(516): fatal error C1189: #error :  "INCLUDED!!!!!" [c:\work\mroonga\mroonga-vs2010-x64-debug\ha_mroonga.vcxproj]
  c:\work\mysql\mysql-5.5.28-vs2010-x64-release\sql\mysqld.h(516): fatal error C1189: #error :  "INCLUDED!!!!!" [c:\work\mroonga\mroonga-vs2010-x64-debug\ha_mroonga.vcxproj]

#41 Updated by Kentaro HAYASHI over 5 years ago

MySQLは基本的に/MTを指定しランタイムを静的にリンクしてビルドされている。

根拠:cmake/os/Windows.cmake


# Force static runtime libraries FOREACH(flag CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG_INIT CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG_INIT) STRING(REPLACE "/MD" "/MT" "${flag}" "${${flag}}") ENDFOREACH()

ただし、ランタイムを静的にリンクする場合、以下の既知の問題が存在する。

DLL の境界を越えて CRT オブジェクトを渡す場合に発生する可能性のあるエラー http://msdn.microsoft.com/ja-jp/library/ms235460%28v=vs.80%29.aspx

TODO: MySQLにあわせてgroonga,mroongaについてもランタイムを静的にリンクしていたが、 すべて/MDでビルドしたバイナリを一式用意し動作するか確認する。

正常動作する => ランタイムの境界問題に該当 正常動作しない => その他条件の問題

上記で正常動作する場合には該当する条件を調べ、修正する必要がある。

#42 Updated by Kentaro HAYASHI over 5 years ago

ランタイムを動的にリンクする場合について

MySQL,groongaでランタイムを動的にビルドしたバイナリを準備した状態で mroongaを/MDdにてビルドしようとしたときに以下のエラーに遭遇した。

(Link target) -> 
  ha_mroonga.obj : error LNK2019: unresolved external symbol "void __cdecl plugin_unlock(class THD *,struct st_plugin_int *)" (?plugin_unlock@@YAXPEAVTHD@@PEAUst_plugin_int@@@Z) referenced in function "public: virtual __cdecl ha_mroonga::~ha_mroonga(void)" (??1ha_mroonga@@UEAA@XZ) [c:\work\mroonga\mroonga-vs2010-x64-debug-md\ha_mroonga.vcxproj]
  mrn_table.obj : error LNK2001: unresolved external symbol "void __cdecl plugin_unlock(class THD *,struct st_plugin_int *)" (?plugin_unlock@@YAXPEAVTHD@@PEAUst_plugin_int@@@Z) [c:\work\mroonga\mroonga-vs2010-x64-debug-md\ha_mroonga.vcxproj]
  mrn_table.obj : error LNK2019: unresolved external symbol "struct st_plugin_int * __cdecl ha_resolve_by_name(class THD *,struct st_mysql_lex_string const *)" (?ha_resolve_by_name@@YAPEAUst_plugin_int@@PEAVTHD@@PEBUst_mysql_lex_string@@@Z) referenced in function mrn_parse_table_param [c:\work\mroonga\mroonga-vs2010-x64-debug-md\ha_mroonga.vcxproj]
  C:\work\mroonga\mroonga-vs2010-x64-debug-md\Debug\ha_mroonga.dll : fatal error LNK1120: 2 unresolved externals [c:\work\mroonga\mroonga-vs2010-x64-debug-md\ha_mroonga.vcxproj]

必要なシンボルはmysqlserver.libに含まれているが、期待しているシグネチャが一部異なっている。

リンク時に期待しているシンボル:

plugin_unlock@@YAXPEAVTHD@@PEAUst_plugin_int@@@Z)
ha_resolve_by_name@@YAPEAUst_plugin_int@@PEAVTHD@@PEBUst_mysql_lex_string@@@Z

dumpbin /symbolsで出力したシンボル:

plugin_unlock@@YAXPEAVTHD@@PEAPEAUst_plugin_int@@@Z)
ha_resolve_by_name@@YAPEAPEAUst_plugin_int@@PEAVTHD@@PEBUst_mysql_lex_string@@@Z

#43 Updated by Kentaro HAYASHI over 5 years ago

シンボルが解決できていない部分を一旦コメントアウトし、プロセスにアタッチした時点でコメントアウトした箇所にブレークポイントを張った状態でクエリを実行して(コメントアウトによる影響がない状態で)落ちる箇所を確認した。

結果としては静的にランタイムをリンクしたときと原因は一緒でTHD*がha_thd()によって取得したときにNULL参照となるのが問題なので発生要因は同一であった。=> /MTと/MDでの違いにより引っかかっているわけではなさそう。

#44 Updated by Kentaro HAYASHI over 5 years ago

試したこと: DBUF_OFFの定義がMySQLとmroongaとで定義されていることを確認した上で、 再度ビルドしたバイナリを実行し、テーブルを生成するクエリを実行した。

結果: 例外を吐いてmysqldが終了した。 以前は、sql_class.ccでTHD*がNULLアクセスすることにより落ちていたが、今回はTHD*は取得できている状態で、thd->lexがNULLアクセスのため落ちているという結果となった。

extern "C"
int thd_sql_command(const THD *thd)
{
  return (int) thd->lex->sql_command;
}

次、sql_lexまわりでWindows特有の部分がないか調べる。

#45 Updated by Kentaro HAYASHI over 5 years ago

試したこと: mysqlのプラグインのビルドフラグとmroongaのビルドフラグに差異があったので、 ソリューションファイルを修正

削除: /EHsc 追加: /D WIN32_WINNT=0x0501 /D WIN32LEAN_AND_MEAN /D _WIN64

#46 Updated by Kentaro HAYASHI over 5 years ago

一旦クリーンな環境からやり直す。

  1. ビルドに使っていた作業ディレクトリの削除
  2. MySQLのビルド(デバッグ)
  3. groongaのビルド(デバッグ)
  4. mroongaのビルド(デバッグ)

VS2010コマンドプロンプトを開き、環境変数を設定しておく。

set PATH=c:\WinApp\cmake\bin;%PATH%
set PATH=%PATH%;c:/MinGW/msys/1.0/bin
set PATH=%PATH%;c:\work\pkg-config\bin
set PKG_CONFIG_PATH=%PKG_CONFIG_PATH%;c:/groonga/lib/pkgconfig

#47 Updated by Kentaro HAYASHI over 5 years ago

MySQLのソース(mysql-5.5.28.zip)を展開し、CMakeにてソリューションファイルを生成する。

c:\work\mysql\mysql-5.5.28-vs2010-x64-debug>cmake . -G "Visual Studio 10 Win64" -DBUILD_CONFIG=mysql_release -DCMAKE_INSTALL_PREFIX=c:\mysql > build-mysql-debug-cmake.log
-- MySQL 5.5.28
-- Packaging as: mysql-5.5.28-winx64

ソリューションファイルが生成されたら、以下のようにしてデバッグ版をビルドする。

c:\work\mysql\mysql-5.5.28-vs2010-x64-debug>msbuild MySQL.sln /p:Configuration=Debug > build-mysql-debug.log

デバッグ版がビルドし終わったら、以下のようにしてインストールする。

c:\work\mysql\mysql-5.5.28-vs2010-x64-debug>msbuild INSTALL.vcxproj /p:Configuration=Debug > build-mysql-install-debug.log

以上がMySQLのデバッグ版をビルドするときの手順となる。

#48 Updated by Kentaro HAYASHI over 5 years ago

groongaのデバッグ版をビルドする手順については以下の通り。

あらかじめgroongaのソースをcloneしておく。

CMakeでのソリューションファイルの生成に失敗するので、msysなどのshを実行できる環境で以下を実行する。

sh version-gen.sh

後でビルドするmroongaで必要なプラグインの関数をエクスポートするためにinclude/groonga/plugin.hを以下のように変更する。

--- include/groonga/plugin.h.orig   2012-10-18 17:56:09.484367400 +0900
+++ include/groonga/plugin.h    2012-10-18 18:09:39.519698800 +0900
@@ -155,7 +155,7 @@
   grn_plugin_proc_alloc() allocates a grn_obj object.
   You can use it in function that is registered as GRN_PROC_FUNCTION.
  */
-grn_obj *grn_plugin_proc_alloc(grn_ctx *ctx, grn_user_data *user_data,
+GRN_PLUGIN_EXPORT grn_obj *grn_plugin_proc_alloc(grn_ctx *ctx, grn_user_data *user_data,
                                grn_id domain, grn_obj_flags flags);

/* @@ -166,7 +166,7 @@

It only works on Windows. It returns NULL on other platforms. */ -const char *grn_plugin_win32_base_dir(void); +GRN_PLUGIN_EXPORT const char *grn_plugin_win32_base_dir(void);

#ifdef __cplusplus

コマンドプロンプトに戻り、CMakeを使ってソリューションファイルを生成する。

c:\work\groonga\groonga-vs2010-x64-debug>cmake . -G "Visual Studio 10 Win64"  -DCMAKE_INSTALL_PREFIX=c:\groonga > build-groonga-cmake-debug.log

ソリューションファイルができたら以下のようにしてビルドを行う。

c:\work\groonga\groonga-vs2010-x64-debug>msbuild groonga.sln /p:Configuration=Debug > build-groonga-debug.log

ビルドができたら、以下のようにしてインストールを行う。

c:\work\groonga\groonga-vs2010-x64-debug>msbuild INSTALL.vcxproj /p:Configuration=Debug > build-groonga-install-debug.log

libディレクトリ以下にインポートライブがないのでbinディレクトリからコピーする。

c:\work\groonga\groonga-vs2010-x64-debug>xcopy c:\groonga\bin\groonga.lib c:\groonga\lib
C:\groonga\bin\groonga.lib
1 File(s) copied

以上でmroongaをビルドするためのgroongaの準備が完了する。

#49 Updated by Kentaro HAYASHI over 5 years ago

mroongaのデバッグ版をビルドする手順は以下の通り。

mroongaのソースコードをcloneした後、CMakeを使用してソリューションファイルを生成する。 ただし、MySQLをビルドインストールしたときのmysql_config.plはそのままでは動かないので以下のような修正を行う。

--- bin/mysql_config.pl.orig    2012-10-18 17:58:13.268447500 +0900
+++ bin/mysql_config.pl 2012-10-18 18:31:52.170922100 +0900
@@ -61,6 +61,11 @@

my $IFS = $O eq "MSWin32" ? ";" : ":";

  • if ( -f "$file" )
  • {
  • return "$file";
  • } + foreach my $dir ( split($IFS, $ENV{PATH}) ) { if ( -f "$dir/$file" or -f "$dir/$file.exe" )

以下のようにして、ソリューションファイルを生成する。

cmake . --debug-output -G "Visual Studio 10 Win64" -DMYSQL_SOURCE_DIR=....\mysql\mysql-5.5.28-vs2010-x64-debug -DMYSQL_BUILD_DIR=c:\mysql -DMYSQL_CONFIG=c:\mysql\bin\mysql_config.pl -DMYSQL_CFLAGS="\"-IC:\mysql/include/mysql\" \"/MT\" \"/Zi\" \"/Ob1\" \"-DDBUG_OFF\"" -DMYSQL_VERSION=5.5.28 -DMYSQL_PLUGIN_DIR=..\lib\plugin -DCMAKE_INSTALL_PREFIX=c:\mroonga > build-mroonga-cmake-debug.log 2>&1

ソリューションファイルが作成できたら、以下のようにしてビルドする。

c:\work\mroonga\mroonga-vs2010-x64-debug>msbuild mroonga.sln /p:Configuration=Debug > build-mroonga-debug.log

上記でmroongaのビルドができるはずだが、クリーンな環境で追試したところ以下のエラーが発生している。

(Link target) -> 
  ha_mroonga.obj : error LNK2019: unresolved external symbol "void __cdecl plugin_unlock(class THD *,struct st_plugin_int *)" (?plugin_unlock@@YAXPEAVTHD@@PEAUst_plugin_int@@@Z) referenced in function "public: virtual __cdecl ha_mroonga::~ha_mroonga(void)" (??1ha_mroonga@@UEAA@XZ) [c:\work\mroonga\mroonga-vs2010-x64-debug\ha_mroonga.vcxproj]
  mrn_table.obj : error LNK2001: unresolved external symbol "void __cdecl plugin_unlock(class THD *,struct st_plugin_int *)" (?plugin_unlock@@YAXPEAVTHD@@PEAUst_plugin_int@@@Z) [c:\work\mroonga\mroonga-vs2010-x64-debug\ha_mroonga.vcxproj]
  mrn_table.obj : error LNK2019: unresolved external symbol "struct st_plugin_int * __cdecl ha_resolve_by_name(class THD *,struct st_mysql_lex_string const *)" (?ha_resolve_by_name@@YAPEAUst_plugin_int@@PEAVTHD@@PEBUst_mysql_lex_string@@@Z) referenced in function mrn_parse_table_param [c:\work\mroonga\mroonga-vs2010-x64-debug\ha_mroonga.vcxproj]
  C:\work\mroonga\mroonga-vs2010-x64-debug\Debug\ha_mroonga.dll : fatal error LNK1120: 2 unresolved externals [c:\work\mroonga\mroonga-vs2010-x64-debug\ha_mroonga.vcxproj]

#50 Updated by Kouhei Sutou over 5 years ago

試してみたが、初期化時にクラッシュする。

以下に手順をまとめる。

h2. 準備

  • Windowsのロケールを英語ロケールにする

h2. 確認

ソースと手元でビルドしたバイナリーを http://packages.groonga.org/tmp/mroonga-windows.zip (711MB)においてあるのでダウンロードする。

source/groonga/はc:\groongaにおき、 source/mysql/はc:\mysqlにおく。

この状態でVisual Studio用のコマンドプロンプトを開く。(devenvとかが使えるようにPATHが通っているやつ。)

以下のコマンドを実行する。

> set PATH=c:\groonga\bin;%PATH%
> devenv c:\mysql\bin\mysqld.exe

Visual Studioが起動するので、その中でmysqld.exeを「実行」する。(ツールバーのどっかのメニューから選べる。「ツール」とかだったかも。)

しばらくするとクラッシュする。「中断」してクラッシュしたところを確認すると @pthread_mutex_lock@ みたいなところで落ちている。

h2. ビルド

自分でビルドする用のものはbinary/じゃなくてsource/の方に入っている。中には以下のソースが入っている。

  • groonga: source/groonga/
  • MySQL: source/mysql-5.5.28/
  • mroonga: source/mroonga/

groongaは↑のバイナリーを使ってもよい気がするが、自分でビルドするなら以下のコマンドを実行する。

> cd source/groonga
> config.bat
> build.bat

これでビルドしてc:\groonga\以下にインストールされる。

MySQLは以下のようにビルドする。MySQLの変更点は後述。

> cd source/mysql-5.5.28
> config.bat
> build.bat

これでビルドしてc:\mysql\以下にインストールされる。

MySQLの変更点は以下の通り。

強制的にC/C++ランタイムをスタティックリンクしているのをやめて、DLLを使うようにする。

diff -ru mysql-5.5.28.orig/cmake/os/Windows.cmake mysql-5.5.28/cmake/os/Windows.
cmake
--- mysql-5.5.28.orig/cmake/os/Windows.cmake    2012-08-29 17:50:46.000000000 +0
900
+++ mysql-5.5.28/cmake/os/Windows.cmake 2012-10-19 09:32:00.904340900 +0900
@@ -77,7 +77,7 @@
    CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG_INIT 
    CMAKE_CXX_FLAGS_RELEASE  CMAKE_CXX_FLAGS_RELWITHDEBINFO
    CMAKE_CXX_FLAGS_DEBUG  CMAKE_CXX_FLAGS_DEBUG_INIT)
-   STRING(REPLACE "/MD"  "/MT" "${flag}" "${${flag}}")
+   #STRING(REPLACE "/MD"  "/MT" "${flag}" "${${flag}}")
   ENDFOREACH()
   
   # Remove support for exceptions

mroongaは以下のようにビルドする。mroongaの変更点は後述する。

> cd source\mroonga
> config.bat
> build.bat

これでMySQLのプラグインディレクトリにha_mroonga.dllをインストールする。

mroongaの変更点は以下の通り。

デバッグビルドにする。

diff --git a/CMakeLists.txt b/CMakeLists.txt
index db22b97..f9a2127 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -115,7 +115,6 @@ if(WIN32)
 #       http://msdn.microsoft.com/en-us/library/8ef0s5kh%28v=vs.90%29.aspx
   set_property(TARGET ha_mroonga APPEND PROPERTY COMPILE_DEFINITIONS
     "__WIN__"
-    "DBUG_OFF"
     "_CRT_SECURE_NO_WARNINGS"
     "_WIN32_WINNT=0x0501"
     "WIN32_LEAN_AND_MEAN"

スタティックリンクではなくDLLを使う。

diff --git a/CMakeLists.txt b/CMakeLists.txt
index db22b97..f9a2127 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -126,12 +125,12 @@ endif()
 if(WIN32)
 # NOTE: ignore incompatible runtime libraries explicitly.
 #       http://msdn.microsoft.com/en-us/library/6wtdswk0%28v=vs.80%29.aspx 
-  set_target_properties(ha_mroonga PROPERTIES
-    LINK_FLAGS "/NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:msvcrtd.lib")
-  set_target_properties(ha_mroonga PROPERTIES
-    LINK_FLAGS_DEBUG "/NODEFAULTLIB:libcmt.lib")
-  set_target_properties(ha_mroonga PROPERTIES
-    LINK_FLAGS_RELEASE "/NODEFAULTLIB:libcmtd.lib")
+#  set_target_properties(ha_mroonga PROPERTIES
+#    LINK_FLAGS "/NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:msvcrtd.lib")
+#  set_target_properties(ha_mroonga PROPERTIES
+#    LINK_FLAGS_DEBUG "/NODEFAULTLIB:libcmt.lib")
+#  set_target_properties(ha_mroonga PROPERTIES
+#    LINK_FLAGS_RELEASE "/NODEFAULTLIB:libcmtd.lib")
   set(MYSQL_IMPORT_LIBRARIES
     "libmysqld${IMPORT_SUFFIX};mysqlserver${IMPORT_SUFFIX}")
   target_link_libraries(ha_mroonga ${GROONGA_LIBRARIES} ${MYSQL_IMPORT_LIBRARIE
S})

落ちるからgmtime_s()でごまかしているのをやめる。

diff --git a/ha_mroonga.cpp b/ha_mroonga.cpp
index 6d84cd0..bc34df3 100644
--- a/ha_mroonga.cpp
+++ b/ha_mroonga.cpp
@@ -1621,11 +1624,7 @@ static void mrn_init_time(void)
   struct tm now_tm;
   time_t now;
   time(&now);
-#ifdef _MSC_VER
-  gmtime_s(&now_tm, &now);
-#else
   gmtime_r(&now, &now_tm);
-#endif
   mrn_utc_diff_in_seconds = now - mktime(&now_tm);
 }

h2. 起動

起動方法はバイナリーを起動する方法と同じである。

> set PATH=c:\groonga\bin;%PATH%
> devenv c:\mysql\bin\mysqld.exe

#51 Updated by Kouhei Sutou about 5 years ago

  • Category set to MariaDB対応

Also available in: Atom PDF