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:
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 ...
I agree with this. Perhaps a use flags, but threadsafe support on sqlite is really needed.
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!)
Created attachment 45254 [details] sqlite-3.0.8-r1.ebuild Added a nothreadsafe USE flags and set --enable-threadsafe by default.
Created attachment 45255 [details] sqlite-3.0.8-r1.ebuild (clean header) clean header added. sorry.
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.
>=dev-db/sqlite-3.0.8-r1 should be threadsafe by default now.