Re: [sqlite] What does "The use of the amalgamation is recommended for all applications." mean, precisely?

2012-05-26 Thread Black, Michael (IS)
I'll point out that all of your problem is addressed by open source whereas an 
external library only addresses part.

You could do whatever you want with open source.



I refuse to put things into mission critical without source unless support is 
also purchased with it.





Michael D. Black

Senior Scientist

Advanced Analytics Directorate

Advanced GEOINT Solutions Operating Unit

Northrop Grumman Information Systems


From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
behalf of Peter Haworth [p...@lcsql.com]
Sent: Friday, May 25, 2012 3:57 PM
To: sqlite-users@sqlite.org
Subject: EXT :Re: [sqlite] What does "The use of the amalgamation is 
recommended for all applications." mean, precisely?

Just picking a random post to make my reply to.

I truly wish I could get access to an external sqlite library to load at
runtime.  I use e devlopement language that has the sqlite library built
into it so I am at the mercy of the language provider as to what is
provided.  Right now, they are using sqlite 3.7.4 which looks to be at
least 7 releases out of date and lacks several features including fts4aux
and rtree virtual tables.  TO make matters worse, they don;t expose
whatever function it is in sqlite that would allow me to load extensions to
sqlite from external libraries.

So while I think that in most circumstances it makes sense to compile the
sqlite library into your application for all the reasons mentioned, I wish
that was not the case in my circumstances.

Pete
lcSQL Software >



___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What does "The use of the amalgamation is recommended for all applications." mean, precisely?

2012-05-26 Thread Kevin Benson
On Fri, May 25, 2012 at 8:08 PM, Jonas Malaco Filho <
jonasmalacofi...@gmail.com> wrote:

> Just curious, what dev language are you using?
>

I ~believe~ he's using LiveCode:
http://www.runrev.com/products/livecode/livecode-platform-overview/

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What does "The use of the amalgamation is recommended for all applications." mean, precisely?

2012-05-25 Thread Jonas Malaco Filho
Just curious, what dev language are you using?

*Jonas Malaco Filho*

On 25/05/2012, at 17:57, Peter Haworth  wrote:

Just picking a random post to make my reply to.

I truly wish I could get access to an external sqlite library to load at
runtime.  I use e devlopement language that has the sqlite library built
into it so I am at the mercy of the language provider as to what is
provided.  Right now, they are using sqlite 3.7.4 which looks to be at
least 7 releases out of date and lacks several features including fts4aux
and rtree virtual tables.  TO make matters worse, they don;t expose
whatever function it is in sqlite that would allow me to load extensions to
sqlite from external libraries.

So while I think that in most circumstances it makes sense to compile the
sqlite library into your application for all the reasons mentioned, I wish
that was not the case in my circumstances.

Pete
lcSQL Software 



On Fri, May 25, 2012 at 9:00 AM,  wrote:

Message: 60

Date: Fri, 25 May 2012 12:45:07 +

From: "Black, Michael (IS)" 

To: General Discussion of SQLite Database 

Subject: Re: [sqlite] What does "The use of the amalgamation is

  recommended for all applications." mean, precisely?

Message-ID: 

Content-Type: text/plain; charset="iso-8859-1"


On the 3rd hand (Medusa here) those of us involved in mission critical

apps refuse to let people arbitrarily update packages that are part of the

"system".  Things like the bug introduced in 3.7.12 being a prime example.




It's called "Configuration Control".  Some apps may depend on updated

system libraries...just keep them out of my sandbox.  If our app needs a

fix WE put it in under a controlled manner with regression testing, test

system, and final deployment.  And we may include a newer version than the

system is allowed to have.




Call me (and my configuration control panel) control freaks.




We used to have tons of problems on Solaris due to shared libraries.

Numerous incompatibilities across multiple versions of Solaris.  Static

link always worked.






Michael D. Black


Senior Scientist


Advanced Analytics Directorate


Advanced GEOINT Solutions Operating Unit


Northrop Grumman Information Systems


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What does "The use of the amalgamation is recommended for all applications." mean, precisely?

2012-05-25 Thread Peter Haworth
Just picking a random post to make my reply to.

I truly wish I could get access to an external sqlite library to load at
runtime.  I use e devlopement language that has the sqlite library built
into it so I am at the mercy of the language provider as to what is
provided.  Right now, they are using sqlite 3.7.4 which looks to be at
least 7 releases out of date and lacks several features including fts4aux
and rtree virtual tables.  TO make matters worse, they don;t expose
whatever function it is in sqlite that would allow me to load extensions to
sqlite from external libraries.

