Sunday, February 02, 2020

Re: enable column metadata in databases/sqlite3

On Sun Jan 26, 2020 at 08:23:08AM +0100, Rafael Sadowski wrote:
> On Sun Jan 12, 2020 at 08:44:26AM +0100, Rafael Sadowski wrote:
> > For the upcoming Qt5 update I need sqlite3_column_table_name16:
> >
> > qhelpgenerator:/usr/local/lib/qt5/plugins/sqldrivers/libqsqlite.so: undefined symbol 'sqlite3_column_table_name16'
> > ld.so: qhelpgenerator: lazy binding failed!
> > Killed
> >
> > Turns out we're missing those symbols but installing the manpages
> > (SQLITE3_COLUMN_DATABASE_NAME(3)):
> >
> > objdump -tT /usr/local/lib/libsqlite3.so.37.8 | grep sqlite3_column_table
> >
> > The following diff enables column metadata:
> >
> > objdump -tT /usr/local/lib/libsqlite3.so.37.9 | grep sqlite3_column_table
> > 00000000000426b0 g F .text 0000000000000110 sqlite3_column_table_name
> > 00000000000427c0 g F .text 0000000000000110 sqlite3_column_table_name16
> > 00000000000427c0 g DF .text 0000000000000110 sqlite3_column_table_name16
> > 00000000000426b0 g DF .text 0000000000000110 sqlite3_column_table_name
> >
> > OK or is there any showstopper here?
> >
> > Rafael Sadowski
> >
> > Index: Makefile
> > ===================================================================
> > RCS file: /cvs/ports/databases/sqlite3/Makefile,v
> > retrieving revision 1.105
> > diff -u -p -u -p -r1.105 Makefile
> > --- Makefile 9 Nov 2019 10:09:04 -0000 1.105
> > +++ Makefile 12 Jan 2020 07:34:44 -0000
> > @@ -4,9 +4,10 @@ COMMENT= embedded SQL implementation
> >
> > DISTNAME = sqlite-autoconf-3300100
> > PKGNAME= sqlite3-3.30.1
> > +REVISION= 0
> >
> > # XXX needs bumps every time :-
> > -SHARED_LIBS += sqlite3 37.8 # 8.6
> > +SHARED_LIBS += sqlite3 37.9 # 8.6
> > # sqlite suggests that users might like to assert() that library and header
> > # versions match, so bumps are needed even if function signatures don't change.
> > # ... at the current time the only one noticed is a < check (in subversion)
> > @@ -34,7 +35,8 @@ CONFIGURE_ARGS += --enable-fts5
> > # for mozilla
> > CFLAGS+= -DSQLITE_ENABLE_UNLOCK_NOTIFY \
> > -DSQLITE_ENABLE_FTS3 \
> > - -DSQLITE_ENABLE_DBSTAT_VTAB
> > + -DSQLITE_ENABLE_DBSTAT_VTAB \
> > + -DSQLITE_ENABLE_COLUMN_METADATA=1
> >
> > # update p5-DBD-SQLite's Makefile.PL if enabling -DSQLITE_ENABLE_COLUMN_METADATA
> > BUILD_DEPENDS = converters/sqlite2mdoc
> >
>
> New diff includes p5-DBD-SQLite. I have no idea how to test this!?
> This must be enabled in any case, if we want to update Qt.
>
> OK? How do we do that? Bulk?

