Remove the obsolete documentation on how to crosscompile version 1.0 of

SQLite. (CVS 888)

FossilOrigin-Name: ac0622bf5fca9c8907319a20158e991efdaa6402
This commit is contained in:
drh 2003-03-30 18:58:58 +00:00
parent 1dd8c40e8f
commit 9077ba8ee5
6 changed files with 11 additions and 213 deletions

View File

@ -321,9 +321,6 @@ arch.png: $(TOP)/www/arch.png
opcode.html: $(TOP)/www/opcode.tcl $(TOP)/src/vdbe.c
tclsh $(TOP)/www/opcode.tcl $(TOP)/src/vdbe.c >opcode.html
crosscompile.html: $(TOP)/www/crosscompile.tcl
tclsh $(TOP)/www/crosscompile.tcl >crosscompile.html
mingw.html: $(TOP)/www/mingw.tcl
tclsh $(TOP)/www/mingw.tcl >mingw.html
@ -373,7 +370,6 @@ DOC = \
arch.png \
vdbe.html \
c_interface.html \
crosscompile.html \
mingw.html \
tclsqlite.html \
download.html \

View File

@ -310,9 +310,6 @@ arch.png: $(TOP)/www/arch.png
opcode.html: $(TOP)/www/opcode.tcl $(TOP)/src/vdbe.c
tclsh $(TOP)/www/opcode.tcl $(TOP)/src/vdbe.c >opcode.html
crosscompile.html: $(TOP)/www/crosscompile.tcl
tclsh $(TOP)/www/crosscompile.tcl >crosscompile.html
mingw.html: $(TOP)/www/mingw.tcl
tclsh $(TOP)/www/mingw.tcl >mingw.html
@ -362,7 +359,6 @@ DOC = \
arch.png \
vdbe.html \
c_interface.html \
crosscompile.html \
mingw.html \
tclsqlite.html \
download.html \

View File

@ -1,6 +1,6 @@
C Detect\swhen\sa\schild\snode\sof\sa\sbtree\spage\shas\szero\sentries\sand\sreport\sthat\nas\sa\scase\sof\sdatabase\scorruption.\s(CVS\s887)
D 2003-03-30T18:41:22
F Makefile.in 6917c2149a586f11b47c428f2ba748eb1da04f69
C Remove\sthe\sobsolete\sdocumentation\son\show\sto\scrosscompile\sversion\s1.0\sof\nSQLite.\s(CVS\s888)
D 2003-03-30T18:58:58
F Makefile.in 3c4ba24253e61c954d67adbbb4245e7117c5357e
F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
F VERSION e5b03976c56deafa24511d6ef17d64a28679e9bd
@ -14,7 +14,7 @@ F doc/report1.txt a031aaf37b185e4fa540223cb516d3bccec7eeac
F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895
F libtool bbbea7d79c23323e4100103836028e4fad0d9242
F ltmain.sh abfb9387049fff6996afc6e325736597795baf11
F main.mk 8b10c5df8a21cdd343986a90c75247bafaebb3aa
F main.mk 23b24112064bd14656a540abf1699a98ecdd9851
F publish.sh 86b5e8535830a2588f62ce1d5d1ef00e1dede23a
F spec.template 238f7db425a78dc1bb7682e56e3834c7270a3f5e
F sqlite.1 83f4a9d37bdf2b7ef079a82d54eaf2e3509ee6ea
@ -138,7 +138,6 @@ F www/audit.tcl 90e09d580f79c7efec0c7d6f447b7ec5c2dce5c0
F www/c_interface.tcl 5b54a6f65b70b02da2f6df4f8a23a4b10032e89e
F www/changes.tcl 7eb04deffbe116cdb558443f8f7df74ebd021daa
F www/conflict.tcl 81dd21f9a679e60aae049e9dd8ab53d59570cda2
F www/crosscompile.tcl 3622ebbe518927a3854a12de51344673eb2dd060
F www/datatypes.tcl 0cb28565580554fa7e03e8fcb303e87ce57757ae
F www/download.tcl 0932d7f4f0e8b2adbbd22fac73132f86e43ab4a9
F www/dynload.tcl 02eb8273aa78cfa9070dd4501dca937fb22b466c
@ -147,7 +146,7 @@ F www/fileformat.tcl d9b586416c0d099b82e02e469d532c9372f98f3f
F www/formatchng.tcl cbaf0f410096c71f86a7537cf9249fa04b9a659c
F www/index.tcl b155eba45136d19e7aa6ba979d4093180c335cf7
F www/lang.tcl 9bd9380dceba83d11fe268e0142c05ee06c757db
F www/mingw.tcl f1c7c0a7f53387dd9bb4f8c7e8571b7561510ebc
F www/mingw.tcl d96b451568c5d28545fefe0c80bee3431c73f69c
F www/nulls.tcl 29497dac2bc5b437aa7e2e94577dad4d8933ed26
F www/omitted.tcl 118062f40a203fcb88b8d68ef1d7c0073ac191ec
F www/opcode.tcl 33c5f2061a05c5d227c72b84c080b3bf74c74f8b
@ -156,7 +155,7 @@ F www/speed.tcl cb4c10a722614aea76d2c51f32ee43400d5951be
F www/sqlite.tcl ae3dcfb077e53833b59d4fcc94d8a12c50a44098
F www/tclsqlite.tcl 1db15abeb446aad0caf0b95b8b9579720e4ea331
F www/vdbe.tcl 2013852c27a02a091d39a766bc87cff329f21218
P b90d9de32d10a71fe81f5bfd0cf57faae8c5c3b4
R 2edd0e7412987cbf5566b47c204bebb0
P 66c80ae232a78ecb010280ab1aa684cb78b0662f
R 208f37d602235a28fca3e23d11ba2cbf
U drh
Z 4b34ca6a145e046d4b78a760de2492ba
Z 125b0a7be77e859c6623ad865623b75e