So while I think that in most circumstances it makes sense to compile the
sqlite library into your application for all the reasons mentioned, I wish
that was not the case in my circumstances.

Pete
lcSQL Software 



On Fri, May 25, 2012 at 9:00 AM,  wrote:

> Message: 60
> Date: Fri, 25 May 2012 12:45:07 +
> From: "Black, Michael (IS)" 
> To: General Discussion of SQLite Database 
> Subject: Re: [sqlite] What does "The use of the amalgamation is
>recommended for all applications." mean, precisely?
> Message-ID: 
> Content-Type: text/plain; charset="iso-8859-1"
>
> On the 3rd hand (Medusa here) those of us involved in mission critical
> apps refuse to let people arbitrarily update packages that are part of the
> "system".  Things like the bug introduced in 3.7.12 being a prime example.
>
>
>
> It's called "Configuration Control".  Some apps may depend on updated
> system libraries...just keep them out of my sandbox.  If our app needs a
> fix WE put it in under a controlled manner with regression testing, test
> system, and final deployment.  And we may include a newer version than the
> system is allowed to have.
>
>
>
> Call me (and my configuration control panel) control freaks.
>
>
>
> We used to have tons of problems on Solaris due to shared libraries.
>  Numerous incompatibilities across multiple versions of Solaris.  Static
> link always worked.
>
>
>
>
>
> Michael D. Black
>
> Senior Scientist
>
> Advanced Analytics Directorate
>
> Advanced GEOINT Solutions Operating Unit
>
> Northrop Grumman Information Systems
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What does "The use of the amalgamation is recommended for all applications." mean, precisely?

2012-05-25 Thread Michael Schlenker
Am 25.05.2012 14:27, schrieb Pavel Ivanov:
>> With regard to the second issue, several experienced people, including
>> Richard Hipp, have expressed the opinion in more than one occasion
>> that statically linking sqlite avoids some problems that can happen
>> otherwise.
> 
> OTOH, all people involved in supporting Linux distributions advocate
> against static inclusion and for use of dynamic libraries all the time
> so that if some bug or security vulnerability is fixed in SQLite it
> could be easily updated for everybody by upgrading only one package. I
> don't know though what they suggest to do if you need to use version
> of SQLite newer than distribution is currently providing.
> 
Well, it reduces the work for the Linux maintainers and some app
developers are notoriously slow to fix security bugs upstream.

Guess it really depends on the target audience.

For some library or other smaller app that is to be distributed with
some popular Linux distro or to another environment where someone else
is responsible for keeping the environment sane, it might make sense to
do dynamic linking to a system library. If the other person that manages
the environment fails, your app fails. If the other person does not
update the libs you are stuck and can only file bugs and wait.

But if you ship a major system, you really really want to keep your
environment under control. More work, but saves you from insane bugs due
to broken system libs and weird hacks around various system lib issues.
If some lib is broken, just patch it and ship a fixed version.

We typically run 'ldd' on all our libs and programs and match the
external dependencies to an allowed list. Anything not in that list
(which is usually tiny, stuff like libc) found in any library is
considered a bug in our product and gets patched (usually by either
disabling unnecessary dependencies at compile time or by shipping the
really needed dependencies in a working version).

So, if you can point to someone else (e.g. Linux distro maintainer) to
fix issues with broken libs for you, fine. But if you must fix them
yourself due to support contracts, you do not want to be forced to
depend on those.

Michael

-- 
Michael Schlenker
Software Architect

CONTACT Software GmbH   Tel.:   +49 (421) 20153-80
Wiener Straße 1-3   Fax:+49 (421) 20153-41
28359 Bremen
http://www.contact.de/  E-Mail: m...@contact.de

Sitz der Gesellschaft: Bremen
Geschäftsführer: Karl Heinz Zachries, Ralf Holtgrefe
Eingetragen im Handelsregister des Amtsgerichts Bremen unter HRB 13215
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What does "The use of the amalgamation is recommended for all applications." mean, precisely?

2012-05-25 Thread Simon Slavin

On 25 May 2012, at 1:45pm, "Black, Michael (IS)"  wrote:

> We used to have tons of problems on Solaris due to shared libraries.  
> Numerous incompatibilities across multiple versions of Solaris.  Static link 
> always worked.

There are actually three options (depending on what's available on your 
platform):

A) Dynamic linking to a shared library (works when the user updates the library)

