[Previous] [Next] [Contents]

It is recommended to take ready to launch binary distribution instead of compiling EasySQL by yourself. But if you want to make it by yourself or have an OS for which there is no binaries this sections is for you.

To build EasySQL from sources you will need to complete following steps:

  1. download sources and unpack it.
  2. cd to directory, which was created by unpacking.
  3. edit `Config.subst' file.
  4. type `./configure' and answer all questions.
  5. type `make all' (if your native `make' is GNU-make (ie under the Linux) you have to install and use `pmake' or any other BSD derived/compatible version of make).
  6. if all compiled Ok, type `make dist' or `make install'.
  7. for final installation and configuration tips refer to binary distribution installation.

You should have no problem compiling EasySQL on modern Posix-aware UNIX-like OS's. If you have any problems or questions - ask your question by e-mail < am@amsoft.ru>. EasySQL related mailing lists may be a good source of information too.

Warning: In current release of EasySQL a lot of warnings are generated when building shared drivers. Do not be alarmed by this - it is expected, I'm all ears to know how to avoid that warnings. Example:

...
c++ -I../include -I/usr/local/mysql/include -fPIC -DDYNAMIC_DRV -c
    -o mysql.rso mysql.C
ld -L/usr/local/mysql/lib/mysql -o mysql.so mysql.rso ../../src/libeasysql.a
   -Bshareable -s -lmysqlclient -lm
ld: ../../src/libeasysql.a(errors.o):
     RRS text relocation at 0xa5c for "_easysql_log__FUiPCce"
ld: ../../src/libeasysql.a(errors.o):
     RRS text relocation at 0xa32 for "__easysql_realloc__FPvUl"
ld: ../../src/libeasysql.a(errors.o):
     RRS text relocation at 0xa15 for "_vsnprintf"
...

FYI, EasySQL is being developed under FreeBSD (version 2.2.1 for now) and it is tested by author only under FreeBSD and Linux (Redhat 4.2).

If you have ported EasySQL to any new OS it is suggested to send patches (or whole changed tar ball, but patches are preferred) to Andrew Maltsev, the author.

There is not very much to say about binary distribution installation process. Just download and unpack it. Usual and recommended location for EasySQL root directory is `/usr/local/easysql'.

Take care about access rights -- all directories and files should be readable by anybody. It is recommended also to make a symbolic link from `/usr/include/easysql' to `include' subdirectory of where you had installed EasySQL.

When located at default location mentioned above EasySQL should work without any additional configuration steps. Try to issue the following commands and compare results:

bash# /usr/local/easysql/bin/ck_static null
Driver info:   `null 1.0alpha.4'
Driver status: ``null' driver is always ready to do fake operations :)'
Driver info:   `null 1.0alpha.4'
Driver status: ``null' driver is always ready to do fake operations :)'
Escaping: `1234' ->> `1234'
Escaping: `1'2"3\4' ->> `1\'2"3\\4'
Escaping: `áÂ×ÇÄ' ->> `áÂ×ÇÄ'
Query results:
`null-test'
`null-test'
`null-test'

bash# /usr/local/easysql/bin/ck_dynamic null
Driver info:   `null 1.0alpha.4'
Driver status: ``null' driver is always ready to do fake operations :)'
Driver info:   `null 1.0alpha.4'
Driver status: ``null' driver is always ready to do fake operations :)'
Escaping: `1234' ->> `1234'
Escaping: `1'2"3\4' ->> `1\'2"3\\4'
Escaping: `áÂ×ÇÄ' ->> `áÂ×ÇÄ'
Query results:
`null-test'
`null-test'
`null-test'


[Previous] [Next] [Contents]