Bug #45287 Compilation warnings on mysql-5.0-bugteam on Windows (32 and 64)
Submitted: 3 Jun 2009 8:15 Modified: 10 Aug 2009 22:48
Reporter: Georgi Kodinov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version: OS:Windows
Assigned to: Georgi Kodinov CPU Architecture:Any
Tags: ProdEngPB2

[3 Jun 2009 8:15] Georgi Kodinov
Description:
pb2 returns compilation warnings on windows 32 and 64bit compilations:

32 bit:

*** At line 57 of the build log, in cmake:
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:

    wsock32

  and other libraries with known full path:

    G:/pb2/build/sb_0-560532-1243931489.96/mysql-5.0.83-win-x86/dbug/Debug/dbug.lib
    G:/pb2/build/sb_0-560532-1243931489.96/mysql-5.0.83-win-x86/mysys/Debug/mysys.lib
    G:/pb2/build/sb_0-560532-1243931489.96/mysql-5.0.83-win-x86/strings/Debug/strings.lib
    G:/pb2/build/sb_0-560532-1243931489.96/mysql-5.0.83-win-x86/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.

*** At line 418 of the build log, in mysqlclient_notls::G:\pb2\build\sb_0-560532-1243931489.96\mysql-5.0.83-win-x86\include\config-win.h(24):
9>G:\pb2\build\sb_0-560532-1243931489.96\mysql-5.0.83-win-x86\include\config-win.h(24) : warning C4005: '_WIN32_WINNT' : macro redefinition

*** At line 919 of the build log, in mysqlmanager::G:\pb2\build\sb_0-560532-1243931489.96\mysql-5.0.83-win-x86\include\config-win.h(24):
34>G:\pb2\build\sb_0-560532-1243931489.96\mysql-5.0.83-win-x86\include\config-win.h(24) : warning C4005: '_WIN32_WINNT' : macro redefinition

*** At line 923 of the build log, in mysqlmanager::G:\pb2\build\sb_0-560532-1243931489.96\mysql-5.0.83-win-x86\include\config-win.h(24):
34>G:\pb2\build\sb_0-560532-1243931489.96\mysql-5.0.83-win-x86\include\config-win.h(24) : warning C4005: '_WIN32_WINNT' : macro redefinition

*** At line 985 of the build log, in libmysql::G:\pb2\build\sb_0-560532-1243931489.96\mysql-5.0.83-win-x86\include\config-win.h(24):
35>G:\pb2\build\sb_0-560532-1243931489.96\mysql-5.0.83-win-x86\include\config-win.h(24) : warning C4005: '_WIN32_WINNT' : macro redefinition

*** At line 1108 of the build log, in mysqlclient::G:\pb2\build\sb_0-560532-1243931489.96\mysql-5.0.83-win-x86\include\config-win.h(24):
38>G:\pb2\build\sb_0-560532-1243931489.96\mysql-5.0.83-win-x86\include\config-win.h(24) : warning C4005: '_WIN32_WINNT' : macro redefinition

*** At line 1357 of the build log, in mysqld::.\sql_yacc.cc(14412):
40>.\sql_yacc.cc(14412) : warning C4065: switch statement contains 'default' but no 'case' labels

*** At line 1477 of the build log, in mysqld::G:\pb2\build\sb_0-560532-1243931489.96\mysql-5.0.83-win-x86\include\config-win.h(24):
40>G:\pb2\build\sb_0-560532-1243931489.96\mysql-5.0.83-win-x86\include\config-win.h(24) : warning C4005: '_WIN32_WINNT' : macro redefinition

How to repeat:
see pb2 5.0-bugteam tree

Suggested fix:
Fix the warnings.
[3 Jun 2009 8:15] Georgi Kodinov
64 bit warnings

Attachment: 64bit.txt (text/plain), 8.69 KiB.

[3 Jun 2009 8:17] Georgi Kodinov
see related bug #43253 and #45286
[15 Jul 2009 12:31] 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/78725

2781 Georgi Kodinov	2009-07-15
      Bug #45287: phase 1 : 32 bit compilation warnings
      
      Fixed the following problems:
      1. cmake 2.6 warning because of a changed default on
      how the dependencies to libraries with a specified 
      path are resolved.
      Set to the new behavior because in MySQL's cmake there
      are no such libraries.
      2. Removed an obsolete pre-NT4 hack including defining
      Windows system defines to alter the behavior of windows.h.
      3. Disabled warning C4065 on compiling sql_yacc.cc because
      of a know incompatibility in some of the newer bison binaries.
[15 Jul 2009 12:43] 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/78727

2781 Georgi Kodinov	2009-07-15
      Bug #45287: phase 1 : 32 bit compilation warnings
      
      Fixed the following problems:
      1. cmake 2.6 warning because of a changed default on
      how the dependencies to libraries with a specified 
      path are resolved.
      Set to the new behavior because in MySQL's cmake there
      are no such libraries.
      2. Removed an obsolete pre-NT4 hack including defining
      Windows system defines to alter the behavior of windows.h.
      3. Disabled warning C4065 on compiling sql_yacc.cc because
      of a know incompatibility in some of the newer bison binaries.
