Bug #63595 Build fails on Windows 7 x64 st_my_pthread_fastmutex_t
Submitted: 5 Dec 2011 7:20 Modified: 20 Dec 2011 6:13
Reporter: Rotem Fogel Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.5.19 OS:Windows (Version 6.1.7601)
Assigned to: CPU Architecture:Any
Tags: build, RecursionCount, st_my_pthread_fastmutex_t

[5 Dec 2011 7:20] Rotem Fogel
Description:
C:\dev\src\mysql-5.5.18\mysys\my_winthread.c(46): error C2039: 'RecursionCount' : is not a member of 'st_my_pthread_fastmutex_t' [C:\dev\src\mysql-5.5.18\mysys\mysys.vcxproj]
          C:/dev/src/mysql-5.5.18/include\my_pthread.h(546) : see declaration of 'st_my_pthread_fastmutex_t'

How to repeat:
1. Download and unpack the source code
2. Use cmake with the following definitions:
   cmake . -G "Visual Studio 10 Win64" -DWITH_FAST_MUTEXES=ON 
   -DCMAKE_BUILD_TYPE=MinSizeRel
3. Build using msbuild:
   msbuild MySQL.sln /t:Rebuild /p:Configuration=MinSizeRel
[5 Dec 2011 8:23] Rotem Fogel
After setting WITH_FAST_MUTEXES=OFF, everything compiled successfully.
[5 Dec 2011 12:36] MySQL Verification Team
I couldn't repeat with VS 9 2008:

H:\test\mysql-5.5.18> cmake -G "Visual Studio 9 2008 Win64" -DWITH_FAST_MUTEXES=ON -DCMAKE_BUILD_TYPE=MinSizeRel
-- Check for working C compiler using: Visual Studio 9 2008 Win64
-- Check for working C compiler using: Visual Studio 9 2008 Win64 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 9 2008 Win64
-- Check for working CXX compiler using: Visual Studio 9 2008 Win64 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- MySQL 5.5.18
-- Check size of void *
-- Check size of void * - done
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - not found.
-- Found Threads: TRUE
-- Looking for fedisableexcept
-- Looking for fedisableexcept - not found
-- Check size of time_t
-- Check size of time_t - done
-- Performing Test TIME_T_UNSIGNED
-- Performing Test TIME_T_UNSIGNED - Failed
-- Cannot find wix 3, installer project will not be generated
-- Configuring done
-- Generating done
-- Build files have been written to: H:/test/mysql-5.5.18

H:\test\mysql-5.5.18>sql\Debug\mysqld --version
sql\Debug\mysqld  Ver 5.5.18-debug for Win64 on x86 (Source distribution)
[5 Dec 2011 12:56] Rotem Fogel
Visual Studio 10 is not supported for building MySQL 5.1?
[5 Dec 2011 13:04] MySQL Verification Team
VS 10 is supported just I don't have it installed to test.
[20 Dec 2011 6:13] Bogdan Degtyariov
The bug is verified with the latest source distribution 5.5.19.
I have got exactly the same error message and disabling fast mutexes worked for me as a workaround.