Compiling DBD::SQLite 1.14 on cygwin

When trying to build DBD::SQLite for Cygwin I ran into test suite errors:
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/06error.t 0 139 2 2 100.00% 2
t/07busy.t 0 139 8 8 100.00% 5-8
t/08create_function.t 0 139 18 26 144.44% 6-18
t/70schemachange.t 9 1 11.11% 8
Failed 4/29 test scripts, 86.21% okay. 19/463 subtests failed, 95.90% okay.

Here's how I fixed or worked around them.

Solution Part 1: USE_LOCAL_SQLITE


Delving into Makefile.PL prompted me to try this command:
make clean; perl Makefile.PL USE_LOCAL_SQLITE=1
This didn't take care of all the errors, but it was a start:
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/70schemachange.t 9 1 11.11% 8
Failed 1/29 test scripts, 96.55% okay. 1/463 subtests failed, 99.78% okay.
This doesn't really make sense to me, since I have a local SQLite installed in /usr/lib/, and this command appears to rebuild the SQLite library from the source included in the DBD::SQLite distro.

Solution Part 2: The patch


Looking at the other bugs on rt.cpan.org I came across http://rt.cpan.org/Public/Bug/Display.html?id=29519, which contained a patch that made the t/70schemachange.t test pass:
% patch t/70schemachange.t sqlite.patch
patching file t/70schemachange.t
% make test
/usr/bin/perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00basic...............ok
t/01logon...............ok
t/02cr_table............ok
t/03insert..............ok
t/04select..............ok
t/05tran................ok
t/06error...............ok
t/07busy................ok
t/08create_function.....ok
t/09create_aggregate....ok
t/10dsnlist.............ok
t/11unicode.............ok
t/20createdrop..........ok
t/30insertfetch.........ok
t/40bindparam...........ok
t/40blobs...............ok
t/40blobtext............ok
t/40listfields..........ok
t/40nulls...............ok
t/40numrows.............ok
t/40prepcached..........ok
t/50chopblanks..........ok
t/50commit..............ok
t/60metadata............ok
t/70schemachange........ok
t/90cppcomments.........ok
t/99cleanup.............ok
t/ak-dbd................ok
t/dbdadmin..............ok
All tests successful.
Files=29, Tests=465, 25 wallclock secs ( 5.80 cusr + 4.18 csys = 9.98 CPU)
And that is all. I'll follow up here or on use.perl should I learn more.

Comments

rp said…
I had exactly this problem and your posting has resolved it for me. I've actually used it twice, on different machines.

Thanks a lot!

Popular Posts