[15 Jul 2009 12:56] 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/78730

2781 Georgi Kodinov	2009-07-15
      Bug #45287: phase 1 : 32 bit compilation warnings
      
      Fixed the following problems:
      1. cmake 2.6 warning because of a changed default on
      how the dependencies to libraries with a specified 
      path are resolved.
      Set to the new behavior because in MySQL's cmake there
      are no such libraries.
      2. Removed an obsolete pre-NT4 hack including defining
      Windows system defines to alter the behavior of windows.h.
      3. Disabled warning C4065 on compiling sql_yacc.cc because
      of a know incompatibility in some of the newer bison binaries.
[15 Jul 2009 18:59] 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/78773

2781 Georgi Kodinov	2009-07-15
      Bug #45287: phase 1 : 32 bit compilation warnings
      
      Fixed the following problems:
      1. cmake 2.6 warning because of a changed default on
      how the dependencies to libraries with a specified 
      path are resolved.
      Fixed by requiring cmake 2.6.
      2. Removed an obsolete pre-NT4 hack including defining
      Windows system defines to alter the behavior of windows.h.
      3. Disabled warning C4065 on compiling sql_yacc.cc because
      of a know incompatibility in some of the newer bison binaries.
[16 Jul 2009 11:34] 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/78832

2783 Georgi Kodinov	2009-07-16
      Bug #45287: phase 2 : 5.0 64 bit compilation warnings
      
      Fixed various compilation warnings when compiling on a 
      64 bit windows.
[16 Jul 2009 11:56] 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/78834

2783 Georgi Kodinov	2009-07-16
      Bug #45287: phase 2 : 5.0 64 bit compilation warnings
      
      Fixed various compilation warnings when compiling on a 
      64 bit windows.
[16 Jul 2009 12:42] 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/78839

2783 Georgi Kodinov	2009-07-16
      Bug #45287: phase 2 : 5.0 64 bit compilation warnings
             
      Fixed various compilation warnings when compiling on a 
       64 bit windows.
[16 Jul 2009 13:21] 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/78850

3026 Georgi Kodinov	2009-07-16 [merge]
      null merge the second round of fixes of bug #45287 to 5.1-bugteam.
[4 Aug 2009 13:58] Bugs System
Pushed into 5.0.85 (revid:davi.arnaut@sun.com-20090804135315-6lfdnk4zjwk7kn7r) (version source revid:davi.arnaut@sun.com-20090804135315-6lfdnk4zjwk7kn7r) (merge vers: 5.0.85) (pib:11)
[4 Aug 2009 19:51] Bugs System
Pushed into 5.4.4-alpha (revid:alik@sun.com-20090804194615-h40sa098mx4z49qg) (version source revid:dao-gang.qu@sun.com-20090717025250-n2lq5mqibjfdpigu) (merge vers: 5.4.4-alpha) (pib:11)
[4 Aug 2009 20:45] Bugs System
Pushed into 5.1.38 (revid:davi.arnaut@sun.com-20090804204317-ggodqkik7de6nfpz) (version source revid:davi.arnaut@sun.com-20090804204317-ggodqkik7de6nfpz) (merge vers: 5.1.38) (pib:11)
[10 Aug 2009 22:48] Paul DuBois
Noted in 5.0.85 changelog.

Compiler warnings on Windows were fixed.
[1 Oct 2009 5:59] Bugs System
Pushed into 5.1.39-ndb-6.3.28 (revid:jonas@mysql.com-20091001055605-ap2kiaarr7p40mmv) (version source revid:jonas@mysql.com-20091001055605-ap2kiaarr7p40mmv) (merge vers: 5.1.39-ndb-6.3.28) (pib:11)
[1 Oct 2009 7:25] Bugs System
Pushed into 5.1.39-ndb-7.0.9 (revid:jonas@mysql.com-20091001072547-kv17uu06hfjhgjay) (version source revid:jonas@mysql.com-20091001071652-irejtnumzbpsbgk2) (merge vers: 5.1.39-ndb-7.0.9) (pib:11)
[1 Oct 2009 13:25] Bugs System
Pushed into 5.1.39-ndb-7.1.0 (revid:jonas@mysql.com-20091001123013-g9ob2tsyctpw6zs0) (version source revid:jonas@mysql.com-20091001123013-g9ob2tsyctpw6zs0) (merge vers: 5.1.39-ndb-7.1.0) (pib:11)
[5 Oct 2009 10:50] Bugs System
Pushed into 5.1.39-ndb-6.2.19 (revid:jonas@mysql.com-20091005103850-dwij2dojwpvf5hi6) (version source revid:jonas@mysql.com-20090930185117-bhud4ek1y0hsj1nv) (merge vers: 5.1.39-ndb-6.2.19) (pib:11)