Bug #33907 Errors compiling mysql with Microsoft Visual C++ Express 2008
Submitted: 17 Jan 2008 20:15 Modified: 19 Feb 2009 19:40
Reporter: Georgi Kodinov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.0 BK, 5.1 BK, 6.0 BK OS:Windows
Assigned to: Vladislav Vaintroub CPU Architecture:Any

[17 Jan 2008 20:15] Georgi Kodinov
Description:
Cannot compile MySQL using the current VC++ Express version (2008). There's win/build-vs8.bat, but no win/build-vs9.bat

How to repeat:
Try to compile a bk clone with the above VS++ express version.

Suggested fix:
Update the build scripts
[17 Jan 2008 20:16] Georgi Kodinov
diff to fix various problems in the build scripts

Attachment: diff.diff (, text), 2.49 KiB.

[17 Jan 2008 20:18] Georgi Kodinov
build-vs9.bat (to be added to the win/ directory)

Attachment: build-vs9.bat (, text), 898 bytes.

[14 Mar 2008 17:01] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/44015

ChangeSet@1.2599, 2008-03-14 19:01:02+02:00, gkodinov@magare.gmz +3 -0
  Bug #33907: Errors compiling mysql with Microsoft Visual C++ Express 2008
  
  Fixed and ammended various #ifdefs to allow compiling with the above 
  compiler.
[21 Aug 2008 17:11] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/52244

2672 Vladislav Vaintroub	2008-08-21 [merge]
      Bug #33907 : Errors compiling mysql with Microsoft Visual C++ Express 2008
      
      - Cherry pick 6.0 changes for Visual Studio 2008 support
      - Add scripts  win\build-vs9.bat and win\build-vs9_x64.bat
      
      Also, remove CMake generated visual studio project files.
[22 Aug 2008 13:11] Georgi Kodinov
Just tested with VS 2008 Express on win32 : the 5.0 BT builds out of the box and runs fine.
[25 Aug 2008 9:21] Georgi Kodinov
One thing that I've noted while doing win/build-nmake.bat is that it doesn't recognize VS Express  2008 as a "free" MS compiler :

Z:\mysql\bzr\fix-win-5.1-bugteam>win\build-nmake.bat
The system cannot find the file specified.
-- The C compiler identification is MSVC
-- The executable file format is Unknown
-- The CXX compiler identification is MSVC
-- Check for CL compiler version
-- Check for CL compiler version - 1500
-- Check if this is a free VC compiler
-- Check if this is a free VC compiler - no
...
[1 Sep 2008 13:33] Mattias Jonsson
When running the build-vs9.bat script there is a warning:

C:\bzrroot\vs9-60-bugteam>win\build-vs9.bat
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio 9.0/VC
/bin/cl.exe
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio 9.0/VC
/bin/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio 9.0/
VC/bin/cl.exe
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio 9.0/
VC/bin/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
CMake Warning (dev) at extra/CMakeLists.txt:22 (ADD_EXECUTABLE):
  Policy CMP0003 should be set before this line.  Add code such as

    if(COMMAND cmake_policy)
      cmake_policy(SET CMP0003 NEW)
    endif(COMMAND cmake_policy)

  as early as possible but after the most recent call to
  cmake_minimum_required or cmake_policy(VERSION).  This warning appears
  because target "comp_err" links to some libraries for which the linker must
  search:

    ws2_32

  and other libraries with known full path:

    C:/bzrroot/vs9-60-bugteam/dbug/Debug/dbug.lib
    C:/bzrroot/vs9-60-bugteam/mysys/Debug/mysys.lib
    C:/bzrroot/vs9-60-bugteam/strings/Debug/strings.lib
    C:/bzrroot/vs9-60-bugteam/zlib/Debug/zlib.lib

  CMake is adding directories in the second list to the linker search path in
  case they are needed to find libraries from the first list (for backwards
  compatibility with CMake 2.4).  Set policy CMP0003 to OLD or NEW to enable
  or disable this behavior explicitly.  Run "cmake --help-policy CMP0003" for
  more information.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: C:/bzrroot/vs9-60-bugteam
C:\bzrroot\vs9-60-bugteam>

(using cmake 2.6-patch 1)

build is OK when opening the MySQL.sln file in the VS9 (express) GUI.
[1 Sep 2008 13:57] Vladislav Vaintroub
Matthias, the warning is cmake 2.6.1 specific. You should be getting the same running vs8.bat and vs71.bat as well. What does the warning try to tell me, I can guess - we mix OS libraries and our own libraries in dependencies. The warning unfortunately does not tell how to fix it properly.
[14 Sep 2008 4:15] Bugs System
Pushed into 6.0.7-alpha  (revid:vvaintroub@mysql.com-20080821171117-jvy1vstcpzv96ypr) (version source revid:hakan@mysql.com-20080721095625-h2pyxb88uwtjeavf) (pib:3)
[16 Sep 2008 14:32] Paul DuBois
Noted in 6.0.7 changelog.

Changes to build files were made to enable the MySQL distribution to
compile on Microsoft Visual C++ Express 2008.

Setting to NDI pending push into 5.0.x, 5.1.x.
[26 Sep 2008 12:30] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/54543

2698 He Zhenxing	2008-09-26 [merge]
      Merge 5.1 main -> 5.1-rpl
[1 Oct 2008 16:06] Bugs System
Pushed into 5.1.28  (revid:vvaintroub@mysql.com-20080821171117-jvy1vstcpzv96ypr) (version source revid:vvaintroub@mysql.com-20080901094821-nchslkaamoc37zuh) (pib:4)
[1 Oct 2008 17:11] Paul DuBois
Noted in 5.1.28 changelog.

Setting report to NDI pending push into 5.0.x
[28 Oct 2008 21:03] Bugs System
Pushed into 5.1.29-ndb-6.2.17  (revid:vvaintroub@mysql.com-20080821171117-jvy1vstcpzv96ypr) (version source revid:tomas.ulin@sun.com-20081028140209-u4emkk1xphi5tkfb) (pib:5)
[28 Oct 2008 22:22] Bugs System
Pushed into 5.1.29-ndb-6.3.19  (revid:vvaintroub@mysql.com-20080821171117-jvy1vstcpzv96ypr) (version source revid:tomas.ulin@sun.com-20081028194045-0353yg8cvd2c7dd1) (pib:5)
[1 Nov 2008 9:48] Bugs System
Pushed into 5.1.29-ndb-6.4.0  (revid:vvaintroub@mysql.com-20080821171117-jvy1vstcpzv96ypr) (version source revid:jonas@mysql.com-20081101082305-qx5a1bj0z7i8ueys) (pib:5)
[3 Nov 2008 16:10] Paul DuBois
Setting report to NDI pending push into 5.0.x.
[19 Feb 2009 19:40] Paul DuBois
Noted in 5.0.70 changelog.