Subject: | wrong sqlite header used when not using local compilation |
Hi,
Troublemaker here again :) Symptoms are:
t/01_compile.t ........................................ 1/3
# Failed test 'use DBD::SQLite;'
# at t/01_compile.t line 15.
# Tried to use 'DBD::SQLite'.
# Error: Can't load '/builds/vmarek/u-default/components/perl_modules/dbd-sqlite/build/i86-5.12/blib/arch/auto/DBD/SQLite/SQLite.so' for module DBD::SQLite: ld.so.1: perl: fatal: relocation error: file /builds/vmarek/u-default/components/perl_modules/dbd-sqlite/build/i86-5.12/blib/arch/auto/DBD/SQLite/SQLite.so: symbol sqlite3_strlike: referenced symbol not found at /usr/perl5/5.12/lib/i86pc-solaris-64int/DynaLoader.pm line 200.
etc.
The problem is that our local sqlite does not support 'sqlite3_strlike', because it's version older than 3.10.
I am attaching the patch I used to fix it, but this time it's under-engineered (not generic enough IMO).
Thank you
__
Vlad
Subject: | b.patch |
--- DBD-SQLite-1.50/dbdimp.h 2016-02-11 13:17:06.945836816 -0800
+++ DBD-SQLite-1.50/dbdimp.h 2016-02-11 13:14:59.701455209 -0800
@@ -3,7 +3,7 @@
#define _DBDIMP_H 1
#include "SQLiteXS.h"
-#include "sqlite3.h"
+#include <sqlite3.h>
#define MY_CXT_KEY "DBD::SQLite::_guts" XS_VERSION
--- DBD-SQLite-1.50/Makefile.PL 2016-02-11 13:32:46.853644151 -0800
+++ DBD-SQLite-1.50/Makefile.PL 2016-02-11 13:32:20.811032084 -0800
@@ -215,6 +215,9 @@ my @CC_INC = (
'-I.',
'-I$(DBI_INSTARCH_DIR)',
);
+if ( not $sqlite_local ) {
+ unshift @CC_INC, '-I/usr/include';
+}
if ( $sqlite_inc ) {
push @CC_INC, "-I$sqlite_inc";
}