Bug #42775 configure for debug build fails because of Falcon
Submitted: 11 Feb 2009 22:54 Modified: 16 Feb 2009 8:17
Reporter: Yi An Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Compiling Severity:S1 (Critical)
Version:6.0.9-alpha OS:Linux
Assigned to: CPU Architecture:Any
Tags: C++, Exception enabled, falcon

[11 Feb 2009 22:54] Yi An
Description:
I got this when I configure for debug build, basically the falcon plug-in needs C++ exception enabled. When supplied with --without-plugin-falcon, the configure script does not recognize it. 
"....
checking whether to use MyISAM MERGE Engine... yes
checking whether to use Cluster Storage Engine... no
checking compiler flag to enable implicit templates... -fimplicit-templates
checking compiler flag to enable exceptions...
Falcon must be compiled with support for C++ exceptions enabled.
Please adjust your compiler flags or disable support for Falcon (--without-plugin-falcon).
"

How do you get around this problem?
I used these compiler flags and configure switches as suggested by the article. 

CC=gcc CFLAGS="-O2" CXX=gcc CXXFLAGS="-O2 -felide-constructors \
    -fno-exceptions -fno-rtti" ./configure  \
   --with-debug --with-extra-charsets=complex

How to repeat:
run configure with the following on linux. 

CC=gcc CFLAGS="-O2" CXX=gcc CXXFLAGS="-O2 -felide-constructors \
    -fno-exceptions -fno-rtti" ./configure  \
   --with-debug --with-extra-charsets=complex

You will get this error. 

"....
checking whether to use MyISAM MERGE Engine... yes
checking whether to use Cluster Storage Engine... no
checking compiler flag to enable implicit templates... -fimplicit-templates
checking compiler flag to enable exceptions...
Falcon must be compiled with support for C++ exceptions enabled.
Please adjust your compiler flags or disable support for Falcon (--without-plugin-falcon).
"

with the --without-plugin-falcon added. It says
"config.status: executing default commands
configure: WARNING: unrecognized options: --without-plugin-falcon
"

if I change the CC and CXX to g++, configure will run through, but make will error out when linking.
[12 Feb 2009 8:51] Valeriy Kravchuk
I can not repeat this with recent 6.0.10 from bzr:

openxs@suse:/home2/openxs/bzr/mysql-6.0-work> ./configure --without-plugin-falcon --prefix=/home2/openxs/dbs/6.0 2>&1 | grep falcon
openxs@suse:/home2/openxs/bzr/mysql-6.0-work> grep VERSION include/mysql_version.h
#define PROTOCOL_VERSION                10
#define MYSQL_SERVER_VERSION            "6.0.10-alpha"
#define MYSQL_BASE_VERSION              "mysqld-6.0"
#define MYSQL_VERSION_ID                60010
[12 Feb 2009 9:01] Sveta Smirnova
Thank you for the report.

Yes, Falcon requires C++ exceptions and is not possible to build it with CXX=gcc, so this error is correct.

Regarding about not supported --without-plugin-falcon option. This looks like just wrong error message for me. Did you try to run make?
[12 Feb 2009 18:50] Yi An
The version I tried was the source distribution from mysql download page. I'd like to run the debug version, but GDB cannot interrupt mysqld. And the reference manual gave a syntax for configure that does not work. I probably need to try 6.0.10-alpha with g++. Thanks.
[12 Feb 2009 19:19] Sveta Smirnova
Thank you for the feedback.

On my machine if I compile mysqld with --without-plugin-falcon I get same error, but build succeed. Did you try to run make after configure?
[13 Feb 2009 4:12] Yi An
Eventually something simple worked for me
$CFLAGS="-g3" ./configure
this will generate debug build that GDB is able to put break points after attaching to the pid. 

The bug can be closed now. However, the configure script giving the --without-plugin-falcon should be corrected. Also the reference manual page that gave the configure scripts should be updated for mysql 6.0 and onward. This probably only work with mysql 5.0. 

CC=gcc CFLAGS="-O2" CXX=gcc CXXFLAGS="-O2 -felide-constructors \
   -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql \
   --with-debug --with-extra-charsets=complex
[16 Feb 2009 8:17] Sveta Smirnova
Thank you for the feedback.

I can not repeat error if specify configure option --without-plugin-falcon with current development sources anymore. Regarding to C++ exceptions compilation error was expected, because Falcon needs it. So I close the report as "Not a Bug".