MINGW Notes


Date: April 8 2003
Author: Blas Rodriguez Somoza blas@puertareal.com

0.-Introduction

The 1.5 beta 4 is the first available MSYS/MINGW build.

The only difference between the msvc build and the mingw build, is that the later one does not support the ms SEH exception handling. This is an important difference because some exceptions will not be catched and thus FB will abort, the sources using this exception handling are jrd/blob_filter.cpp, jrd/exe.cpp and jrd/fun.epp.

This port is maintained by Blas Rodriguez Somoza and Dmitry Sibiriakov.

1.-TODO

2.-INSTALLING MSYS and MINGW

The following packages from http://www.mingw.org are needed

MSYS

MinGW

STEPS

  1. Install minGW first and then the other mingw 3 packages
  2. Install MSYS
  3. Install msysDTK

3.- PATCHES TO BUILD FILES

4.- BUILD PROCESS

  1. Start msys with the icon.
  2. Go to the firebird2 root directory. For instance, if your root is d:\cvs\firebird you must do cd /d/cvs/firebird2.
  3. Start configure with the switches to get super/classic and production/development build, for instance:
    autogen.sh --enable-superserver
    The valid switches for autogen are
    --enable-superserver Select superserver build, default classic build.
    --enable-debug Select debug build, default production build.
  4. Make the build. For instance if you want to get compiler messages isolated from make log
    make > make.log 2>comp.log
  5. Depending on your configuration, you can get an error in the v5_examples target. This error is related with a failure in the lock mechanism. If you get this error you can finish the build using the make again. This error can be also avoided removing the v5_examples target from the builds/posix/Makefile.in.firebird, before you use the autogen.sh.
  6. After the build finish, the firebird directory with the binaries is created as gen/firebird.

BUILD NOTE:

There is a bug in mingw (3.2) related with msvc format for 64bit integers. When the I64 format is used, the compiler throws warnings of two types:

warning: [...] format, different type arg (arg 3)
or
warning: unknown conversion type character `I' in format
warning: too many arguments for format