View File

@ -1 +1 @@
66c80ae232a78ecb010280ab1aa684cb78b0662f
ac0622bf5fca9c8907319a20158e991efdaa6402

View File

@ -1,193 +0,0 @@
#
# Run this Tcl script to generate the crosscompile.html file.
#
set rcsid {$Id: crosscompile.tcl,v 1.5 2001/11/24 13:23:05 drh Exp $}
puts {<html>
<head>
<title>Notes On How To Compile SQLite Using The MinGW Cross-Compiler</title>
</head>
<body bgcolor=white>
<h1 align=center>
Notes On How To Compile SQLite Using The MinGW Cross-Compiler
</h1>}
puts "<p align=center>
(This page was last modified on [lrange $rcsid 3 4] UTC)
</p>"
puts {
<p><a href="http://www.mingw.org/">MinGW</a> or
<a href="http://www.mingw.org/">Minimalist GNU For Windows</a>
is a version of the popular GCC compiler that builds Win95/Win98/WinNT
binaries. See the website for details.</p>
<p>This page describes how you can use MinGW configured as a
cross-compiler running under RedHat 6.0 Linux to generate a
binary for SQLite that runs under WinNT.
Some additional steps (described <a href="#win95">below</a>)
are needed to target Win95/98.</p>
}
proc Code {body} {
puts {<blockquote><pre>}
regsub -all {&} [string trim $body] {\&amp;} body
regsub -all {>} $body {\&gt;} body
regsub -all {<} $body {\&lt;} body
regsub -all {\(\(\(} $body {<font color="#00671f"><u>} body
regsub -all {\)\)\)} $body {</u></font>} body
puts $body
puts {</pre></blockquote>}
}
puts {
<p>Here are the steps:</p>
<ol>
<li>
<p>Get a copy of the MinGW compiler and all
its associated tools that run under Linux. No binary versions of
MinGW in this configuration are available for net downloads, as far
as I know. You will probably have to download the source code and
compile it all yourself.
A <a href="mingw.html">separate bulletin</a> describes how this
can be done.
When you are done, make sure the compiler and all its associated tools
are located somewhere on your PATH environment variable.
</p>
</li>
<li>
<p>
Download the Win32 port of GDBM from <a href="http://www.roth.net/libs/gdbm/">
Roth Consulting</a>. You can FTP a ZIP archive of the sources directly
from <a href="ftp://ftp.roth.net/pub/ntperl/gdbm/source/Win32_GDBM_Source.zip">
ftp://ftp.roth.net/pub/ntperl/gdbm/source/Win32_GDBM_Source.zip</a>.
</p>
</li>
<li>
<p>Make a directory and unpack the Win32 port of GDBM.</p>
<blockquote><pre>
mkdir roth
cd roth
unzip ../Win32_GDBM_Source.zip
</pre></blockquote>
</li>
<li>
<p>Manually build the GDBM library as follows:</p>
<blockquote><pre>
i386-mingw32-gcc -DWIN32=1 -O2 -c *.c
i386-mingw32-ar cr libgdbm.a *.o
i386-mingw32-ranlib libgdbm.a
cd ..
</pre></blockquote>
</li>
<li>
<p>
Download the SQLite tarball from
<a href="http://www.hwaci.com/sw/sqlite/sqlite.tar.gz">
http://www.hwaci.com/sw/sqlite/sqlite.tar.gz</a>.
Unpack the tarball and create a separate directory in which
to build the executable and library.
</p>
<blockquote><pre>
tar xzf sqlite.tar.gz
mkdir sqlite-bld
cd sqlite-bld
</pre></blockquote>
</li>
<li>
<p>
Create a "hints" file that will tell the SQLite configuration script
to use the MinGW cross-compiler rather than the native linux compiler.
The hints file should looks something like this:</p>
<blockquote><pre>
cat >mingw.hints <<\END
config_TARGET_CC=i386-mingw32-gcc
config_TARGET_CFLAGS='-O2'
config_TARGET_GDBM_LIBS=../roth/libgdbm.a
config_TARGET_GDBM_INC=-I../roth
config_TARGET_AR='i386-mingw32-ar cr'
config_TARGET_RANLIB=i386-mingw32-ranlib
config_TARGET_EXEEXT='.exe'
END
</pre></blockquote>
</li>
<li>
<p>Configure and build SQLite:</p>
<blockquote><pre>
../sqlite/configure --with-hints=./mingw.hints
make
</pre></blockquote>
</li>
</ol>
<a name="win95">
<h2>Targetting Windows95/98 instead of WindowsNT</h2>
<p>A small amount of additional work is needed to get SQLite running
under Windows95/98. The first problem is that the LockFile() and
UnlockFile() API that the Roth GDBM port uses does not work under
Windows95. The easiest workaround is to just disable file locking
in the GDBM library. You can do so by appending a few lines of code
to the end of one of the GDBM source files and compiling the library
using a special command-line option. Replace step (4) above as
follows:</p>
<ol>
<li value="4"><p>
Append text to the <b>systems.h</b> source file as follows:</p>
<blockquote><pre>
cat &gt;&gt;systems.h &lt;&lt;\END
#ifdef NO_LOCKS
#undef UNLOCK_FILE
#define UNLOCK_FILE(x)
#undef READLOCK_FILE
#define READLOCK_FILE(x) lock_val=0;
#undef WRITELOCK_FILE
#define WRITELOCK_FILE(x) lock_val=0;
#endif
END
</pre></blockquote>
<p>Then manually build the GDBM library with the extra
"NO_LOCKS" define as follows:</p>
<blockquote><pre>
i386-mingw32-gcc -DWIN32=1 -DNO_LOCKS -O2 -c *.c
i386-mingw32-ar cr libgdbm.a *.o
i386-mingw32-ranlib libgdbm.a
cd ..
</pre></blockquote>
</p></li>
</ol>
<p>Note that the locking problem has been reported and may actually
be fixed in the Roth GDBM distribution by the time you read this.
You should probably check before you make the above changes.</p>
<p>The above is all you have to do to get SQLite to work on Windows95.
But one more step is required to get it to work <i>well</i>. It
turns out that SQLite make heavy use of <b>malloc()</b> and
<b>free()</b> and the implementation of this functions
on Windows95 is particular poor. Large database queries will run
more than 10 times faster if you substitute a better memory allocator
such as the one by
<a href="http://g.oswego.edu/dl/html/malloc.html">Doug Lea</a>.
A copy of Doug's allocator is included in the <b>contrib</b>
directory of the source tree. Speed improvements are also reported
on WindowsNT when alternative memory allocators are used, though
the speedup is not as dramatic as it is with WIndows95.</p>
}
puts {
<p><hr /></p>
<p><a href="index.html"><img src="/goback.jpg" border=0 />
Back to the SQLite Home Page</a>
</p>
</body></html>}

View File

@ -1,7 +1,7 @@
#
# Run this Tcl script to generate the crosscompile.html file.
# Run this Tcl script to generate the mingw.html file.
#
set rcsid {$Id: mingw.tcl,v 1.3 2001/11/24 13:23:05 drh Exp $}
set rcsid {$Id: mingw.tcl,v 1.4 2003/03/30 18:58:58 drh Exp $}
puts {<html>
<head>