Friendly reminder
>
> RS
>
> Index: p5-DBD-SQLite/Makefile
> ===================================================================
> RCS file: /cvs/ports/databases/p5-DBD-SQLite/Makefile,v
> retrieving revision 1.42
> diff -u -p -r1.42 Makefile
> --- p5-DBD-SQLite/Makefile 12 Jul 2019 20:43:55 -0000 1.42
> +++ p5-DBD-SQLite/Makefile 26 Jan 2020 07:14:03 -0000
> @@ -6,7 +6,7 @@ MODULES= cpan
> DISTNAME= DBD-SQLite-1.50
> CATEGORIES= databases
> EPOCH= 0
> -REVISION= 1
> +REVISION= 2
>
> MAINTAINER= Robert Nagy <robert@openbsd.org>
>
> Index: p5-DBD-SQLite/patches/patch-Makefile_PL
> ===================================================================
> RCS file: /cvs/ports/databases/p5-DBD-SQLite/patches/patch-Makefile_PL,v
> retrieving revision 1.11
> diff -u -p -r1.11 patch-Makefile_PL
> --- p5-DBD-SQLite/patches/patch-Makefile_PL 24 Apr 2017 16:25:05 -0000 1.11
> +++ p5-DBD-SQLite/patches/patch-Makefile_PL 26 Jan 2020 07:14:03 -0000
> @@ -2,13 +2,9 @@ $OpenBSD: patch-Makefile_PL,v 1.11 2017/
>
> - Upstream forces use of bundled sqlite but we use the one from ports.
>
> -- Ports sqlite is built without -DSQLITE_ENABLE_COLUMN_METADATA;
> -DBD::SQLite uses this as a conditional in its own code as well in the built
> -copy of sqlite, so it needs to follow what's done in the sqlite build.
> -
> -
> ---- Makefile.PL.orig Thu Nov 5 05:26:07 2015
> -+++ Makefile.PL Mon Apr 24 17:20:34 2017
> +Index: Makefile.PL
> +--- Makefile.PL.orig
> ++++ Makefile.PL
> @@ -129,7 +129,7 @@ SCOPE: {
> # a system sqlite is also sophisticated enough to have a patching system
> # that can change the if ( 0 ) to if ( 1 )
> @@ -18,11 +14,3 @@ copy of sqlite, so it needs to follow wh
> require File::Spec;
> if ( $sqlite_base = (grep(/SQLITE_LOCATION=.*/, @ARGV))[0] ) {
> $sqlite_base =~ /=(.*)/;
> -@@ -223,7 +223,6 @@ my @CC_DEFINE = (
> - '-DSQLITE_ENABLE_FTS4', # for sqlite >= 3.7.4
> - '-DSQLITE_ENABLE_FTS3_PARENTHESIS', # for sqlite >= 3.6.10
> - '-DSQLITE_ENABLE_RTREE', # for sqlite >= 3.6.10
> -- '-DSQLITE_ENABLE_COLUMN_METADATA',
> - '-DSQLITE_ENABLE_STAT3', # for sqlite >= 3.7.9
> - '-DSQLITE_ENABLE_STAT4', # for sqlite >= 3.8.3.1
> - '-DSQLITE_ENABLE_JSON1', # for sqlite >= 3.9.0
> Index: sqlite3/Makefile
> ===================================================================
> RCS file: /cvs/ports/databases/sqlite3/Makefile,v
> retrieving revision 1.105
> diff -u -p -r1.105 Makefile
> --- sqlite3/Makefile 9 Nov 2019 10:09:04 -0000 1.105
> +++ sqlite3/Makefile 26 Jan 2020 07:14:04 -0000
> @@ -4,9 +4,10 @@ COMMENT= embedded SQL implementation
>
> DISTNAME = sqlite-autoconf-3300100
> PKGNAME= sqlite3-3.30.1
> +REVISION= 0
>
> # XXX needs bumps every time :-
> -SHARED_LIBS += sqlite3 37.8 # 8.6
> +SHARED_LIBS += sqlite3 37.9 # 8.6
> # sqlite suggests that users might like to assert() that library and header
> # versions match, so bumps are needed even if function signatures don't change.
> # ... at the current time the only one noticed is a < check (in subversion)
> @@ -34,9 +35,9 @@ CONFIGURE_ARGS += --enable-fts5
> # for mozilla
> CFLAGS+= -DSQLITE_ENABLE_UNLOCK_NOTIFY \
> -DSQLITE_ENABLE_FTS3 \
> - -DSQLITE_ENABLE_DBSTAT_VTAB
> + -DSQLITE_ENABLE_DBSTAT_VTAB \
> + -DSQLITE_ENABLE_COLUMN_METADATA=1
>
> -# update p5-DBD-SQLite's Makefile.PL if enabling -DSQLITE_ENABLE_COLUMN_METADATA
> BUILD_DEPENDS = converters/sqlite2mdoc
> post-install:
> ${INSTALL_DATA_DIR} ${PREFIX}/man/man3
>

No comments:

Post a Comment