B) Static linking to a shared library (works only with specific library file)

C) Including the C code in the executable file.

Option (A) is the instinctive behaviour of a Windows programmer: look for a 
precompiled DLL and use that.  But SQLite is a very unusual API.  First, it's 
tiny, so the drawback associated with large libraries (size of distribution 
files, amount of hard disk taken up) disappear.  Secondly, it's very 'lite' and 
people don't tend to do a lot of programming around it.

The second one has more influence than you'd think.  The way professional-level 
libraries are used by professional programmers takes into account different 
behaviour of different versions.  If someone was to do this with SQLite then 
you would see code which looks like this:

init section:
int gSQLiteVersion = sqlite3_libversion_number()
if qSQLiteVersion = 030712
die "Please update your SQLite library to cure a bug in version 3.7.12 
of SQlite."
end if

and in various places in the code:

// check we have FOREIGN KEYs
if gSQLiteVersion < 030619 …
handle it a complicated and slow way with checking code
else
just check to see whether SQLite generated an error
end if

If you write code this way on a conventional desktop computer you end up with a 
flexible but very large API of your own which itself calls SQLite.  But almost 
nobody does this with SQLite because it's so 'lite' people are used to doing 
SQLite in one-liners.  Using SQLite then writing their own large library 
defeats the reason they picked SQLite in the first place.  And people 
programming small embedded/handheld devices definitely want something lite 
because that saves them memory, power, weight, and heat.  Again, writing their 
own library to call the SQLite functions defeats their purpose.

So people tend to write their software to work with one specific version, and 
let it fail if somehow another version is found.  So knowing precisely which 
version of SQLite your app is using is a great advantage.  So the DLL option 
is, unusually, not as persuasive for SQLite.

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What does "The use of the amalgamation is recommended for all applications." mean, precisely?

2012-05-25 Thread Black, Michael (IS)
On the 3rd hand (Medusa here) those of us involved in mission critical apps 
refuse to let people arbitrarily update packages that are part of the "system". 
 Things like the bug introduced in 3.7.12 being a prime example.



It's called "Configuration Control".  Some apps may depend on updated system 
libraries...just keep them out of my sandbox.  If our app needs a fix WE put it 
in under a controlled manner with regression testing, test system, and final 
deployment.  And we may include a newer version than the system is allowed to 
have.



Call me (and my configuration control panel) control freaks.



We used to have tons of problems on Solaris due to shared libraries.  Numerous 
incompatibilities across multiple versions of Solaris.  Static link always 
worked.





Michael D. Black

Senior Scientist

Advanced Analytics Directorate

Advanced GEOINT Solutions Operating Unit

Northrop Grumman Information Systems


From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
behalf of Pavel Ivanov [paiva...@gmail.com]
Sent: Friday, May 25, 2012 7:27 AM
To: General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] What does "The use of the amalgamation is 
recommended for all applications." mean, precisely?

OTOH, all people involved in supporting Linux distributions advocate
against static inclusion and for use of dynamic libraries all the time
so that if some bug or security vulnerability is fixed in SQLite it
could be easily updated for everybody by upgrading only one package. I
don't know though what they suggest to do if you need to use version
of SQLite newer than distribution is currently providing.


Pavel

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What does "The use of the amalgamation is recommended for all applications." mean, precisely?

2012-05-25 Thread Richard Hipp
On Fri, May 25, 2012 at 8:27 AM, Pavel Ivanov  wrote:

> > With regard to the second issue, several experienced people, including
> > Richard Hipp, have expressed the opinion in more than one occasion
> > that statically linking sqlite avoids some problems that can happen
> > otherwise.
>
> OTOH, all people involved in supporting Linux distributions advocate
> against static inclusion and for use of dynamic libraries all the time
> so that if some bug or security vulnerability is fixed in SQLite it
> could be easily updated for everybody by upgrading only one package.


The security argument makes some sense for libraries like libz.so or
libjpeg.so, which are operating on unchecked content received from
untrusted sources, since a bug in those libraries could result in a
security breach.

Notice, however, that this is not the case with SQLite.  SQLite gets its
inputs from the application, not the user.  If your applications is feeding
unchecked content into SQLite from the open internet, then you have way
more serious problems (SQL injection) than any bug in SQLite.

Because of this, and our rigorous testing, SQLite has never caused a
security vulnerability to my knowledge, even with over 2 billion (2e9)
deployments.

