Bug #28712 5.1-telco compile time error (sql_lex.cc)
Submitted: 28 May 2007 3:17 Modified: 20 Jun 2007 15:35
Reporter: Jonathan Miller Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:mysql-5.1-telco OS:Linux
Assigned to: Antony Curtis CPU Architecture:Any

[28 May 2007 3:17] Jonathan Miller
Description:

Hi!

Can you please file a bugreport and detail what compiler/configure options was used.

Thanks!

Regards,
Antony.

On Sun, 2007-05-27 at 22:44 +0200, Jonathan Miller wrote:
> Hi Tomas,
> 
> Downloaded the latest clone and tried to compile to get some work 
> done, but it is failing on me.
> 
> no-rtti -MT sql_lex.o -MD -MP -MF ".deps/sql_lex.Tpo" -c -o sql_lex.o 
> sql_lex.cc; \ then mv -f ".deps/sql_lex.Tpo" ".deps/sql_lex.Po"; else 
> rm -f ".deps/sql_lex.Tpo"; exit  1; fi
> sql_lex.cc: In constructor â?~st_lex::st_lex()â?T:
> sql_lex.cc:1790: error: ISO C++ forbids variable-size array 
> â?~compile_time_assertâ?T
> make[4]: *** [sql_lex.o] Error 1
> make[4]: Leaving directory `/data1/mysql-5.1-telco3/sql'
> make[3]: *** [all-recursive] Error 1
> make[3]: Leaving directory `/data1/mysql-5.1-telco3/sql'
> make[2]: *** [all] Error 2
> make[2]: Leaving directory `/data1/mysql-5.1-telco3/sql'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/data1/mysql-5.1-telco3'
> make: *** [all] Error 2
> Connection to ndb08 closed.
> 
> 
> st_lex::st_lex()
>   :result(0), yacc_yyss(0), yacc_yyvs(0),
>    sql_command(SQLCOM_END), option_type(OPT_DEFAULT) {
>   /* Check that plugins_static_buffer is declared immediately after 
> plugins */
>   compile_time_assert((&plugins + 1) == 
> (DYNAMIC_ARRAY*)plugins_static_buffer);
> 
>   my_init_dynamic_array2(&plugins, sizeof(plugin_ref),
>                          plugins_static_buffer,
>                          INITIAL_LEX_PLUGIN_LIST_SIZE,
>                          INITIAL_LEX_PLUGIN_LIST_SIZE);
>   reset_query_tables_list(TRUE);
> }
> 
> ~

How to repeat:
gcc -v
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --
enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-lang
uages=c,c++,objc,java,f95,ada --enable-java-awt=gtk --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --host=i386-redhat-linux
Thread model: posix
gcc version 4.0.2 20051125 (Red Hat 4.0.2-8)

Configuration:
1) (first try)
configure='CC=gcc CXX=gcc CFLAGS="-Wall -pedantic -Wno-long-long" CXXFLAGS="-Wall -pedantic -Wno-long-long" ./configure --with-row-base
d-replication --with-ndbcluster --with-readline --enable-thread-safe-client --with-ndb-test --with-innodb  --with-ndbcc-flags="-g -DERROR_INSERT"'

2) (second try)
./BUILD/compile-pentium-max
[20 Jun 2007 15:35] Antony Curtis
offending line already removed by kostja.