S-MySQL Installation instructions. 1. Create a directory S-MySQL and untar the gzipped file inside it mkdir S-MySQL cd S-MySQL tar xzf /path/to/SMySQL_0.4.1.tar.gz 2. Create an S-Plus chapter with Splus CHAPTER 3. Edit the newly created "makefile" in step 2 above. a. Add the following 2 macros for MySQL libraries and include files (you may insert them right after, say, the line SHELL=/bin/sh) MYSQL_LIB_DIR = /usr/local/lib/mysql ## change as appropriate MYSQL_INC_DIR = /usr/local/include/mysql ## change as appropriate b. Edit the flags LOCAL_CFLAGS= and LOCAL_LIBS as follows: LOCAL_CFLAGS = -I$(MYSQL_INC_DIR) -DUSING_SPLUS=6 ## of 5, for Splus 5.x LOCAL_LIBS = -L$(MYSQL_LIB_DIR) -lmysqlclient 4. "Boot" the S-Plus chapter by typing (see p.233 in Chambers' Programming with Data): Splus make boot 5. Compile the C code Splus make S.so 6. Install the help pages cd help Splus HINSTALL ../.Data *.sgml cd .. Splus BUILD_JHELP S-MySQL 7. Depending on your MySQL setup, you may or may not need to include the MySQL lib directory in your LD_LIBRARY_PATH. The symptom is something like > library("S-MySQL") ... libmysqlclient.so: cannot open shared object file: No such file or directory To fix this, append the MySQL lib directory to the LD_LIBRARY_PATH shell variable before you invoke S-Plus, e.g., LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/mysql export LD_LIBRARY_PATH (you need to substitute /usr/local/lib/mysql with the directory where the file libmysqlclient.so resides).