So I reject that Linux distributors arguments that all libraries should be
dynamic.  In the case of SQLite, that merely leads to unwanted and
troublesome dependencies in the application.  It is far better to
statically link, so that your application uses exactly the same version of
SQLite on the end-users machine as was used during testing.

"Fly what you test and test what you fly."

-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What does "The use of the amalgamation is recommended for all applications." mean, precisely?

2012-05-25 Thread Pavel Ivanov
> With regard to the second issue, several experienced people, including
> Richard Hipp, have expressed the opinion in more than one occasion
> that statically linking sqlite avoids some problems that can happen
> otherwise.

OTOH, all people involved in supporting Linux distributions advocate
against static inclusion and for use of dynamic libraries all the time
so that if some bug or security vulnerability is fixed in SQLite it
could be easily updated for everybody by upgrading only one package. I
don't know though what they suggest to do if you need to use version
of SQLite newer than distribution is currently providing.


Pavel


On Fri, May 25, 2012 at 3:33 AM, Pierpaolo Bernardi  wrote:
> On Fri, May 25, 2012 at 9:03 AM, Sidney Cadot  wrote:
>
>> What I was wondering is whether the SQLite docs (written by you, I
>> presume) express a preference for using SQLite3 via inclusion of the
>> source (amalgamation) into ones project, vs. using a pre-compiled
>> library (as could be provided, for example, by a linux distribution).
>
> Separate files vs. amalgamation, and statically vs. dynamic linking of
> sqlite are two completely orthogonal issues.
>
> The manual section you quote refers only to the first of the two issue.
>
> With regard to the second issue, several experienced people, including
> Richard Hipp, have expressed the opinion in more than one occasion
> that statically linking sqlite avoids some problems that can happen
> otherwise.
>
> Evaluating the pro and the contra of the two choices for each
> particular project is a task that only the people involved in the
> project can perform.
>
> Hope this helps.
> P.
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What does "The use of the amalgamation is recommended for all applications." mean, precisely?

2012-05-25 Thread Pierpaolo Bernardi
On Fri, May 25, 2012 at 9:03 AM, Sidney Cadot  wrote:

> What I was wondering is whether the SQLite docs (written by you, I
> presume) express a preference for using SQLite3 via inclusion of the
> source (amalgamation) into ones project, vs. using a pre-compiled
> library (as could be provided, for example, by a linux distribution).

Separate files vs. amalgamation, and statically vs. dynamic linking of
sqlite are two completely orthogonal issues.

The manual section you quote refers only to the first of the two issue.

With regard to the second issue, several experienced people, including
Richard Hipp, have expressed the opinion in more than one occasion
that statically linking sqlite avoids some problems that can happen
otherwise.

Evaluating the pro and the contra of the two choices for each
particular project is a task that only the people involved in the
project can perform.

Hope this helps.
P.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What does "The use of the amalgamation is recommended for all applications." mean, precisely?

2012-05-25 Thread Sidney Cadot
Hi,

> I approve of your translation.

That interpretation concerns the relative merits of using the separate
sources vs the amalgamation, if I understand correctly. Barring
special circumstances, the use of the amalgamation is the preferred
way; that is understood.

What I was wondering is whether the SQLite docs (written by you, I
presume) express a preference for using SQLite3 via inclusion of the
source (amalgamation) into ones project, vs. using a pre-compiled
library (as could be provided, for example, by a linux distribution).

Some readings of the documentation suggest that SQLite advocates
direct inclusion over using the software as a library:

   "The amalgamation contains everything you need to integrate
SQLite into a larger project. Just copy the amalgamation into your
source directory and compile it along with the other C code files in
your project. " - http://www.sqlite.org/amalgamation.html

   "The use of the amalgamation is recommended for all
applications." - http://www.sqlite.org/howtocompile.html

I wonder if that is the case. I think that using SQLite3 via library
and via source are both actively supported ways of using the library,
as evidenced by the distribution of both the amalgamated source and a
tarbal where a configure/make/make install will yield a library. The
choice should be left to the user, depending on their circumstances.

I am wondering where you stand on this.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What does "The use of the amalgamation is recommended for all applications." mean, precisely?

2012-05-24 Thread Richard Hipp
On Thu, May 24, 2012 at 2:04 PM, Simon Slavin  wrote:

