Version issues on Mac after updating

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Version issues on Mac after updating

Eric Kestler
I’m a newbie to Sqlite, if that explains the following:

Last year, I installed Sqlite on my Mac; it was version 3.7.6.3:

Server Type: SQLite
Connection Name: testDB
Database File: /Users/ekestler/Dropbox/SyleneDB/test.db
Setting Save Path: /Users/ekestler/Library/Application Support/PremiumSoft
CyberTech/Navicat for SQLite/testDB
Auto connect: NO
Encrypted: NO
Attached Database: NO
Server Version: 3.7.6.3


This past week, after carefully saving all the SQL queries, and exporting
all the tables as CSV files, renamed the sqlite3 executable to sqlite3_old,
and downloaded and installed a newer version on my Mac:

Erics-MacBook-Pro:SyleneDB ekestler$ sqlite3

SQLite version 3.8.10.2 2015-05-20 18:17:19

Enter ".help" for usage hints.

Connected to a *transient in-memory database*.

Use ".open FILENAME" to reopen on a persistent database.

sqlite>


I use a (very old, not available from the vendor anymore) development IDE
product called Navicat Lite; when invoked, it still insists that the
working Sqlite version is 3.7.6.3, and none of the functions I need are
available (instr(), substr(), etc.).


I am NOT a C/C++ developer, and have no idea on how to update versions of
Sqlite via Mac compilation/make; nor can I find step-by-step instructions
for version updates that preserve the data and sql scripts.


Where does Sqlite actually reside when installed on a Mac?


Any help in resolving the version problem, or suggestions on altering where
Navicat Lite is executing the wrong version, would be very welcome.


Thanks,


Eric Kestler

[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Version issues on Mac after updating

Dominique Devienne
On Tue, May 31, 2016 at 4:41 PM, Eric Kestler <[hidden email]> wrote:

> Where does Sqlite actually reside when installed on a Mac?
>

Probably *inside* navicat.

When you build a native application, you can use static linking of
libraries you depend on, like SQLite, or dynamic linking.
With static linking, there's no separate file containing the symbols of the
library to at runtime load into the application.
So you cannot upgrade the library w/o upgrading the application.

With dynamic linking, you can, as long as the old and new versions are
binary compatible.

It is often recommended to statically link SQLite into your app.

I'm not an OSX user, but if it's like Linux, you can run the ldd command on
your executable file,
and it will show you which dynamic libraries it depends on. If you don't
see SQLite, it probably statically linked... --DD
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Version issues on Mac after updating

Igor Korot
Hi,

On Tue, May 31, 2016 at 11:01 AM, Dominique Devienne
<[hidden email]> wrote:

> On Tue, May 31, 2016 at 4:41 PM, Eric Kestler <[hidden email]> wrote:
>
>> Where does Sqlite actually reside when installed on a Mac?
>>
>
> Probably *inside* navicat.
>
> When you build a native application, you can use static linking of
> libraries you depend on, like SQLite, or dynamic linking.
> With static linking, there's no separate file containing the symbols of the
> library to at runtime load into the application.
> So you cannot upgrade the library w/o upgrading the application.
>
> With dynamic linking, you can, as long as the old and new versions are
> binary compatible.
>
> It is often recommended to statically link SQLite into your app.
>
> I'm not an OSX user, but if it's like Linux, you can run the ldd command on
> your executable file,
> and it will show you which dynamic libraries it depends on. If you don't
> see SQLite, it probably statically linked... --DD

On Mac OSX the program is called "nm", not "ldd". ;-)
]
Thank you.

> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Version issues on Mac after updating

Simon Slavin-3
In reply to this post by Eric Kestler

On 31 May 2016, at 3:41pm, Eric Kestler <[hidden email]> wrote:

> Where does Sqlite actually reside when installed on a Mac?

In multiple places.  The sqlite source code is distributed as C source code and is intended to be compiled into each program that uses it.  There is no central installation of SQLite which they all use, no library they all load, and SQLite does not have a server process which they all talk to when they want SQLite stuff done.

I have a number of programs on my Mac which use SQLite and they use three different versions between them.  And they all work fine.

But this design does mean that to change which version of SQLite navicat is using requires you to talk to the publishers of navicat and persuade them to recompile their application with a later version of SQLite.  Sorry about that.

Simon.
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Version issues on Mac after updating

Dominique Devienne
In reply to this post by Igor Korot
On Tue, May 31, 2016 at 5:05 PM, Igor Korot <[hidden email]> wrote:

> > I'm not an OSX user, but if it's like Linux, you can run the ldd command
> on
> > your executable file,
> > and it will show you which dynamic libraries it depends on. If you don't
> > see SQLite, it probably statically linked... --DD
>
> On Mac OSX the program is called "nm", not "ldd". ;-)
>

On Linux nm is to list symbols, not dynalibs.

See https://discussions.apple.com/thread/309193?start=0&tstart=0 --DD
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Version issues on Mac after updating

Tim Streater-3
In reply to this post by Eric Kestler
On 31 May 2016 at 15:41, Eric Kestler <[hidden email]> wrote:

