Re: [sqlite] Re: sqlite3 shell doesn't install correctly

2007-04-22 Thread Ulrich Schöbel
On Sunday 22 April 2007 18:01, Joe Wilson wrote:
> > I've used SQLite-3.3.4 for quite a while, mostly the Tcl binding.
> > A few days ago I installed 3.3.15 and the Tcl binding worked fine.
> > Tonight I downloaded 3.3.16 and compiled it without any errors
> > or warnings and then installed it. When I tried to execute sqlite3
> > the following error appered:
> >
> > sqlite3: symbol lookup error: sqlite3: undefined symbol: sqlite3_io_trace
> >
> > I switched back to 3.3.15 with the same result. A switch back to
> > 3.3.4 behaved normal.
> >
> > What's wrong with 3.3.15 and 3.3.16?
>
> Okay, I get it now. You seem to be using a 3.3.15 sqlite3 binary requiring
> the shared library sqlite3.so. This 3.3.15 sqlite3 binary's shell.c makes
> reference to sqlite3_io_trace in the 3.3.15 sqlite3.so's main.c.
> You cannot use an older 3.3.4 sqlite3.so against the 3.3.15 sqlite3 binary
> because the older shared library lacks sqlite3_io_trace.
>
> In general, sqlite3.so is backwards compatible, but not necessarily
> forward compatible. So you can upgrade an older binary to use a more
> recent 3.x sqlite3.so release, but not the other way around.
>
More or less, yes. I had 3.3.4 and wanted to upgrade to 3.3.16.
The sqlite3 binary then came up with that "sqlite3_io_trace" error.
After I applied your patch it ran fine, but then I noticed the 3.3.4
version info on startup. After all, it was just a ldconfig issue, now
everything works as it should.

Thanks again for your help.

Ulrich

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



Re: [sqlite] Re: sqlite3 shell doesn't install correctly

2007-04-22 Thread Joe Wilson
--- Joe Wilson <[EMAIL PROTECTED]> wrote:
> In general, sqlite3.so is backwards compatible, but not necessarily 
> forward compatible. So you can upgrade an older binary to use a more 
> recent 3.x sqlite3.so release, but not the other way around.

I meant to to say:

 In general, sqlite3.so is forward compatible, but not necessarily 
 backwards compatible. So you can upgrade an older binary to use a more 
 recent 3.x sqlite3.so release, but not the other way around.


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



[sqlite] Re: sqlite3 shell doesn't install correctly

2007-04-22 Thread Joe Wilson
> I've used SQLite-3.3.4 for quite a while, mostly the Tcl binding.
> A few days ago I installed 3.3.15 and the Tcl binding worked fine.
> Tonight I downloaded 3.3.16 and compiled it without any errors
> or warnings and then installed it. When I tried to execute sqlite3
> the following error appered:
> 
> sqlite3: symbol lookup error: sqlite3: undefined symbol: sqlite3_io_trace
> 
> I switched back to 3.3.15 with the same result. A switch back to
> 3.3.4 behaved normal.
> 
> What's wrong with 3.3.15 and 3.3.16?

Okay, I get it now. You seem to be using a 3.3.15 sqlite3 binary requiring
the shared library sqlite3.so. This 3.3.15 sqlite3 binary's shell.c makes 
reference to sqlite3_io_trace in the 3.3.15 sqlite3.so's main.c.
You cannot use an older 3.3.4 sqlite3.so against the 3.3.15 sqlite3 binary
because the older shared library lacks sqlite3_io_trace.

In general, sqlite3.so is backwards compatible, but not necessarily 
forward compatible. So you can upgrade an older binary to use a more 
recent 3.x sqlite3.so release, but not the other way around.


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: [sqlite] Re: sqlite3 shell doesn't install correctly

