1
0
mirror of https://github.com/sqlite/sqlite.git synced 2026-01-06 08:01:16 +03:00

Add the doc/compile-for-unix.md document.

FossilOrigin-Name: a3e16e478b03ccc12888eb5700c2e480a446957368f4b37ed322af2f4c9cd7c4
This commit is contained in:
drh
2024-10-11 19:33:22 +00:00
parent ea7ea76a59
commit 4dfc4dc2df
3 changed files with 66 additions and 7 deletions

58
doc/compile-for-unix.md Normal file
View File

@@ -0,0 +1,58 @@
# Notes On Compiling SQLite On All Kinds Of Unix
Here are step-by-step instructions on how to build SQLite from
canonical source on any modern machine that isn't Windows. These
notes are tested (on 2024-10-11) on Ubuntu and on MacOS, but they
are general and should work on most any modern unix platform.
1. Install a C-compiler. GCC or Clang both work fine. If you are
reading this document, you've probably already done that.
2. Install TCL9 development libraries. In this note, we'll do a
private install in the $HOME/local directory, but you can make
adjustments to install TCL9 wherever you like.
install the TCL development libraries in the "`c:\Tcl`" directory.
<p>
This document assumes you are working with <b>TCL version 9.0</b>.
<ol type="a">
<li>Get the TCL source archive, perhaps from
[https://www.tcl.tk/software/tcltk/download.html](https://www.tcl.tk/software/tcltk/download.html)
or [https://sqlite.org/tmp/tcl9.0.0.tar.gz](https://sqlite.org/tmp/tcl9.0.0.tar.gz)
<li>Untar the source archive. CD into the "unix/" subfolder
of the source tree.
<li>Run: `mkdir $HOME/local`
<li>Run: `./configure --prefix=$HOME/local`
<li>Run: `make install`
</ol>
4. Download the SQLite source tree and unpack it. CD into the
toplevel directory of the source tree.
5. Run: `./configure --enable-all --with-tclsh=$HOME/local/bin/tclsh9.0`
You do not need to use --with-tclsh if the tclsh you want to use is the
first one on your PATH.
6. Run the "`Makefile`" makefile with an appropriate target.
Examples:
<ul>
<li> `make sqlite3.c`
<li> `make sqlite3`
<li> `make sqldiff`
<li> `make sqlite3-rsync`
<li> `make tclextension-install`
<li> `make devtest`
<li> `make releasetest`
<li> `make sqlite3_analyzer`
</ul>
It is not required that you run the "tclextension-install" target prior to
running tests. However, the tests will run more smoothly if you do.
The version of SQLite used for the TCL extension does *not* need to
correspond to the version of SQLite under test. So you can install the
SQLite TCL extension once, and then use it to test many different versions
of SQLite.
7. For a debugging build of the CLI, where the ".treetrace" and ".wheretrace"
commands work, add the the --enable-debug argument to configure.

View File

@@ -1,5 +1,5 @@
C Avoid\sa\ssegfault\swhen\scalling\ssrc-verify\swithout\sany\sarguments.
D 2024-10-11T19:22:32.233
C Add\sthe\sdoc/compile-for-unix.md\sdocument.
D 2024-10-11T19:33:22.928
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@@ -39,6 +39,7 @@ F configure 135e050689ea244477582e6d77cc7867dfcfe6e0f82e3eab3e47655a67035f8f x
F configure.ac aca8ebf47b7644c473e11e599ea986eeb23860a8732a8812039ad961ef52a713
F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad
F doc/F2FS.txt c1d4a0ae9711cfe0e1d8b019d154f1c29e0d3abfe820787ba1e9ed7691160fcd
F doc/compile-for-unix.md 37a3a7cfe32ed74b15d099f56e583f9e9df37b7109a8df880ff5e725424f8f17
F doc/compile-for-windows.md 8e00693196087e3564a9a2bce642fa39febc1c901212832fbe0637681dada3db
F doc/json-enhancements.md e356fc834781f1f1aa22ee300027a270b2c960122468499bf347bb123ce1ea4f
F doc/jsonb.md 5fab4b8613aa9153fbeb6259297bd4697988af8b3d23900deba588fa7841456b
@@ -2216,8 +2217,8 @@ F vsixtest/vsixtest.tcl 6195aba1f12a5e10efc2b8c0009532167be5e301abe5b31385638080
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P de9663c0aae92e457ddda48b751b32f205bfab29f60b055571e5f69b41ffd584
R 9bd2bb9818dfd0677d48239709bdf115
U stephan
Z cd2bcf638ae2cec928818c120f6c2ee2
P c0c4e6f111b9b16538aad33e83f02f8d7835e952649f5cee610c068722bea4a4
R df2e0da3465ed81f9803a54efe976008
U drh
Z d3c0161590f1e87174d191e4d2fda132
# Remove this line to create a well-formed Fossil manifest.

View File

@@ -1 +1 @@
c0c4e6f111b9b16538aad33e83f02f8d7835e952649f5cee610c068722bea4a4
a3e16e478b03ccc12888eb5700c2e480a446957368f4b37ed322af2f4c9cd7c4