Re: [sqlite] Compiling Linux SQLite with thread safe

2004-08-10 Thread Matthias Watermann
On Mon, 09 Aug 2004 14:42:32 -0500, Corwin Burgess wrote:

> 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.

 OK, but this is _not_ required by or for sqlite. I just happen to like
 the webpages on my disk well formed ;-)

> 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

 Fix: just append an 'e' (i.e. 'make'). As the comment says 'mak' is just
 a little shell script writing the 'make' output to a file. So only now
 (i.e. when running 'make' sucessfully) you'll get the compiled files.

> where I will find libsqlite.so when it compiles?

 That depends on your configure settings. If you're using the ones in the
 script, there won't be any '.so' files since I explicitely DISabled them
 (as you can see in the 'configure' call and the comments); so you'll only
 get

/usr/local/lib/libsqlite.la
/usr/local/lib/libsqlite.a

 If you really want to use shared libraries with sqlite, just modify the
 'configure' call accordingly: remove the '--disable-shared' option and
 change '--enable-shared=' from NO to YES.


-- 
Matthias



Re: Re: [sqlite] Compiling Linux SQLite with thread safe

2004-08-09 Thread surj70

> hi, the directory .libs is hidden, and you can use ls .libs find it.
> 
> 

---
马上到http://www.126.com申请260M全国最大免费邮箱;!
提供新邮件到达手机短信提醒功能, 随时掌握邮件信息!


Re: [sqlite] Compiling Linux SQLite with thread safe

2004-08-09 Thread Corwin Burgess
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


Re: [sqlite] Compiling Linux SQLite with thread safe

2004-08-09 Thread Matthias Watermann
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!

-- 
Matthias



Re: [sqlite] Compiling Linux SQLite with thread safe

2004-08-06 Thread Corwin Burgess
Corwin Burgess wrote:
I'm looking for some help in compiling a Linux version of SQLite 
v2.8.15 that is thread safe capable.

Corwin
Ignore my previous message using zip file. I used the Makefile.linux.gcc 
to compile the source files in sqlite-source-2.8.15.tar.gz from Fedora 
Core 1.  I modified the Makefile to add threadsafe and removed tcl 
capability. When I ran 'make' from the /bld directory I had no errors 
but this also didn't create either the './lib' directory or the sqlite 
library. In the /bld directory I have the 'sqlite' executable and 
'libsqlite.a' ar archive files. How do I create the sqlite library using 
these source files and Makefile? Has any Linux user compile the sqlite 
library with threadsafe defined?

Corwin


Re: [sqlite] Compiling Linux SQLite with thread safe

2004-08-06 Thread Corwin Burgess
Corwin Burgess wrote:
I'm looking for some help in compiling a Linux version of SQLite 
v2.8.15 that is thread safe capable.

Corwin
I've decided to compile a Linux sqlite library using the 
sqlite-source-2_8_15.zip file with the Fedora Core 1 distro. I created 
the following directory structure for this purpose.

/sqlite-source
 /bld
   Makefile
 /sqlite
   main.mk
   VERSION
   /src
 source files from sqlite-source-2_8_15.zip
 sqlite.in.h
 parse.y
   /tool
I used the Makefile.Linux-gcc file, modified it to add threadsafe and 
removed tcl capability. I ran 'make' from the /bld directory and each 
time I had an error I added the missing file or directory. With the 
above changes I had no errors but this didn't create the './lib' 
directory or sqlite library. In the /bld directory I have the 'sqlite' 
executable and 'libsqlite.a' ar archive files. What did I fail to do to 
create the sqlite library?

Corwin