2007-04-22 Thread Joe Wilson
--- Ulrich Schöbel <[EMAIL PROTECTED]> wrote:
> Thanks for the patch, but there is still something wrong in the
> linking stage.
> 
> I have 3 instances of SQLite on my system:
> The first is 3.2.1, installed with the system and not used, at least
> not by me, library in /usr/lib.
> The second is installed in a separate directory tree, version 3.3.4,
> which I don't want to change, at least not now.
> The third is in /usr/local/..., version 3.3.4 until now, to be substituted
> by 3.3.16.
> 
> When I run make it produces an sqlite3 binary linked against the
> 3.3.4 library. I made it temporarily unsearchable, now it links
> against the 3.2.1. Next step was to remove the 3.2.1 lib in /usr/lib.
> Now the linker doesn't find a library. It simply refuses to accept the
> right one. Scanning libtool showed all three lib directories in place.
> 
> The shell script sqlite3 runs fine as it did yesterday without the patch.

To avoid future linkage and path problems with the sqlite3 shell, 
I'd recommend building it statically. Fewer possible problems.

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: [sqlite] Re: sqlite3 shell doesn't install correctly

2007-04-21 Thread Ulrich Schöbel
On Saturday 21 April 2007 15:40, Joe Wilson wrote:
> > I've used SQLite-3.3.4 for quite a while, mostly the Tcl binding.
> > A few days ago I installed 3.3.15 and the Tcl binding worked fine.
> > Tonight I downloaded 3.3.16 and compiled it without any errors
> > or warnings and then installed it. When I tried to execute sqlite3
> > the following error appered:
> >
> > sqlite3: symbol lookup error: sqlite3: undefined symbol: sqlite3_io_trace
> >
> > I switched back to 3.3.15 with the same result. A switch back to
> > 3.3.4 behaved normal.
> >
> > What's wrong with 3.3.15 and 3.3.16?
>
> Apply this patch to fix this problem.
>
>
> Index: src/main.c
> ===
> RCS file: /sqlite/sqlite/src/main.c,v
> retrieving revision 1.370
> diff -u -3 -p -r1.370 main.c
> --- src/main.c  18 Apr 2007 14:24:33 -  1.370
> +++ src/main.c  21 Apr 2007 13:35:18 -
> @@ -27,6 +27,7 @@ const char sqlite3_version[] = SQLITE_VE
>  const char *sqlite3_libversion(void){ return sqlite3_version; }
>  int sqlite3_libversion_number(void){ return SQLITE_VERSION_NUMBER; }
>
> +#if !defined(SQLITE_OMIT_TRACE) && defined(SQLITE_ENABLE_IOTRACE)
>  /*
>  ** If the following function pointer is not NULL and if
>  ** SQLITE_ENABLE_IOTRACE is enabled, then messages describing
> @@ -34,6 +35,7 @@ int sqlite3_libversion_number(void){ ret
>  ** are intended for debugging activity only.
>  */
>  void (*sqlite3_io_trace)(const char*, ...) = 0;
> +#endif
>
>  /*
>  ** If the following global variable points to a string which is the
> Index: src/shell.c
> ===
> RCS file: /sqlite/sqlite/src/shell.c,v
> retrieving revision 1.160
> diff -u -3 -p -r1.160 shell.c
> --- src/shell.c 28 Feb 2007 06:14:25 -  1.160
> +++ src/shell.c 21 Apr 2007 13:35:19 -
> @@ -1242,6 +1242,7 @@ static int do_meta_command(char *zLine,
>  }
>}else
>
> +#if !defined(SQLITE_OMIT_TRACE) && defined(SQLITE_ENABLE_IOTRACE)
>if( c=='i' && strncmp(azArg[0], "iotrace", n)==0 ){
>  extern void (*sqlite3_io_trace)(const char*, ...);
>  if( iotrace && iotrace!=stdout ) fclose(iotrace);
> @@ -1261,6 +1262,7 @@ static int do_meta_command(char *zLine,
>}
>  }
>}else
> +#endif
>
>  #ifndef SQLITE_OMIT_LOAD_EXTENSION
>if( c=='l' && strncmp(azArg[0], "load", n)==0 && nArg>=2 ){
>
>
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---
>-- To unsubscribe, send email to [EMAIL PROTECTED]
> ---
>--

Thanks for the patch, but there is still something wrong in the
linking stage.

I have 3 instances of SQLite on my system:
The first is 3.2.1, installed with the system and not used, at least
not by me, library in /usr/lib.
The second is installed in a separate directory tree, version 3.3.4,
which I don't want to change, at least not now.
The third is in /usr/local/..., version 3.3.4 until now, to be substituted
by 3.3.16.

When I run make it produces an sqlite3 binary linked against the
3.3.4 library. I made it temporarily unsearchable, now it links
against the 3.2.1. Next step was to remove the 3.2.1 lib in /usr/lib.
Now the linker doesn't find a library. It simply refuses to accept the
right one. Scanning libtool showed all three lib directories in place.

The shell script sqlite3 runs fine as it did yesterday without the patch.

I'm stuck.

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



[sqlite] Re: sqlite3 shell doesn't install correctly

2007-04-21 Thread Joe Wilson
> I've used SQLite-3.3.4 for quite a while, mostly the Tcl binding.
> A few days ago I installed 3.3.15 and the Tcl binding worked fine.
> Tonight I downloaded 3.3.16 and compiled it without any errors
> or warnings and then installed it. When I tried to execute sqlite3
> the following error appered:
> 
> sqlite3: symbol lookup error: sqlite3: undefined symbol: sqlite3_io_trace
> 
> I switched back to 3.3.15 with the same result. A switch back to
> 3.3.4 behaved normal.
> 
> What's wrong with 3.3.15 and 3.3.16?


Apply this patch to fix this problem.


Index: src/main.c
===
RCS file: /sqlite/sqlite/src/main.c,v
retrieving revision 1.370
diff -u -3 -p -r1.370 main.c
--- src/main.c  18 Apr 2007 14:24:33 -  1.370
+++ src/main.c  21 Apr 2007 13:35:18 -
@@ -27,6 +27,7 @@ const char sqlite3_version[] = SQLITE_VE
 const char *sqlite3_libversion(void){ return sqlite3_version; }
 int sqlite3_libversion_number(void){ return SQLITE_VERSION_NUMBER; }
 
+#if !defined(SQLITE_OMIT_TRACE) && defined(SQLITE_ENABLE_IOTRACE)
 /*
 ** If the following function pointer is not NULL and if
 ** SQLITE_ENABLE_IOTRACE is enabled, then messages describing
@@ -34,6 +35,7 @@ int sqlite3_libversion_number(void){ ret
 ** are intended for debugging activity only.
 */
 void (*sqlite3_io_trace)(const char*, ...) = 0;
+#endif
 
 /*
 ** If the following global variable points to a string which is the
Index: src/shell.c
===
RCS file: /sqlite/sqlite/src/shell.c,v
retrieving revision 1.160
diff -u -3 -p -r1.160 shell.c
--- src/shell.c 28 Feb 2007 06:14:25 -  1.160
+++ src/shell.c 21 Apr 2007 13:35:19 -
@@ -1242,6 +1242,7 @@ static int do_meta_command(char *zLine, 
 }
   }else
 
+#if !defined(SQLITE_OMIT_TRACE) && defined(SQLITE_ENABLE_IOTRACE)
   if( c=='i' && strncmp(azArg[0], "iotrace", n)==0 ){
 extern void (*sqlite3_io_trace)(const char*, ...);
 if( iotrace && iotrace!=stdout ) fclose(iotrace);
@@ -1261,6 +1262,7 @@ static int do_meta_command(char *zLine, 
   }
 }
   }else
+#endif
 
 #ifndef SQLITE_OMIT_LOAD_EXTENSION
   if( c=='l' && strncmp(azArg[0], "load", n)==0 && nArg>=2 ){


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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