MINGW Notes
Date: March 06 2003
Author: Blas Rodriguez Somoza
0.-Introduction
This is the first available MSYS/MINGW and there are still some thinks to be solved,
some in mingw libraries some in the FB sources and some in the building process.
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.
1.-TODO
- Add rc files to the build of fbserver, fb_inet_server and ibguard (with windres).
- Solve create_db and gbak_static breaks.
- Support for ms SEH, now _try is a no-op.
2.-INSTALLING MSYS and MINGW
The following packages from http://www.mingw.org are needed
MSYS
- MSYS-1.0.8.exe
- msysDTK-1.0.1.exe
MinGW
- MinGW-2.0.0-3.exe
- MinGW_win32api-2.1.tar.gz
- mingw-runtime-2.3.tar.gz
STEPS
- Install minGW with the exe package
- Install MSYS
- Install msysDTK
PATCHES TO BUILD FILES AND MINGW HEADERS
- The MSYS environment can't process yacc files as delivered, it is necessary to comment out yacc
in 'make.shared.targets'
- The example target in Make.in.firebird is not valid remove it.
- The fb_util target in Make.in.extlib is not valid remove it.
- In the Makefile.in.libfbembed three lines should be changed because it don't work as expected in msys
Change
$(LIB_LINK) [......................] -o $@ $^
-$(LN) $(@F) $(LIBFBEMBED_SOBASENAME)
-$(LN) $(notdir $(LIBFBEMBED_SOBASENAME)) $(LIBFBEMBED_SONAME)
to
$(LIB_LINK) [......................] -o $@ $^ $(LINK_LIBS)
-$(LN) $(LIBFBEMBED_SO) $(LIBFBEMBED_SOBASENAME)
-$(LN) $(LIBFBEMBED_SOBASENAME) $(LIBFBEMBED_SONAME)
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
autogen.sh --enable-superserver
- Make the build. For instance
make > make.log 2>&1
- There are some problems in the build and the make process stop five times with errors
before the process is complete, but it can be more if there are some stackdump.
Also there are sometimes when the g++ hang and then g++ and make must be killed in the
windows task manager.
Known failures when building in their order
- A.- failure create_db
- B.- failure gbak_static
- C.- failure gbak_static
- D.- failure gbak_static
- E.- failure gbak_static