Bug #32846 Can't build mysql-gui-common on debian unstable
Submitted: 29 Nov 2007 14:31 Modified: 8 Jul 2009 11:31
Reporter: Hartmut Holzgraefe Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL GUI Common Severity:S3 (Non-critical)
Version:5.0r12 OS:Any
Assigned to: CPU Architecture:Any
Triage: D2 (Serious)

[29 Nov 2007 14:31] Hartmut Holzgraefe
Description:
Debian unstable comes with Lua 4.0, 5.0 and 5.1, 5.1 being the default.

The older versions are configured with a "50" suffix.

I can fix the include path using 

  --with-lua-includes

but linking fails as all lua library versions are installed in the same directoy
/usr/libs but have different name suffixes, so i need to link with

  -llua50

instead of 

  -llua 

to get the right lua library version

How to repeat:
on debian unstable with all lua versions installed, in mysql-gui-common

just using

  ./configure --enable-grt --enable-canvas 

the build fails with

  myx_grt_lua.c:35: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'lualibs'
  myx_grt_lua.c: In function 'get_grt':
  myx_grt_lua.c:53: warning: cast to pointer from integer of different size
  myx_grt_lua.c: In function 'myx_lua_init_loader':
  myx_grt_lua.c:94: error: too few arguments to function 'lua_open'
  myx_grt_lua.c:104: error: 'LUA_GLOBALSINDEX' undeclared (first use in this function)
  [...]

due to the wrong lua version 5.1 being used

trying again with 

  ./configure --enable-grt --enable-canvas --with-lua-includes=/usr/include/lua50 --with-lua-libs=/usr/lib

the compile stage works fine but on the link stage things fail with

  /usr/bin/ld: cannot find -llua

as there is no liblua.*, there are only suffixed liblua40*, liblua50* and liblua51* files in /usr/lib

Suggested fix:
use lua_config for lua compile and link flags and provide a configure option to specify which lua_config binary to use instead of hardcoded --with-lua-includes and --with-lua-libs options
[8 Jan 2008 17:35] Hartmut Holzgraefe
As far as i remember a previous conversation with Jan 
my lua_config suggestion is not portable as the lua_config
tool is a Debian addition and not part of the original
lua distribution. 

So some extra option like --with-lua-postfix=50 seems
to be the way to go here?
[8 Jan 2008 18:58] Susanne Ebrecht
Verified as described.
There is no way, to tell, with lua version should be used. The only workaround is ln -s ...
[8 Jul 2009 11:31] Susanne Ebrecht
Many thanks for writing a bug report. We are on the way to implement full functionality of MySQL GUI Tools into MySQL Workbench. We won't fix this anymore.

More informations about MySQL Workbench you will find here:

http://dev.mysql.com/workbench/