I recently had to test an application of the sqlite3 module and when I first ran the application, it complained about not being able to find the library.
Here is the code from the module that contains various possible locations of where the library could be, and uses that to check one-by-one if they exist on the system.
Code: Select all
; set library to path-name of the library on your platform OS
;
(set 'files (list
"/usr/lib/libsqlite3.so" ; SuSE Linux
"/usr/local/lib/libsqlite3.so" ; Linux, BSD, Solaris
"/usr/pkg/lib/libsqlite3.so" ; NetBSD
"/usr/local/lib/libsqlite3.so.13.3" ; OpenBSD 4.6
"/usr/lib/libsqlite3.0.dylib" ; Mac OSX Darwin
"/usr/lib64/libsqlite3.so" ; for 64Bit CentOS 6 Linux
(string (env "PROGRAMFILES") "/sqlite3/sqlite3.dll") ; Win32/MinGW
))
(set 'library (files (or
(find true (map file? files))
(throw-error "cannot find sqlite3 library"))))
Code: Select all
$ git diff HEAD^ HEAD
diff --git a/modules/sqlite3.lsp b/modules/sqlite3.lsp
index 66b8b2c..c53a798 100644
--- a/modules/sqlite3.lsp
+++ b/modules/sqlite3.lsp
@@ -87,6 +87,7 @@
"/usr/local/lib/libsqlite3.so.13.3" ; OpenBSD 4.6
"/usr/lib/libsqlite3.0.dylib" ; Mac OSX Darwin
"/usr/lib64/libsqlite3.so" ; for 64Bit CentOS 6 Linux
+ "/usr/lib/x86_64-linux-gnu/libsqlite3.so" ; for Ubuntu 12.04
(string (env "PROGRAMFILES") "/sqlite3/sqlite3.dll") ; Win32/MinGW
))