Skip Menu |

This queue is for tickets about the DBD-SQLite CPAN distribution.

Report information
The Basics
Id: 61361
Status: resolved
Priority: 0/
Queue: DBD-SQLite

People
Owner: Nobody in particular
Requestors: paul [...] city-fan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Problems building 1.31 with system SQLite
A couple of issues came up whilst trying to build DBD-SQLite with an existing SQLite installation (after patching the "if (0)" to "if (1)" in Makefile.PL of course): 1. The addition of "-I." to the compiler flags in Makefile.PL means that the bundled "sqlite3.h" is used even when building with the system SQLite version. This may cause some strange behaviour where the system version is only slightly different, or it may cause complete failure of the module if for instance the system version is older than 3.6.23, when this happens in the test suite: # Failed test 'use DBD::SQLite;' # at t/01_compile.t line 15. # Tried to use 'DBD::SQLite'. # Error: Can't load '/builddir/build/BUILD/DBD-SQLite-1.31/blib/arch/auto/DBD/SQLite/SQLite.so' for module DBD::SQLite: /builddir/build/BUILD/DBD-SQLite-1.31/blib/arch/auto/DBD/SQLite/SQLite.so: undefined symbol: sqlite3_compileoption_get at /usr/lib64/perl5/DynaLoader.pm line 200. # at (eval 7) line 2 # Compilation failed in require at (eval 7) line 2. # BEGIN failed--compilation aborted at (eval 7) line 2. # $DBI::VERSION=1.613 Use of inherited AUTOLOAD for non-method DBD::SQLite::compile_options() is deprecated at t/01_compile.t line 20. Can't locate auto/DBD/SQLite/compile_opt.al in @INC (@INC contains: inc /builddir/build/BUILD/DBD-SQLite-1.31/blib/lib /builddir/build/BUILD/DBD-SQLite-1.31/blib/arch /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/local/share/perl5 /usr/lib64/perl5 /usr/share/perl5 /usr/share/perl5 /usr/lib64/perl5 /usr/share/perl5 /usr/local/lib64/perl5/site_perl/5.10.0/x86_64-linux-thread-multi /usr/local/lib/perl5/site_perl/5.10.0 /usr/lib64/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl /usr/lib/perl5/site_perl .) at t/01_compile.t line 20 # Looks like you failed 1 test of 3. # Looks like your test exited with 2 just after 3. t/01_compile.t ........................... Dubious, test returned 2 (wstat 512, 0x200) Failed 1/3 subtests This is because the bundled sqlite3.h says that SQLITE_VERSION_NUMBER is 3007002 and hence sqlite3_compileoption_get should be available but it's not present in the actual library so module loading fails. I worked around this by deleting the bundled sqlite3.c, sqlite3.h and sqlite3ext.h before running Makefile.PL. 2. If the existing SQLite wasn't built with the ENABLE_FTS3_PARENTHESIS option enabled, the test suite fails: # Failed test 'moutons NOT lait (unicode is 0)' # at t/43_fts3.t line 98. # Structures begin differing at: # $got->[0] = Does not exist # $expected->[0] = '2' # Failed test '(il OR elle) AND un* (unicode is 0)' # at t/43_fts3.t line 98. # Structures begin differing at: # $got->[0] = Does not exist # $expected->[0] = '1' # Failed test 'moutons NOT lait (unicode is 1)' # at t/43_fts3.t line 98. # Structures begin differing at: # $got->[0] = Does not exist # $expected->[0] = '2' # Failed test '(il OR elle) AND un* (unicode is 1)' # at t/43_fts3.t line 98. # Structures begin differing at: # $got->[0] = Does not exist # $expected->[0] = '1' # Looks like you failed 4 tests of 19. t/43_fts3.t .............................. Dubious, test returned 4 (wstat 1024, 0x400) Failed 4/19 subtests The SQLite in Fedora is affected by this issue for instance. Attached patch resolves that problem.
Subject: DBD-SQLite-1.31-FTS3.patch
--- DBD-SQLite-1.31/t/43_fts3.t 2010-09-15 08:16:43.000000000 +0100 +++ DBD-SQLite-1.31/t/43_fts3.t 2010-09-15 14:50:58.529161202 +0100 @@ -90,6 +90,11 @@ } # queries +SKIP: { + skip "These tests require SQLite compiled with ENABLE_FTS3_PARENTHESIS option", scalar @tests + unless DBD::SQLite->can('compile_options') && + grep /ENABLE_FTS3_PARENTHESIS/, DBD::SQLite::compile_options(); + my $sql = "SELECT docid FROM try_fts3 WHERE content MATCH ?"; for my $t (@tests) { my ($query, @expected) = @$t; @@ -97,6 +102,9 @@ my $results = $dbh->selectcol_arrayref($sql, undef, $query); is_deeply($results, \@expected, "$query (unicode is $use_unicode)"); } + +} + }
As for the first issue, we expect anyone sophisticated enough to use a system sqlite is also sophisticated enough to have a system that can remove bundled sqlite source files, as noted in the Makefile.PL (with slight modification :) As for the second issue, I applied your patch to the trunk. Thanks, Kenichi On Wed Sep 15 11:51:38 2010, paul@city-fan.org wrote: Show quoted text
> A couple of issues came up whilst trying to build DBD-SQLite with an > existing SQLite installation (after patching the "if (0)" to "if (1)"
in Show quoted text
> Makefile.PL of course): > > 1. The addition of "-I." to the compiler flags in Makefile.PL means
that Show quoted text
> the bundled "sqlite3.h" is used even when building with the system > SQLite version. This may cause some strange behaviour where the system > version is only slightly different, or it may cause complete failure
of Show quoted text
> the module if for instance the system version is older than 3.6.23,
when Show quoted text
> this happens in the test suite: > > # Failed test 'use DBD::SQLite;' > # at t/01_compile.t line 15. > # Tried to use 'DBD::SQLite'. > # Error: Can't load > '/builddir/build/BUILD/DBD-SQLite-1.31/blib/arch/auto/DBD/SQLite/
SQLite.so' Show quoted text
> for module DBD::SQLite: > /builddir/build/BUILD/DBD-SQLite-1.31/blib/arch/auto/DBD/SQLite/
SQLite.so: Show quoted text
> undefined symbol: sqlite3_compileoption_get at > /usr/lib64/perl5/DynaLoader.pm line 200. > # at (eval 7) line 2 > # Compilation failed in require at (eval 7) line 2. > # BEGIN failed--compilation aborted at (eval 7) line 2. > # $DBI::VERSION=1.613 > Use of inherited AUTOLOAD for non-method DBD::SQLite::compile_options
() Show quoted text
> is deprecated at t/01_compile.t line 20. > Can't locate auto/DBD/SQLite/compile_opt.al in @INC (@INC contains:
inc Show quoted text
> /builddir/build/BUILD/DBD-SQLite-1.31/blib/lib > /builddir/build/BUILD/DBD-SQLite-1.31/blib/arch /usr/local/lib64/perl5 > /usr/local/share/perl5 /usr/local/share/perl5 /usr/lib64/perl5 > /usr/share/perl5 /usr/share/perl5 /usr/lib64/perl5 /usr/share/perl5 > /usr/local/lib64/perl5/site_perl/5.10.0/x86_64-linux-thread-multi > /usr/local/lib/perl5/site_perl/5.10.0 > /usr/lib64/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi > /usr/lib/perl5/vendor_perl /usr/lib/perl5/site_perl .) at
t/01_compile.t Show quoted text
> line 20 > # Looks like you failed 1 test of 3. > # Looks like your test exited with 2 just after 3. > t/01_compile.t ........................... > Dubious, test returned 2 (wstat 512, 0x200) > Failed 1/3 subtests > > This is because the bundled sqlite3.h says that SQLITE_VERSION_NUMBER
is Show quoted text
> 3007002 and hence sqlite3_compileoption_get should be available but
it's Show quoted text
> not present in the actual library so module loading fails. > > I worked around this by deleting the bundled sqlite3.c, sqlite3.h and > sqlite3ext.h before running Makefile.PL. > > 2. If the existing SQLite wasn't built with the
ENABLE_FTS3_PARENTHESIS Show quoted text
> option enabled, the test suite fails: > > # Failed test 'moutons NOT lait (unicode is 0)' > # at t/43_fts3.t line 98. > # Structures begin differing at: > # $got->[0] = Does not exist > # $expected->[0] = '2' > # Failed test '(il OR elle) AND un* (unicode is 0)' > # at t/43_fts3.t line 98. > # Structures begin differing at: > # $got->[0] = Does not exist > # $expected->[0] = '1' > # Failed test 'moutons NOT lait (unicode is 1)' > # at t/43_fts3.t line 98. > # Structures begin differing at: > # $got->[0] = Does not exist > # $expected->[0] = '2' > # Failed test '(il OR elle) AND un* (unicode is 1)' > # at t/43_fts3.t line 98. > # Structures begin differing at: > # $got->[0] = Does not exist > # $expected->[0] = '1' > # Looks like you failed 4 tests of 19. > t/43_fts3.t .............................. > Dubious, test returned 4 (wstat 1024, 0x400) > Failed 4/19 subtests > > The SQLite in Fedora is affected by this issue for instance. > > Attached patch resolves that problem.
Subject: Re: [rt.cpan.org #61361] Problems building 1.31 with system SQLite
Date: Thu, 16 Sep 2010 17:44:14 +1000
To: bug-DBD-SQLite [...] rt.cpan.org
From: Adam Kennedy <adamkennedybackup [...] gmail.com>
For the record, I don't consider this important enough to warrant a new release unless I see complaints for several different distro packagers. Adam K On 16 September 2010 17:17, Kenichi Ishigaki via RT <bug-DBD-SQLite@rt.cpan.org> wrote: Show quoted text
>       Queue: DBD-SQLite >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=61361 > > > As for the first issue, we expect anyone sophisticated enough to use a > system sqlite is also sophisticated enough to have a system that can > remove bundled sqlite source files, as noted in the Makefile.PL (with > slight modification :) > > As for the second issue, I applied your patch to the trunk. > > Thanks, > > Kenichi > > On Wed Sep 15 11:51:38 2010, paul@city-fan.org wrote:
>> A couple of issues came up whilst trying to build DBD-SQLite with an >> existing SQLite installation (after patching the "if (0)" to "if (1)"
> in
>> Makefile.PL of course): >> >> 1. The addition of "-I." to the compiler flags in Makefile.PL means
> that
>> the bundled "sqlite3.h" is used even when building with the system >> SQLite version. This may cause some strange behaviour where the system >> version is only slightly different, or it may cause complete failure
> of
>> the module if for instance the system version is older than 3.6.23,
> when
>> this happens in the test suite: >> >> #   Failed test 'use DBD::SQLite;' >> #   at t/01_compile.t line 15. >> #     Tried to use 'DBD::SQLite'. >> #     Error:  Can't load >> '/builddir/build/BUILD/DBD-SQLite-1.31/blib/arch/auto/DBD/SQLite/
> SQLite.so'
>> for module DBD::SQLite: >> /builddir/build/BUILD/DBD-SQLite-1.31/blib/arch/auto/DBD/SQLite/
> SQLite.so:
>> undefined symbol: sqlite3_compileoption_get at >> /usr/lib64/perl5/DynaLoader.pm line 200. >> #  at (eval 7) line 2 >> # Compilation failed in require at (eval 7) line 2. >> # BEGIN failed--compilation aborted at (eval 7) line 2. >> # $DBI::VERSION=1.613 >> Use of inherited AUTOLOAD for non-method DBD::SQLite::compile_options
> ()
>> is deprecated at t/01_compile.t line 20. >> Can't locate auto/DBD/SQLite/compile_opt.al in @INC (@INC contains:
> inc
>> /builddir/build/BUILD/DBD-SQLite-1.31/blib/lib >> /builddir/build/BUILD/DBD-SQLite-1.31/blib/arch /usr/local/lib64/perl5 >> /usr/local/share/perl5 /usr/local/share/perl5 /usr/lib64/perl5 >> /usr/share/perl5 /usr/share/perl5 /usr/lib64/perl5 /usr/share/perl5 >> /usr/local/lib64/perl5/site_perl/5.10.0/x86_64-linux-thread-multi >> /usr/local/lib/perl5/site_perl/5.10.0 >> /usr/lib64/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi >> /usr/lib/perl5/vendor_perl /usr/lib/perl5/site_perl .) at
> t/01_compile.t
>> line 20 >> # Looks like you failed 1 test of 3. >> # Looks like your test exited with 2 just after 3. >> t/01_compile.t ........................... >> Dubious, test returned 2 (wstat 512, 0x200) >> Failed 1/3 subtests >> >> This is because the bundled sqlite3.h says that SQLITE_VERSION_NUMBER
> is
>> 3007002 and hence sqlite3_compileoption_get should be available but
> it's
>> not present in the actual library so module loading fails. >> >> I worked around this by deleting the bundled sqlite3.c, sqlite3.h and >> sqlite3ext.h before running Makefile.PL. >> >> 2. If the existing SQLite wasn't built with the
> ENABLE_FTS3_PARENTHESIS
>> option enabled, the test suite fails: >> >> #   Failed test 'moutons NOT lait (unicode is 0)' >> #   at t/43_fts3.t line 98. >> #     Structures begin differing at: >> #          $got->[0] = Does not exist >> #     $expected->[0] = '2' >> #   Failed test '(il OR elle) AND un* (unicode is 0)' >> #   at t/43_fts3.t line 98. >> #     Structures begin differing at: >> #          $got->[0] = Does not exist >> #     $expected->[0] = '1' >> #   Failed test 'moutons NOT lait (unicode is 1)' >> #   at t/43_fts3.t line 98. >> #     Structures begin differing at: >> #          $got->[0] = Does not exist >> #     $expected->[0] = '2' >> #   Failed test '(il OR elle) AND un* (unicode is 1)' >> #   at t/43_fts3.t line 98. >> #     Structures begin differing at: >> #          $got->[0] = Does not exist >> #     $expected->[0] = '1' >> # Looks like you failed 4 tests of 19. >> t/43_fts3.t .............................. >> Dubious, test returned 4 (wstat 1024, 0x400) >> Failed 4/19 subtests >> >> The SQLite in Fedora is affected by this issue for instance. >> >> Attached patch resolves that problem.
> > > >
DBD::SQLite 1.32_01 with your patch is out. Thanks. On 2010-9-16 Thu 03:17:43, ISHIGAKI wrote: Show quoted text
> As for the first issue, we expect anyone sophisticated enough to use
a Show quoted text
> system sqlite is also sophisticated enough to have a system that can > remove bundled sqlite source files, as noted in the Makefile.PL (with > slight modification :) > > As for the second issue, I applied your patch to the trunk. > > Thanks, > > Kenichi > > On Wed Sep 15 11:51:38 2010, paul@city-fan.org wrote:
> > A couple of issues came up whilst trying to build DBD-SQLite with an > > existing SQLite installation (after patching the "if (0)" to "if
(1)" Show quoted text
> in
> > Makefile.PL of course): > > > > 1. The addition of "-I." to the compiler flags in Makefile.PL means
> that
> > the bundled "sqlite3.h" is used even when building with the system > > SQLite version. This may cause some strange behaviour where the
system Show quoted text
> > version is only slightly different, or it may cause complete
failure Show quoted text
> of
> > the module if for instance the system version is older than 3.6.23,
> when
> > this happens in the test suite: > > > > # Failed test 'use DBD::SQLite;' > > # at t/01_compile.t line 15. > > # Tried to use 'DBD::SQLite'. > > # Error: Can't load > > '/builddir/build/BUILD/DBD-SQLite-1.31/blib/arch/auto/DBD/SQLite/
> SQLite.so'
> > for module DBD::SQLite: > > /builddir/build/BUILD/DBD-SQLite-1.31/blib/arch/auto/DBD/SQLite/
> SQLite.so:
> > undefined symbol: sqlite3_compileoption_get at > > /usr/lib64/perl5/DynaLoader.pm line 200. > > # at (eval 7) line 2 > > # Compilation failed in require at (eval 7) line 2. > > # BEGIN failed--compilation aborted at (eval 7) line 2. > > # $DBI::VERSION=1.613 > > Use of inherited AUTOLOAD for non-method
DBD::SQLite::compile_options Show quoted text
> ()
> > is deprecated at t/01_compile.t line 20. > > Can't locate auto/DBD/SQLite/compile_opt.al in @INC (@INC contains:
> inc
> > /builddir/build/BUILD/DBD-SQLite-1.31/blib/lib > > /builddir/build/BUILD/DBD-SQLite-1.31/blib/arch /usr/local/lib64/
perl5 Show quoted text
> > /usr/local/share/perl5 /usr/local/share/perl5 /usr/lib64/perl5 > > /usr/share/perl5 /usr/share/perl5 /usr/lib64/perl5 /usr/share/perl5 > > /usr/local/lib64/perl5/site_perl/5.10.0/x86_64-linux-thread-multi > > /usr/local/lib/perl5/site_perl/5.10.0 > > /usr/lib64/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi > > /usr/lib/perl5/vendor_perl /usr/lib/perl5/site_perl .) at
> t/01_compile.t
> > line 20 > > # Looks like you failed 1 test of 3. > > # Looks like your test exited with 2 just after 3. > > t/01_compile.t ........................... > > Dubious, test returned 2 (wstat 512, 0x200) > > Failed 1/3 subtests > > > > This is because the bundled sqlite3.h says that
SQLITE_VERSION_NUMBER Show quoted text
> is
> > 3007002 and hence sqlite3_compileoption_get should be available but
> it's
> > not present in the actual library so module loading fails. > > > > I worked around this by deleting the bundled sqlite3.c, sqlite3.h
and Show quoted text
> > sqlite3ext.h before running Makefile.PL. > > > > 2. If the existing SQLite wasn't built with the
> ENABLE_FTS3_PARENTHESIS
> > option enabled, the test suite fails: > > > > # Failed test 'moutons NOT lait (unicode is 0)' > > # at t/43_fts3.t line 98. > > # Structures begin differing at: > > # $got->[0] = Does not exist > > # $expected->[0] = '2' > > # Failed test '(il OR elle) AND un* (unicode is 0)' > > # at t/43_fts3.t line 98. > > # Structures begin differing at: > > # $got->[0] = Does not exist > > # $expected->[0] = '1' > > # Failed test 'moutons NOT lait (unicode is 1)' > > # at t/43_fts3.t line 98. > > # Structures begin differing at: > > # $got->[0] = Does not exist > > # $expected->[0] = '2' > > # Failed test '(il OR elle) AND un* (unicode is 1)' > > # at t/43_fts3.t line 98. > > # Structures begin differing at: > > # $got->[0] = Does not exist > > # $expected->[0] = '1' > > # Looks like you failed 4 tests of 19. > > t/43_fts3.t .............................. > > Dubious, test returned 4 (wstat 1024, 0x400) > > Failed 4/19 subtests > > > > The SQLite in Fedora is affected by this issue for instance. > > > > Attached patch resolves that problem.
> >