Bug #39419 Falcon should not be compiled if compiler or options do not support exceptions
Submitted: 12 Sep 2008 9:38 Modified: 13 Dec 2008 10:00
Reporter: Olav Sandstå Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S3 (Non-critical)
Version:6.0.7 OS:Any
Assigned to: Olav Sandstå CPU Architecture:Any
Tags: F_ERROR HANDLING
Triage: Triaged: D1 (Critical)

[12 Sep 2008 9:38] Olav Sandstå
Description:
Falcon uses C++ exceptions and needs to be compiled with support for C++ exceptions. If the compiler does not support C++ exceptions or the specified 
compiler options do explicitly or implicitly disable support for exceptions then
there is no reason for compile and include Falcon in the build.

We should try to detect this situation as part of the build process and not
include Falcon in the build.

See also bug 39260 where we add runtime support for handling the case where 
Falcon actually have been built without support for C++ exceptions.

How to repeat:
Compile Falcon withou support for C++ exception and try to run it.

Suggested fix:
Extend configure so that it detects if the compiler with the specified compile options do not support exceptions. When that is detected exclude Falcon from the build.
[12 Sep 2008 20: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/54010

2816 Olav Sandstaa	2008-09-12
      Bug#39419 Falcon should not be compiled if compiler or options do not support exceptions
      
      Adds a check to configure that will verify that the compiler with the
      given compiler options will produce code that handles exceptions. This
      test is done by actually running a small program that throws and
      catches an exception. If this program does not work correctly, Falcon
      will not be included in the build.
      
      Note that the checks for determining the correct options for
      exceptions support had to be moved to an earlier place in configure.
[23 Nov 2008 22:02] 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/59642

2916 Olav Sandstaa	2008-11-23
      Bug#39419 Falcon should not be compiled if compiler or options do not support
      exceptions
            
      Adds a check to configure that verifies that the compiler with the
      given compiler options will produce code that handles C++ exceptions. This
      test is done by running a small program that throws an catches an exception.
      If this program does not work correctly, configure will exit will an error 
      message and needs to be re-run either with correct compiler options of with
      Falcon disabled.
      
      Adds a check to the Falcon source code that tests that GCC and Windows compilers are
      compiling with C++ exceptions enabled. This test will fail during compilation if the
      compiler is not running with C++ exceptions enabled.
[23 Nov 2008 22:07] Olav Sandstå
With the latest patch applied, configure will write the following if it detects that C++ exceptions are not supported and then exit:

.....
checking if compiler and compiler options support C++ exceptions for Falcon... no
Falcon must be compiled with support for C++ exceptions enabled.
Please adjust your compiler flags or disable support for Falcon (--without-plugin-falcon).
[25 Nov 2008 13:38] 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/59792

2916 Olav Sandstaa	2008-11-25
      Bug#39419 Falcon should not be compiled if compiler or options do not support
      exceptions
                  
      Adds a check to configure that verifies that the compiler with the
      given compiler options will produce code that handles C++ exceptions. This
      test is done by running a small program that throws an catches an exception.
      If this program does not work correctly, configure will exit will an error 
      message and needs to be re-run either with correct compiler options of with
      Falcon disabled.
            
      Adds a check to the Falcon source code that tests that GCC and Windows compilers are
      compiling with C++ exceptions enabled. This test will fail during compilation if the
      compiler is not running with C++ exceptions enabled.
[11 Dec 2008 14:19] Bugs System
Pushed into 6.0.9-alpha  (revid:olav@sun.com-20081125133806-xhofy5fhs2hkorw3) (version source revid:hky@sun.com-20081127084516-nbu7693932vcz2st) (pib:5)
[13 Dec 2008 10:00] MC Brown
A note has been added to the 6.0.9 changelog: 

Compiling MySQL with FALCON support enabled with a compiler that does not support exceptions would fail to complete successfully. configure has been updated to switch off FALCON support if the specified compiler does not support exceptions.