Hi, list! Just a quick note on how I managed to install luasql-mysql rock on OS X 10.6 with mysqlclient installed from MacPorts. Perhaps it would be helpful to someone else.
Problems: 1. LuaRocks doesn't want to find mysqlclient by itself and suggests to override wrong variable: MYSQL_DIR. I had to override MYSQL_LIBDIR and MYSQL_INCDIR instead. 2. The rockspec specifies wrong build flags. On OS X one should not specify -lcrypt and -lnsl. So, I had to download http://luarocks.luaforge.net/rocks-cvs/luasql-mysql-cvs-1.rockspec and replace LIB_OPTION = "$(LIBFLAG) -L$(MYSQL_LIBDIR) -lmysqlclient -lz -lcrypt -lnsl -lm", with LIB_OPTION = "$(LIBFLAG) -L$(MYSQL_LIBDIR) -lmysqlclient -lz -lm", After that, luasql-mysql rock was successfully installed as follows: $ sudo luarocks MYSQL_LIBDIR=/opt/local/lib/mysql5/mysql MYSQL_INCDIR=/opt/local/include/mysql5 install ./luasql-mysql-cvs-1.rockspec 3. A side note: MySQL test is broken, as it expects wrong kind of string escaping. For MySQL instead of function escape () assert2 ("a''b''c''d", CONN:escape"a'b'c'd") end it should say function escape () assert2 ([[a\'b\'c\'d]], CONN:escape"a'b'c'd") end HTH, Alexander. _______________________________________________ Kepler-Project mailing list [email protected] http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project http://www.keplerproject.org/