>
> On 24 May 2012, at 6:56pm, Sidney Cadot  wrote:
>
> >> Why risk ending up with an unexpected (possibly old) version
> >> by linking at runtime just to save users less than 300K of disk
> >> space?
> >
> > But that's an argument against shared linking in general.
> >
> > I am just curious what idea this particular statement on this
> > particular help-page (specific to SQLite) is trying to convey.
>
> It means "We make both the entire SQLite source code (many different .c
> and .h files) and the amalgamation (one .c file, one .h file) available for
> download.  Use the amalgamation version in your project.".
>
> The many-file sourcecode files are for debugging, figuring out how SQLite
> works, and for the team developing SQLite.  You might need them if you're
> making your own custom changes to SQLite to make it do something
> non-standard.  But for mundane use, just use the amalgamation.
>
> The above is an unofficial informal translation.
>

I approve of your translation.



>
> Simon.
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What does "The use of the amalgamation is recommended for all applications." mean, precisely?

2012-05-24 Thread Simon Slavin

On 24 May 2012, at 6:56pm, Sidney Cadot  wrote:

>> Why risk ending up with an unexpected (possibly old) version
>> by linking at runtime just to save users less than 300K of disk
>> space?
> 
> But that's an argument against shared linking in general.
> 
> I am just curious what idea this particular statement on this
> particular help-page (specific to SQLite) is trying to convey.

It means "We make both the entire SQLite source code (many different .c and .h 
files) and the amalgamation (one .c file, one .h file) available for download.  
Use the amalgamation version in your project.".

The many-file sourcecode files are for debugging, figuring out how SQLite 
works, and for the team developing SQLite.  You might need them if you're 
making your own custom changes to SQLite to make it do something non-standard.  
But for mundane use, just use the amalgamation.

The above is an unofficial informal translation.

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What does "The use of the amalgamation is recommended for all applications." mean, precisely?

2012-05-24 Thread Sidney Cadot
> However, the OP has indicated little that would allow us to guess whether
> his project should follow the norm or not.

I think my question is independent of my particular project; in fact,
I am not working on an SQLite project at the moment.

The reason I asked this question is that I have a discussion about
what this particular phrase means, with a friend and fellow
programmer. The two interpretations I propose reflect our different
readings of that particular statement.

I do feel that a statement that is on a generic help page should be
unambiguous, and not allow different interpretations. Is it known who
wrote this particular page, and does he perhaps follow this mailing
list? I'd be curious to ask him about the intended meaning. Perhaps
the wording as given could be made more explicit.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What does "The use of the amalgamation is recommended for all applications." mean, precisely?

2012-05-24 Thread Marc L. Allen
That page appears to specifically be in regards to compiling SQLite from 
sources.  It means, don't use the individual files, but use the amalgamation 
because it's a lot simpler to deal with.

How you compile it, or in what form the compiled object is used is not 
mentioned.

-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] 
On Behalf Of Sidney Cadot
Sent: Thursday, May 24, 2012 1:56 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] What does "The use of the amalgamation is recommended for 
all applications." mean, precisely?

> Why risk ending up with an unexpected (possibly old) version by 
> linking at runtime just to save users less than 300K of disk space?

But that's an argument against shared linking in general.

I am just curious what idea this particular statement on this particular 
help-page (specific to SQLite) is trying to convey.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What does "The use of the amalgamation is recommended for all applications." mean, precisely?

2012-05-24 Thread Sidney Cadot
> Why risk ending up with an unexpected (possibly old) version
> by linking at runtime just to save users less than 300K of disk
> space?

But that's an argument against shared linking in general.

I am just curious what idea this particular statement on this
particular help-page (specific to SQLite) is trying to convey.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What does "The use of the amalgamation is recommended for all applications." mean, precisely?

2012-05-24 Thread Sidney Cadot
> Yes.  SQLite is so small there's really no reason to make a separate library 
> of it.

Well, my Linux distribution may provide a "libsqlite3-dev" package,
which makes linking to a recent version of sqlite as simple as adding
LDLIBS=-lsqlite3 to the Makefile. By going that path you ensure that
re-making the package will link against newer versions of sqlite as
they come available, at zero effort. That is a reason.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What does "The use of the amalgamation is recommended for all applications." mean, precisely?

2012-05-24 Thread Larry Brasfield

On May 24, Dan Kennedy wrote:

On 05/24/2012 10:53 PM, Larry Brasfield wrote:
>> On the support page http://www.sqlite.org/howtocompile.html, it says:
>>
>> "The use of the amalgamation is recommended for all applications."
>>
>> Is this a general recommendation, to use the amalgamated source file
>> as the preferred way of including SQLite functionality in one's
>> application, rather than using a separately compiled library?
>>
>> Or should I read this as a recommendation just in case I need to
>> compile SQLite from source, and need to decide between using the
>> amalgamation or using the individual source files?
>
>  From the context of the recommendation, one can clearly infer that it
> addresses only how SQLite source is presented to the compiler. Whether
> the compiler's output is embedded in its own object file, a DLL, or
> directly into a calling program is not addressed.
>

