Bug #40107 Compile error in "sql/sql_bitmap.h"
Submitted: 17 Oct 2008 14:03 Modified: 4 Nov 2008 19:51
Reporter: Joerg Bruehe Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: Compiling Severity:S1 (Critical)
Version:6.0.8-alpha OS:Solaris (Solaris 9, all CPUs)
Assigned to: CPU Architecture:Any

[17 Oct 2008 14:03] Joerg Bruehe
Description:
This is a compile bug in the current 6.0 tree
which has been seen on Sun Solaris 9 hosts using the compiler version
    Sun C++ 5.6

It has happened on both hosts tried, using x86 or Sparc-64 CPU.

Message is:
source='ha_myisam.cc' object='ha_myisam.o' libtool=no \
DEPDIR=.deps depmode=none /bin/bash ../../depcomp \
CC -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include -I../../include -I../../regex -I../../sql -I.    -g -xO3 -noex -mt -D_FORTEC_ -xarch=v9   -D_FILE_OFFSET_BITS=64 -DHAVE_RWLOCK_T  -c -o ha_myisam.o ha_myisam.cc
"../../sql/sql_bitmap.h", line 230: Error: map is not accessible from Bitmap<64>::Iterator::Iterator(Bitmap<64>&).
"ha_myisam.cc", line 1502: Warning (Anachronism): Formal argument func of type char(*)(void*) in call to mi_set_index_cond_func(st_myisam_info*, char(*)(void*), void*) is being passed extern "C" char(*)(void*).
"ha_myisam.cc", line 2085: Warning (Anachronism): Formal argument func of type char(*)(void*) in call to mi_set_index_cond_func(st_myisam_info*, char(*)(void*), void*) is being passed extern "C" char(*)(void*).
1 Error(s) and 2 Warning(s) detected.
make[2]: *** [ha_myisam.o] Error 1

It seems not to happen on hosts using the Sun Studio 12 compiler,
which were used in the 6.0.7 release build.
I have not seen a source difference between 6.0.7 and this current snapshot which would explain the problem, so I assume it is the compiler version.

That test build has not been complete, was done on only 8 platforms, so there may be more which also stumble on this.

How to repeat:
Build on one of the hosts using this compiler.

Suggested fix:
Check the C++ code.
[4 Nov 2008 19:52] Omer Barnir
Problem not observed with current compilers (Sun Studio 12)