References
- Mysql-proxy home
http://forge.mysql.com/wiki/MySQL_Proxy - Compiling from the development source tree
http://svn.mysql.com/svnpublic/mysql-proxy/trunk/INSTALL
These problems won't occure if you install binary-release mysql-proxy(of course), and then any problem won't occure too if you install libevent and lua dependency libraries by using yum.
If we want to install mysql-proxy, libevent and lua libraries manually, we need to use additional configure and compile options. In our environment, we install manually as follows.
/var/appsProblem1
+-->mysql-5.0 (mysql database engine)
+-->mysql-proxy-0.6.0 (mysql-proxy)
+-->libevent-1.3e (libevent-1.3e)
+-->lua-5.1.2 (lua-5.1.2)
- Description
While executing mysql-proxy configure command, following error occures.checking for LUA... checking for LUA... configure: error: Package requirements (lua5.1 >= 5.1) were not met:
No package 'lua5.1' found - Solution
System fails to find the lua's dependency files. We need to add following options when executing configure command.configure \
LUA_CFLAGS="-I/var/apps/lua-5.1.2/include/" \
LUA_LIBS="-L/var/apps/lua-5.1.2/lib/ -llua -ldl" \
.....
- Description
While executing mysql-proxy configure command, following error occures.configure: error: libevent is required
- Solution
This error occures when System fails to find the libevent library files. We need to add following options when executing configure command.configure \
....
LDFLAGS="-L/var/apps/libevent-1.3e/lib/ -lm" \
.....
- Description
While executing mysql-proxy make command, following error occures./var/apps/lua-5.1.2/lib/liblua.a(lvm.o)(.text+0xae2): In function `Arith':
lvm.c: undefined reference to `pow'
/var/apps/lua-5.1.2/lib/liblua.a(lvm.o)(.text+0x2053): In function `luaV_execute':
lvm.c: undefined reference to `pow'
/var/apps/lua-5.1.2/lib/liblua.a(lcode.o)(.text+0xf99): In function `codearith':
lcode.c: undefined reference to `pow'
/var/apps/lua-5.1.2/lib/liblua.a(lmathlib.o)(.text+0x3e): In function `math_sin':
lmathlib.c: undefined reference to `sin'
/var/apps/lua-5.1.2/lib/liblua.a(lmathlib.o)(.text+0x6e): In function `math_sinh':
lmathlib.c: undefined reference to `sinh'
/var/apps/lua-5.1.2/lib/liblua.a(lmathlib.o)(.text+0x9e): In function `math_cos':
lmathlib.c: undefined reference to `cos'
..... - Solution
We need to add following options when executing configure command. In this case, we need to configure with LDFLAGS option and execute make command again.configure \
....
LDFLAGS="-lm" \
....
- Description
While executing mysql-proxy make command, following error occures.mysql_proxy-network-mysqld-proxy.o(.text+0x7c): In function `proxy_lua_free_script':
/var/apps/dist/mysql-proxy-0.6.0/src/network-mysqld-proxy.c:215: undefined reference to `lua_type'
mysql_proxy-network-mysqld-proxy.o(.text+0x8f):/var/apps/dist/mysql-proxy-0.6.0/src/network-mysqld-proxy.c:216: undefined reference to `lua_settop'
mysql_proxy-network-mysqld-proxy.o(.text+0x97):/var/apps/dist/mysql-proxy-0.6.0/src/network-mysqld-proxy.c:218: undefined reference to `lua_gettop'
mysql_proxy-network-mysqld-proxy.o(.text+0xaf):/var/apps/dist/mysql-proxy-0.6.0/src/network-mysqld-proxy.c:220: undefined reference to `luaL_unref'
mysql_proxy-network-mysqld-proxy.o(.text+0xbe):/var/apps/dist/mysql-proxy-0.6.0/src/network-mysqld-proxy.c:225: undefined reference to `lua_gc'
mysql_proxy-network-mysqld-proxy.o(.text+0x18f): In function `plugin_srv_state_free':
/var/apps/dist/mysql-proxy-0.6.0/src/network-mysqld-proxy.c:408: undefined reference to `lua_close'
mysql_proxy-network-mysqld-proxy.o(.text+0x33d): In function `lua_load_script':
/var/apps/dist/mysql-proxy-0.6.0/src/network-mysqld-proxy.c:651: undefined reference to `luaL_loadfile'
mysql_proxy-network-mysqld-proxy.o(.text+0x36b):/var/apps/dist/mysql-proxy-0.6.0/src/network-mysqld-proxy.c:664: undefined reference to `lua_type'
mysql_proxy-network-mysqld-proxy.o(.text+0x3ad): In function `proxy_pool_queue_get':
/var/apps/dist/mysql-proxy-0.6.0/src/network-mysqld-proxy.c:675: undefined reference to `luaL_checkudata' - Solution
We need to add "-lua" option in LUA_LIBS when executing configure command. In this case, we need to configure with LUA option and execute make command again../configure \
....
LUA_CFLAGS="-I/var/apps/lua-5.1.2/include/" \
LUA_LIBS="-L/var/apps/lua-5.1.2/lib/ -llua -ldl" \
...
- Description
While executing mysql-proxy make command, following error occures./usr/bin/ld: cannot find -llua
collect2: ld returned 1 exit status
make[2]: *** [mysql-proxy] Error 1
make[2]: Leaving directory `/var/apps/dist/mysql-proxy-0.6.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/apps/dist/mysql-proxy-0.6.0'
make: *** [all] Error 2 - Solution
We need to add both -L and -lua options in LUA_LIBS when executing configure command. In this case, we need to configure with LDFLAGS option and execute make command again../configure \
...
LUA_LIBS="-L/var/apps/lua-5.1.2/lib/ -llua -ldl" \
...
- Description
While executing mysql-proxy configure command, following error occures.configure: error: mysql_config not exists or not executable, use $ ./configure --with-mysql=/path/to/mysql_config
- Solution
System needs to know the location of the mysql database library files. we need to add --with-mysql option and the vlaue of directory path stored mysql library files../configure \
....
--with-mysql=/var/apps/mysql-5.0 \
...
Totally, we need following options when executing configure command properly to compile mysql-proxy manually.
./configure \
LUA_CFLAGS="-I/var/apps/lua-5.1.2/include/" \
LUA_LIBS="-L/var/apps/lua-5.1.2/lib/ -llua -ldl" \
LDFLAGS="-L/var/apps/libevent-1.3e/lib/ -lm" \
--prefix=/var/apps/mysql-proxy-0.6.0 \
--with-mysql=/var/apps/mysql-5.0 \
--with-lua
0 件のコメント:
コメントを投稿