The statement above is accurate.

But at the same time, it is a general recommendation that
you just pull sqlite3.c into your project instead of messing
around with shared libraries and so on.

Why risk ending up with an unexpected (possibly old) version
by linking at runtime just to save users less than 300K of disk
space?


I don't want to quibble about language here, but I see nothing at the 
quoted link about whether sqlite3.c should be used as a shared library, 
(or a static library).


For most projects, I expect that the recommendation you suggest makes 
sense.  However, the OP has indicated little that would allow us to 
guess whether his project should follow the norm or not.  There may well 
be issues other than disk space at stake.  For example, the .NET 
adaptation of SQLite benefits from being a shared library as this fits 
well into the "black box with well defined interface" usage model the 
.NET developers routinely use with a variety of packages.


Best regards,
--
Larry Brasfield
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What does "The use of the amalgamation is recommended for all applications." mean, precisely?

2012-05-24 Thread Dan Kennedy

On 05/24/2012 10:53 PM, Larry Brasfield wrote:

On the support page http://www.sqlite.org/howtocompile.html, it says:

"The use of the amalgamation is recommended for all applications."

Is this a general recommendation, to use the amalgamated source file
as the preferred way of including SQLite functionality in one's
application, rather than using a separately compiled library?

Or should I read this as a recommendation just in case I need to
compile SQLite from source, and need to decide between using the
amalgamation or using the individual source files?


 From the context of the recommendation, one can clearly infer that it
addresses only how SQLite source is presented to the compiler. Whether
the compiler's output is embedded in its own object file, a DLL, or
directly into a calling program is not addressed.



The statement above is accurate.

But at the same time, it is a general recommendation that
you just pull sqlite3.c into your project instead of messing
around with shared libraries and so on.

Why risk ending up with an unexpected (possibly old) version
by linking at runtime just to save users less than 300K of disk
space?



___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What does "The use of the amalgamation is recommended for all applications." mean, precisely?

2012-05-24 Thread Simon Slavin

On 24 May 2012, at 4:43pm, Sidney Cadot  wrote:

> On the support page http://www.sqlite.org/howtocompile.html, it says:
> 
>"The use of the amalgamation is recommended for all applications."
> 
> Is this a general recommendation, to use the amalgamated source file
> as the preferred way of including SQLite functionality in one's
> application, rather than using a separately compiled library?

Yes.  SQLite is so small there's really no reason to make a separate library of 
it.  And using libraries causes problems when different apps on your computer 
try to use different versions of SQLite.

> Or should I read this as a recommendation just in case I need to
> compile SQLite from source, and need to decide between using the
> amalgamation or using the individual source files?

Whatever you're compiling, a stand-alone app or a library, use the amalgamation 
rather than the complicated mass of separate source files.  The source files 
are very useful when trying to understand how SQLite works, but the 
amalgamation is better when compiling.

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What does "The use of the amalgamation is recommended for all applications." mean, precisely?

2012-05-24 Thread Larry Brasfield

On the support page http://www.sqlite.org/howtocompile.html, it says:

"The use of the amalgamation is recommended for all applications."

Is this a general recommendation, to use the amalgamated source file
as the preferred way of including SQLite functionality in one's
application, rather than using a separately compiled library?

Or should I read this as a recommendation just in case I need to
compile SQLite from source, and need to decide between using the
amalgamation or using the individual source files?


From the context of the recommendation, one can clearly infer that it 
addresses only how SQLite source is presented to the compiler.  Whether 
the compiler's output is embedded in its own object file, a DLL, or 
directly into a calling program is not addressed.


--
Larry Brasfield
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] What does "The use of the amalgamation is recommended for all applications." mean, precisely?

2012-05-24 Thread Sidney Cadot
Dear all,

On the support page http://www.sqlite.org/howtocompile.html, it says:

"The use of the amalgamation is recommended for all applications."

Is this a general recommendation, to use the amalgamated source file
as the preferred way of including SQLite functionality in one's
application, rather than using a separately compiled library?

Or should I read this as a recommendation just in case I need to
compile SQLite from source, and need to decide between using the
amalgamation or using the individual source files?


Kind regards,
  Sidney
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users