8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 20:03:02 +01:00
firebird-mirror/doc/README.build.mingw.html
2003-11-18 03:21:16 +00:00

106 lines
4.9 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY>
<H2>MINGW Notes</H2>
<hr/>
First version: Mar 6 2003<br>
Last Update: Nov 18 2003<br>
Author: Blas Rodriguez Somoza <a href="">blas@puertareal.com</a><br>
<h3>0.-Introduction</h3>
<p>The MSYS/MINGW build was started with 1.5 beta 4.<p>
<p>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.</p>
<p>This port is maintained by Blas Rodriguez Somoza and Dmitry Sibiriakov.</p>
<h3>1.-TODO</h3>
<ul>
<li>Support for ms SEH (superserver).</li>
<li>Executable size problem. The executables are too great.</li>
<li>DLL entrypoint definition. The fbclient.dll have a lot of unneeded entrypoints.</li>
</ul>
<h3>2.-INSTALLING MSYS and MINGW</h3>
<p>The following packages from http://www.mingw.org are needed</p>
<p>MinGW
<ul>
<li>MinGW-3.1.0-1.exe</li>
<li>bison-1.875.0-2003.02.10-1.exe</li>
</ul>
</p>
<p>MSYS
<ul>
<li>MSYS-1.0.9.exe</li>
<li>msysDTK-1.0.1.exe</li>
</ul>
</p>
<p>STEPS TO INSTALL
<ol>
<li>run MinGW-3.1.0-1.exe. You must select the installation directory (default to c:\MINGW)</li>
<li>run bison-1.875.0-2003.02.10-1.exe. You must give the program the mingw installation directory </li>
<li>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:<br><br>
Do you wish to continue with the post install? [yn] ANSWER y<br>
Do you have mingw installed? [yn] ANSWER y<br>
Where is your mingw installation? ANSWER your mingw directory using slashes (as in unix) no backslashes (as in windows)<br><br>
</li>
<li>run msysDTK-1.0.1.exe. You must the msys installation directory as the installation directory for msysDTK (default to c:\msys\1.0).</li>
</ol>
</p>
<h3>3.- BUILD PROCESS</h3>
<ol>
<li>Start msys with the icon.</li>
<li>Go to the firebird2 root directory. For instance, if your root is d:\cvs\firebird you must do cd /d/cvs/firebird2.</li>
<li>Start configure with the switches to get super/classic and production/development build, for instance:<br>
autogen.sh --enable-superserver<br>
The valid switches for autogen are<br>
--enable-superserver Select superserver build, default classic build.<br>
--enable-debug Select debug build, default production build.<br>
</li>
<li>Make the build. For instance if you want to get compiler messages isolated from make log<br> make > make.log 2>comp.log</li>
<li>After the build finish, the firebird directory with the binaries is created as gen/firebird.</li>
</ol>
<ul>
<li>To make a clean build from scratch after making changes to the code use the clean.sh script</li>
</ul>
<p>BUILD NOTE:</p>
<p>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:</p>
<p>warning: [...] format, different type arg (arg 3)<br>
or<br>
warning: unknown conversion type character `I' in format<br>
warning: too many arguments for format</p>
<h3>4.- INSTALL.</h3>
<p>To create an installable build you need to do it in two steps, first prepare the output directory and then run the msvc BuildExecutableInstall.bat</p>
<p>First change to builds/install/arch-specific/mingw directory and run<p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;./prepare_mingw.sh</p>
<p>After the script finish you need to open a dos window and cd to the builds/install/arch-specific/win32 directory under the firebird sources root.</p>
<p>The batch to build the installer is<p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;BuildExecutableInstall.bat [DEBUG] [CS]</p>
<p>Where DEBUG means if the build is a debug one or not and CS means classic server installer.</li>
<p>After you start the batch, you will get a InnoSetup window. To build the install exe select the option compile. The installer will be located in builds/win32/install_image.</p>
<p>To install the build, simply run the resulting exe and <b>copy MINGWM10.DLL file to the bin directory</b> in the firebird install directory</b></p>
<h3>5.- TROUBLESHOOTING</h3>
<p>AUTOGEN<p>
<p>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.</p>
<p>Some permission problems, most probably related with the CVS client, has been reported. If the autogen gives a permission related error, like<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;autom4te: cannot open configure: Permission denied<br><br>
execute in the same directory:<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;>chmod -R +uw *</p>
</BODY>
</HTML>