Matthias Watermann wrote:
On Fri, 06 Aug 2004 12:24:46 -0500, Corwin Burgess wrote:
Has any Linux user compile the sqlite
library with threadsafe defined?
I used the following shell script with 2.8.13. The important step is the 'sed' call to modify the Makefile before actually running 'make'.
--------------------------------------------------------------------- #!/bin/sh
cd sqlite || exit 1 if [ -s Makefile.in ] ; then # clean up to get a fresh compile [ -s Makefile ] && make clean
# we want the apps using sqlite to link it statically to avoid # messing around with additional *.so libraries at runtime: ./configure \ --mandir=/usr/share/man \ --enable-shared=NO --disable-shared \ --enable-static=YES \ --enable-threads=POSIX \ --enable-tempdb-in-ram | \ tee config.$(date +'%Y%m%d-%h%M%s')
# unfortunately with Linux we've to use 'sed' to compile 'sqlite' # threadsafe and w/o DEBUGging overhead, and the binary 'stripped': sed -e 's#^TCC = \([A-Za-z]*\) #TCC = \1 -DTHREADSAFE=1 -DNDEBUG=1 #g' \ -e 's#^LIBREADLINE = \([A-Za-z]*\)#LIBREADLINE = \1 -s #g' \ Makefile > Makefile.tmp [ -s Makefile.tmp ] && mv -f Makefile.tmp Makefile
# intentionally missing 'e': the 'mak' sh-script simply pipes the .. mak # .. output of 'make' through 'tee' to produce a logfile
# finally create and tidy up HTML documentation make doc for f in doc/*html; do tidy -cmiq $f ; done (cd doc ; ln -sf ../www/a*gif .) # another missing' in the Makefile fi #_EoF_ ---------------------------------------------------------------------
Hih!
Thanks for the script example. When I run it I notice two errors.
I used this directory structure:
/sqlite-thread-library make-sqlite # your script /sqlite # the extracted source
[EMAIL PROTECTED] sqlite-thread-library]$ sh make-sqlite
looks ok until line 26
make-sqlite: line 26: mak: command not found
mak # .. output of 'make' through 'tee' to produce a logfile
looks ok until line 30
make-sqlite: line 30: tidy: command not found
I believe this is fixed as I downloaded tidy and put it in /usr/bin/ and now have a bunch of html documents.
If I was suppose to get a libsqlite.so prior to line 26 I can't find it. Can you tell me what the fix is for the 'mak' error and where I will find libsqlite.so when it compiles?
Corwin