I am not able to use luarocks to install luasql-mysql on an Ubuntu v8.04
(Hardy) server. I have installed the system version of
'libmysqlclient15-dev' and it installed the "mysql.h" header to
'/usr/include/mysql/mysql.h'. So luarocks is complaining that it can not
find 'mysql.h'.

  Error: Could not find expected file mysql.h for MYSQL -- you may have to
install MYSQL in your system and/or set the MYSQL_DIR variable

So I set an environment variable to "export MYSQL_DIR=/usr/include/mysql"
and that did not change anything.

When I change the downloaded .rockspec to

  external_dependencies = {
     MYSQL = {
        header = "mysql/mysql.h"  -- notice I added the 'mysql/' to this
line
     }
  }

I get further, but then gcc can't find 'mysql.h'.

    $ luarocks build luasql-mysql-2.2.0-1.rockspec
    gcc -O2 -I/usr/include/lua5.1 -c src/luasql.c -o src/luasql.o
-I/usr/include
    gcc -O2 -I/usr/include/lua5.1 -c src/ls_mysql.c -o src/ls_mysql.o
-I/usr/include
    src/ls_mysql.c:19:19: error: mysql.h: No such file or directory
    ...

So I edited the file 'ls_mysql.c' to #include “mysql/mysql.h” (line 19) and
everything build fine.

So what am I doing wrong? I am not familiar with how the luarocks internals
work, so I am sure that I can just run the "install" with some commandline
foo, but I can't figure it out. Thoughts?
-- 
Regards,
Ryan
_______________________________________________
Kepler-Project mailing list
Kepler-Project@lists.luaforge.net
http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project
http://www.keplerproject.org/

Reply via email to