> I’m a newbie to Sqlite, if that explains the following:
>
> Last year, I installed Sqlite on my Mac; it was version 3.7.6.3:
>
> Server Type: SQLite
> Connection Name: testDB
> Database File: /Users/ekestler/Dropbox/SyleneDB/test.db
> Setting Save Path: /Users/ekestler/Library/Application Support/PremiumSoft
> CyberTech/Navicat for SQLite/testDB
> Auto connect: NO
> Encrypted: NO
> Attached Database: NO
> Server Version: 3.7.6.3
>
>
> This past week, after carefully saving all the SQL queries, and exporting
> all the tables as CSV files, renamed the sqlite3 executable to sqlite3_old,
> and downloaded and installed a newer version on my Mac:
>
> Erics-MacBook-Pro:SyleneDB ekestler$ sqlite3
>
> SQLite version 3.8.10.2 2015-05-20 18:17:19
>
> Enter ".help" for usage hints.
>
> Connected to a *transient in-memory database*.
>
> Use ".open FILENAME" to reopen on a persistent database.
>
> sqlite>
Yes, what you have installed is a program called sqlite, which uses the sqlite library which is built in to it. You didn't actually need to do this, since OS X comes with the sqlite program already installed.

Don't confuse the sqlite program, a shell program which provides you the ability to type in sql commands to modify a database, with the sqlite library, which provides the functionality that the sqlite program needs.

> I use a (very old, not available from the vendor anymore) development IDE
> product called Navicat Lite; when invoked, it still insists that the
> working Sqlite version is 3.7.6.3, and none of the functions I need are
> available (instr(), substr(), etc.).

Well, that's to be expected. Your version of Navicat Lite either comes with its own version of the sqlite library built in, meaning that nothing you do with sqlite (program or library) elsewhere on your system will affect the version that Navicat Lite has in any way at all, or it uses the sharable sqlite library that also comes with your version of OS X. I wouldn't try to change that version (assuming you know how) as it may be used by a number of system components. Updates of OS X might update that library, or might not.

> I am NOT a C/C++ developer, and have no idea on how to update versions of
> Sqlite via Mac compilation/make; nor can I find step-by-step instructions
> for version updates that preserve the data and sql scripts.

As I say, you wouldn't want to.

> Where does Sqlite actually reside when installed on a Mac?

Depends on what is using it. Some programs may link in a version of the sqlite library, others may use the shareable library.

> Any help in resolving the version problem, or suggestions on altering where
> Navicat Lite is executing the wrong version, would be very welcome.

If it uses a built-in copy of the library, you won't be able to change it. If when running it, it refers to an old version of the sqlite library, then it would seem likely that when Navicat Lite was built, it was linked to a static copy of the library. So, it's frozen in time.

Sorry not to be more encouraging.

--
Cheers  --  Tim

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Version issues on Mac after updating

Simon Slavin-3
In reply to this post by Eric Kestler
Sorry, forgot a key point.

You can find the version Unix chooses to run using the "which" command:

simon$ which sqlite3
/usr/bin/sqlite3

so you may have multiple copies of sqlite3 installed but that command will tell you which one Unix will run if you just type the name of the executable.

Simon.
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Version issues on Mac after updating

KlaasV
In reply to this post by Eric Kestler
Simon wrote on Tue, 31 May 2016 16:28:55 +0100
>You can find the version Unix chooses to run using the "which" command:

>simon$ which sqlite3
>/usr/bin/sqlite3

Right, that's the way it works on practically all *n?x based systems.
What I do is changing the $PATH so Darwin's bash looks first in the current directory (.), then in the dir where I usually unzip the newest version of my favorite applications one of them being {no surprise ;-)} SQLite

Sometimes to test the downwards compatibilty I don't

Last login: Mon May 30 18:11:42 on console
surfer-172-29-7-221-hotspot:~ klaasv$ which sqlite3
/usr/bin/sqlite3
surfer-172-29-7-221-hotspot:~ klaasv$ sqlite3
SQLite version 3.6.12 (I'm still working with an "ancient" version of OS X "Snow Leopard")
--
. prompt (the name I gave to my shellScript)

cd ~/binz

--[[z4us|binz--]]
sqlite3
SQLite version 3.13.0 2016-05-18 10:57:30
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> .version
SQLite 3.13.0 2016-05-18 10:57:30 fc49f556e48970561d7ab6a2f24fdd7d9eb81ff2
sqlite> select sqlite_version();
3.13.0

Kind regards | Vriendelijke groeten | Cordiali saluti,
Klaas `Z4us` van Buiten V, Experienced Freelance ICT-Guy
https://www.linkedin.com/in/klaas-van-buiten-0325b2102
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Klaas "Z4us" V, MetaDBA at InnocentIsArt.EU
Reply | Threaded
Open this post in threaded view
|

Re: Version issues on Mac after updating

Rowan Worth
In reply to this post by Dominique Devienne
On 31 May 2016 at 23:01, Dominique Devienne <[hidden email]> wrote:
>
> I'm not an OSX user, but if it's like Linux, you can run the ldd command on
> your executable file,
> and it will show you which dynamic libraries it depends on. If you don't
> see SQLite, it probably statically linked... --DD
>

The OSX equivalent to `ldd` is `otool -L`.
-Rowan
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users