FS#21508 - [sqlite3] Using the complete source tree is now deprecated, please use the amalgamation.

Attached to Project: Arch Linux
Opened by ezzetabi (ezzetabi) - Thursday, 28 October 2010, 12:35 GMT
Last edited by Andreas Radke (AndyRTR) - Saturday, 12 February 2011, 23:40 GMT
Task Type Feature Request
Category Packages: Core
Status Closed
Assigned To Andreas Radke (AndyRTR)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Using configure and Makefile of sqlite3 is now deprecated. The official
package should use the the amalgamation.
I quote the official download page:

``This [the amalgamation] is the recommended way of acquiring the SQLite source code.
It is suggested that you use this packing option unless you have a compelling reason
to use one of the other packaging options below.''
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Saturday, 12 February 2011, 23:40 GMT
Reason for closing:  Fixed
Comment by Andreas Radke (AndyRTR) - Saturday, 30 October 2010, 15:51 GMT
Will this still allow to use additional compiler flags for further features? See our PKGBUILD and pending https://bugs.archlinux.org/task/20797 request.

Can you provide a PKGBUILD?
Comment by ezzetabi (ezzetabi) - Sunday, 31 October 2010, 08:40 GMT
The compiler flags work exactly the same way in the amalgamation and in the source tree.
There is a difference in the configure file, those options are unknown:
--enable-threads-override-locks, --enable-cross-thread-connections and --enable-load-extension.

On the other hand the sqlite download page states:
``The Makefile and configure script in this [source tree] tarball are not supported. The SQLite developers do not use them. You should not use them either.'';
so I assume the configure in the amalgamation is meant to be the correct one.

I enclosed a sample PKGBUILD to this message.
Edit: I used the .tar.gz source, even if is is larger than the .zip file to reduce the build-time deps. If the unzip dep is not a problem, you should use the .zip.
   PKGBUILD (1.3 KiB)
Comment by Andreas Radke (AndyRTR) - Friday, 10 December 2010, 18:36 GMT
Sorry. But I think the amalagamation doesn't seem to give us enough flexibility to build what we want. Because we want tcl support please look at my attempt. I only get one single library that is renamed, no headers and no man-page, some configure options I couldn't find in the .c file to export.

It would need further improvements to achive the currents state. And it would probably require a full rebuild because the lib is renamed. Maybe you want to fix it so checkpkg won't find any difference.
Comment by ezzetabi (ezzetabi) - Sunday, 12 December 2010, 11:01 GMT
At the moment pacman -Qql sqlite3 gives this list (directories omitted):
/usr/bin/sqlite3
/usr/include/sqlite3.h
/usr/include/sqlite3ext.h
/usr/lib/libsqlite3.so
/usr/lib/libsqlite3.so.0
/usr/lib/libsqlite3.so.0.8.6
/usr/lib/pkgconfig/sqlite3.pc
/usr/lib/tcl8.5/sqlite3/libtclsqlite3.so
/usr/lib/tcl8.5/sqlite3/pkgIndex.tcl
/usr/share/licenses/sqlite3/license.txt
/usr/share/man/man1/sqlite3.1.gz

With the tea amalgamation you obtain pkgIndex.tcl, libsqlite3.7.4.so
and a man page mann/sqlite3.n.gz .

Instead with the autoconf amalgamation you get the command line interface sqlite3.
The static (libsqlite3.a) and dynamic (libsqlite3.so.0 libsqlite3.so.0.8.6
libsqlite3.so) libraries, the headers (sqlite3.h sqlite3ext.h). The man
page and the sqlite3.pc file.

So if I understand the problem correctly you need both the source file
to make the library as is now.

See this PKGBUILD.
   PKGBUILD (1.8 KiB)
Comment by Andreas Radke (AndyRTR) - Sunday, 12 December 2010, 13:24 GMT
Looks like a possible solution. But what gain do we get? We loose the ability to give additional configure switches the we and Fedora still use. Only gentoo so far offers the amalgamation use.
Comment by ezzetabi (ezzetabi) - Sunday, 12 December 2010, 17:41 GMT
I am reasonably sure that is the sqlite3 authors themselves say to use the amalgamation there must be a reason; they state there is a better compilation thanks to easier optimizations.
The additional configure switches you mention are marked by the authors as unsupported and not used. The official documentation says explicitly you should not use the configure we (and according to you, Fedora) use now and to hand-edit the template Makefile. Maybe it is the same, but as far the official documentation says it is a chance.
Comment by Andreas Radke (AndyRTR) - Tuesday, 01 February 2011, 19:15 GMT
I've put an amalgamation based pkg to testing right now. Please give it a try and report if anything is broken.
Comment by ezzetabi (ezzetabi) - Wednesday, 02 February 2011, 08:47 GMT
It works fine to me, as far I can tell. Maybe you want to add -O2 or -Os in the CFLAGS or enable FTS4 instead of 3... but it also works fine as it is.

http://www.sqlite.org/fts3.html#section_1
Comment by Andreas Radke (AndyRTR) - Saturday, 12 February 2011, 23:40 GMT
The build uses our common CFLAGS optimization.

....-DSQLITE_ENABLE_RTREE -march=x86-64 -mtune=generic -O2 -pipe -DSQLITE_ENABLE_FTS3=1....

Loading...