[sqlite] How do I get sources for previous versions?

2007-07-04 Thread Makavy, Erez (Erez)
Hi,
 
How do I get sources for previous versions? such as 3.3.4.
 
Thanks,
Erez.


[sqlite] compiling sqlite-3.4.0: undefined reference to `dlclose'

2007-07-03 Thread Makavy, Erez (Erez)
Hi,
 
The problem:
==
When cross-compiling sqlite-3.4.0, I encounter this linkage error:
 
./.libs/libsqlite3.so: undefined reference to `dlclose'
./.libs/libsqlite3.so: undefined reference to `dlopen'
./.libs/libsqlite3.so: undefined reference to `dlsym'
 
The solution:
===
I added in Makefile.in the "-ldl" at the end of the line.

sqlite3$(TEXE): $(TOP)/src/shell.c libsqlite3.la sqlite3.h
$(LTLINK) $(READLINE_FLAGS) $(LIBPTHREAD) \
-o $@ $(TOP)/src/shell.c libsqlite3.la \
$(LIBREADLINE) $(TLIBS) -ldl


It seems to fix the problem, but I'm sure this is not the appropriate
way.
 
The question:
==
Any idea what a propper solution would be?
 
 
More details:
=
I'm compiling on Linux, for target PPC.
 
The full compilation line (before the fix) is:

/home/lira/toolchain/gnu/3.4.4-wrlinux-1.2/x86-linux2/bin/powerpc-wrs-li
nux-gnu-powerpc-gpp-gcc
 -O3
 -mcpu=603e
 -mtune=603e
 -mfull-toc
 -mcall-linux
 -fomit-frame-pointer
 -funroll-loops
 -DOS_UNIX=1
 -DHAVE_USLEEP=1
 -I.
 -I./src
 -I/export/target/root/usr/local/include
 -DHAVE_READLINE=0
 -o .libs/sqlite3
 ./src/shell.c
 -L/export/target/root/usr/local/lib
 -L/home/cfi/export_for_linkage/target/root/lib
 -L/home/cfi/export_for_linkage/target/root/usr/lib
 -L/home/cfi/export_for_linkage/target/root/usr/local/lib
 ./.libs/libsqlite3.so
 -lpthread
 -Wl,--rpath
 -Wl,/usr/local/lib

My configure command is:
--
./configure
'--build=i686-linux' \
--host=powerpc-wrs-linux-gnu \
--prefix=/usr/local \
'--disable-tcl' \
'--disable-debug' \
'--with-gnu-ld' \
'--enable-threadsafe' \
'--enable-releasemode' \
--disable-static

 
 
Thanks,
Erez


RE: [sqlite] new cross-compiling logic - how do I set build/target copmilers?

2007-07-03 Thread Makavy, Erez (Erez)
I managed with a 3rd Method:

I use the CC variable to specify my cross-compiler,
and the BUILD_CC variable to specify my build-compiler (The compiler of
the host machine that does the build)

Thanks anyway,
Erez.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 03, 2007 5:48 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] new cross-compiling logic - how do I set
build/target copmilers?

"Makavy, Erez (Erez)" <[EMAIL PROTECTED]> wrote:
> I'm trying to cross-compile sqlite 3.4.0, and I see that the 
> cross-compile  logic (in configure)  was changed since 3.3.14 .
>  
> Previously I used the environment variable config_BUILD_CC and 
> config_TARGET_CC to set the build/target compilers.
>  
> How do I now set the build/target compilers?
>  

Method 1:

  *  Run: "make target_source"
  *  Copy all the source code files in the "tsrc" subdirectory
 into a directory where your cross-compiler can find them.
  *  Omit the following files:
 +  shell.c
 +  tclsqlite.c
 +  icu.c
 +  fts*
  *  Compile everything that is left into a static library
 using your cross-compiler.

Method 2:

  *  Run: "make sqlite3.c"
  *  Compile the single source file "sqlite3.c" using your
 cross-compiler.

--
D. Richard Hipp <[EMAIL PROTECTED]>



-
To unsubscribe, send email to [EMAIL PROTECTED]

-

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] new cross-compiling logic - how do I set build/target copmilers?

2007-07-03 Thread Makavy, Erez (Erez)
I'm trying to cross-compile sqlite 3.4.0,
and I see that the cross-compile  logic (in configure)  was changed
since 3.3.14 .
 
Previously I used the environment variable config_BUILD_CC and
config_TARGET_CC to set the build/target compilers.
 
How do I now set the build/target compilers?
 
Thanks,
Erez.


[sqlite] Performance problem with simple queries

2007-02-12 Thread Makavy, Erez \(Erez\)
Problem summery:
---
Simple queries sometimes take ~400 ms
 
Analysis:
---
- A php script runs the same SQL query several times in different places
(in different transactions).
Some of the queries take around 400ms while the others (identical
queries) takes only 4-20ms.
(The timings are consistent for the same php script.)
 
- Testing showed that when adding multiple identical queries after a
"problematic" query run very fast, I.e.: ...
 
- time measurement is done with explode(' ', microtime());
 
Test script:
---
A Test script shows that the first query take long time, but the others
are quick.
It happens also not in the first query, but we don't have a simple test
script that reproduces that yet.
 
Script output:
DB is sqlite:/usr/local/web/443/lbaProvDBoneOpenTest:
 0.66058707 SELECT * FROM MediaGateway
 0.00106287 SELECT * FROM MediaGateway
 0.00017715 SELECT * FROM MediaGateway
 0.12085819 SELECT * FROM GeneralPlatformProperties
 0.00016093 SELECT * FROM GeneralPlatformProperties WHERE 1
 0.0649929 SELECT * FROM ClassOfRestriction WHERE id IS NULL
 0.05895591 SELECT * FROM ClassOfRestriction
 0.05869102 SELECT * From BriefHuntGroupList ORDER BY huntGroupName
COLLATE NOCASE
Second run:
 0.04814911 SELECT * FROM MediaGateway
 0.00015306 SELECT * FROM MediaGateway
 0.00019789 SELECT * FROM MediaGateway
 0.00516605 SELECT * FROM GeneralPlatformProperties
 0.000175 SELECT * FROM GeneralPlatformProperties WHERE 1
 0.02837396 SELECT * FROM ClassOfRestriction WHERE id IS NULL
 0.00037098 SELECT * FROM ClassOfRestriction
 0.05728984 SELECT * From BriefHuntGroupList ORDER BY huntGroupName
COLLATE NOCASE

Questrions:
---
 
What can explain the long procces time for the first query?
What can explain log proccessing time for queries whic are not the first
?
 
Thanks,
Erez.