Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 39723 - sqlite should be compiled to be thread safe
Summary: sqlite should be compiled to be thread safe
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High minor
Assignee: Armando Di Cianno (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-28 20:26 UTC by Arnaud Burlet
Modified: 2006-01-02 08:08 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
suggested modified ebuild (sqlite-2.8.11.ebuild,895 bytes, text/plain)
2004-01-28 20:40 UTC, Arnaud Burlet
Details
sqlite-3.0.8-r1.ebuild (sqlite-3.0.8-r1.ebuild,1.08 KB, text/plain)
2004-12-04 04:21 UTC, Fernando Serboncini (RETIRED)
Details
sqlite-3.0.8-r1.ebuild (clean header) (sqlite-3.0.8-r1.ebuild,1008 bytes, text/plain)
2004-12-04 04:26 UTC, Fernando Serboncini (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arnaud Burlet 2004-01-28 20:26:45 UTC
By default SQLite is not compiled to be thread safe. It can compiled threadsafe by adding preprocessor macro THREADSAFE=1. That is by setting CFLAGS during ./configure to "-D THREADSAFE=1".

see http://sqlite.org/faq.html#q8 for official explanation.

Reproducible: Always
Steps to Reproduce:
Comment 1 Arnaud Burlet 2004-01-28 20:40:54 UTC
Created attachment 24575 [details]
suggested modified ebuild

simply added a line in the ebuild :
CFLAGS="${CFLAGS} -DTHREADSAFE"

Maybe not the best way to do it ...
Comment 2 Fernando Serboncini (RETIRED) gentoo-dev 2004-10-27 09:53:05 UTC
I agree with this. Perhaps a use flags, but threadsafe support on sqlite is really needed.
Comment 3 Armando Di Cianno (RETIRED) gentoo-dev 2004-12-03 09:14:04 UTC
Has anyone been working on this?

Version 3.* series of SQLite seems to offer an --enable-threadsafe configure option.  From browsing the code, it doesn't seem to make assumptions about what thread types are being using, etc, wrt to --enable-threadsafe.

Shouldn't this be on by default?

Regardless, I need threadsafe operation from SQLite in another ebuild I'm working on.  If this isn't taken care of soon (the bug is somewhat old...) I'm going to add a "nothreadsafe" USE flag to SQLite and enable threadsafe by default.

(Just my personal opinion, but considering SQLite is working with files, thread safety shouldn't even be an option!)
Comment 4 Fernando Serboncini (RETIRED) gentoo-dev 2004-12-04 04:21:48 UTC
Created attachment 45254 [details]
sqlite-3.0.8-r1.ebuild

Added a nothreadsafe USE flags and set --enable-threadsafe by default.
Comment 5 Fernando Serboncini (RETIRED) gentoo-dev 2004-12-04 04:26:59 UTC
Created attachment 45255 [details]
sqlite-3.0.8-r1.ebuild (clean header)

clean header added. sorry.
Comment 6 Armando Di Cianno (RETIRED) gentoo-dev 2004-12-04 10:18:41 UTC
I've added a sqlite-3.0.8-r1 which incorporates a "nothreadsafe" USE flag, and ths enables thread safety by default.

I'd rather not have added a "noflag" and bump the package, but this at least enforces proper behavior of the library, if one where to upgrade sqlite.
Comment 7 Armando Di Cianno (RETIRED) gentoo-dev 2004-12-04 15:39:22 UTC
>=dev-db/sqlite-3.0.8-r1 should be threadsafe by default now.