CLSQL uses functions that require 64-bit integer parameters and return values. The FFI in most CLSQL implementations do not support 64-bit integers. Thus, C helper libraries are required to break these 64-bit integers into two compatible 32-bit integers. The helper libraries reside in the directories uffi and db-mysql.
Files named Makefile.msvc are supplied for building the libraries under Microsoft Windows. Since Microsoft Windows does not come with that compiler, compiled DLL and LIB library files are supplied with CLSQL.
Files named Makefile are supplied for building the libraries under UNIX. Loading the .asd files automatically invokes make when necessary. So, manual building of the helper libraries is not necessary on most UNIX systems. However, the location of the MySQL library files and include files may need to adjusted in db-mysql/Makefile on non-Debian systems.
Unzip or untar the UFFI distribution which creates a directory for the UFFI files. Add that directory to ASDF's asdf:*central-registry*. You can do that by pushing the pathname of the directory onto this variable. The following example code assumes the UFFI files reside in the /usr/share/lisp/uffi/ directory.
(push #P"/usr/share/lisp/uffi/" asdf:*central-registry*) (asdf:operate 'asdf:load-op :uffi)
If you plan to use the clsql-postgresql-socket interface, you must load the md5 module. Unzip or untar the cl-md5 distribution, which creates a directory for the cl-md5 files. Add that directory to ASDF's asdf:*central-registry*. You can do that by pushing the pathname of the directory onto this variable. The following example code assumes the cl-md5 files reside in the /usr/share/lisp/cl-md5/ directory.
(push #P"/usr/share/lisp/cl-md5/" asdf:*central-registry*) (asdf:operate 'asdf:load-op :md5)
Unzip or untar the CLSQL distribution which creates a directory for the CLSQL files. Add that directory to ASDF's asdf:*central-registry*. You can do that by pushing the pathname of the directory onto this variable. The following example code assumes the CLSQL files reside in the /usr/share/lisp/clsql/ directory. You need to load, at a minimum, the main clsql system and at least one interface system. The below example show loading all CLSQL systems.
(push #P"/usr/share/lisp/clsql/" asdf:*central-repository*) (asdf:operate 'asdf:load-op 'clsql-base) ; base CLSQL package (asdf:operate 'asdf:load-op 'clsql-mysql) ; MySQL interface (asdf:operate 'asdf:load-op 'clsql-postgresql) ; PostgreSQL interface (asdf:operate 'asdf:load-op 'clsql-postgresql-socket) ; Socket PGSQL interface (asdf:operate 'asdf:load-op 'clsql-aodbc) ; Allegro ODBC interface (asdf:operate 'asdf:load-op 'clsql) ; main CLSQL package
After loading CLSQL, you can execute the test suite. A configuration file named .clsql-test.config must be created in your home directory. There are instructures on the format of that file in the tests/tests.lisp file in the CLSQL source directory. After creating that file, you can run the test suite with ASDF:
(asdf:operate 'asdf:test-op 'clsql)