MINGW Notes
Last Update: June 4 2003
Author: Blas Rodriguez Somoza blas@puertareal.com
0.-Introduction
The MSYS/MINGW build was started with 1.5 beta 4.
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 means that 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
- Support for ms SEH (superserver).
- Executable size problem. The executables are too great.
- DLL entrypoint definition. The fbclient.dll have a lot of unneeded entrypoints.
- Installer definition.
2.-INSTALLING MSYS and MINGW
The following packages from http://www.mingw.org are needed
MinGW
- MinGW-3.1.0-1.exe
- bison-1.875.0-2003.02.10-1.exe
MSYS
- MSYS-1.0.9.exe
- msysDTK-1.0.1.exe
STEPS TO INSTALL
- run MinGW-3.1.0-1.exe. You must select the installation directory (default to c:\MINGW)
- run bison-1.875.0-2003.02.10-1.exe. You must give the program the mingw installation directory
- run MSYS-1.0.9.exe. First you must select your installation directory (default to c:\msys\1.0), then, in a command window, you must awswer some questions:
Do you wish to continue with the post install? [yn] ANSWER y
Do you have mingw installed? [yn] ANSWER y
Where is your mingw installation? ANSWER your mingw directory using slashes (as in unix) no backslashes (as in windows)
- run msysDTK-1.0.1.exe. You must the msys installation directory as the installation directory for msysDTK (default to c:\msys\1.0).
3.- PATCHES TO MINGW headers
There are an error in the gcc 3.2.3 headers delivered with MINGW.
You should edit /include/c++/3.2.3/cstdio and comment the following lines
using ::vsnprintf;
using __gnu_cxx::vsnprintf;
4.- BUILD PROCESS
- Start msys with the icon.
- Go to the firebird2 root directory. For instance, if your root is d:\cvs\firebird you must do cd /d/cvs/firebird2.
- 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.
- Make the build. For instance if you want to get compiler messages isolated from make log
make > make.log 2>comp.log
- After the build finish, the firebird directory with the binaries is created as gen/firebird.
- To make a clean build from scratch after making changes to the code use the clean.sh script
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
5.- TROUBLESHOOTING
AUTOGEN
The autogen script creates an output file in the same directory where it is executed with the name config.out. If the autogen fails look at config.out first.
Some permission problems, most probably related with the CVS client, has been reported. If the autogen gives a permission related error, like
autom4te: cannot open configure: Permission denied
execute in the same directory:
>chmod -R +uw *