Bug #22663 gui-common build fails with Lua 5.1.1
Submitted: 25 Sep 2006 13:44 Modified: 26 Jan 2007 8:31
Reporter: Juga Paazmaya Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Workbench Preview Severity:S3 (Non-critical)
Version:5.0r3 OS:Linux (Linux)
Assigned to: Sveta Smirnova CPU Architecture:Any

[25 Sep 2006 13:44] Juga Paazmaya
Description:
While building from sources MySQL GUI tools 5.0rc3, gui-common
If I dont specify lua parameters for configure script, it fails to fidn lua from my system.
I have Lua 5.1.1 installed.

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

While specifying lua locations, I get thru configure nicely.
While make, I get the following error:
--------------------------
gcc -DHAVE_CONFIG_H -I. -I. -I../../.. -I../../../library/generic-runtime/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -I../../../library/utilities/include -I../../../library/utilities/shared_include -I../../../library/generic-runtime/newt -I/usr/include/mysql -march=i686 -pipe -I/usr/include -DDLOAD_JVM -I/usr/include -DENABLE_LUA_MODULES -MT myx_grt_lua.lo -MD -MP -MF .deps/myx_grt_lua.Tpo -c myx_grt_lua.c  -fPIC -DPIC -o .libs/myx_grt_lua.o
myx_grt_lua.c:42: error: 'luaopen_loadlib' undeclared here (not in a function)
make[4]: *** [myx_grt_lua.lo] Error 1
make[4]: Leaving directory `/home/paazio/mysql-gui-tools-5.0r3/mysql-gui-common/library/generic-runtime/source'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/paazio/mysql-gui-tools-5.0r3/mysql-gui-common/library/generic-runtime'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/paazio/mysql-gui-tools-5.0r3/mysql-gui-common/library'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/paazio/mysql-gui-tools-5.0r3/mysql-gui-common'
make: *** [all] Error 2

---------------------------

How to repeat:
Build from sources while Lua 5.1.1 installed and using the following configure lines:

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

Suggested fix:
Update Makefile, etc. to see the difference betweem Lua versions.
[16 Oct 2006 11:10] Sveta Smirnova
Thank you for the report.

Could you please try with current 5.0.r4 version or with svn sources accessible from http://svn.mysql.com/svnpublic/mysql-gui-common/trunk ?
[17 Nov 2006 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[17 Jan 2007 12:18] wert2all wert2all
I have openSuse 10.2 with:

#uname -r
2.6.18.2-34-default

#rpm -qa | grep lua
lua-devel-5.1.1-20
lua-5.1.1-20
lua-libs-5.1.1-20

but i have error

gcc -DHAVE_CONFIG_H -I. -I. -I../../.. -I../../../library/generic-runtime/include -I/usr/include/libxml2 -I/opt/gnome/include/glib-2.0 -I/opt/gnome/lib/glib-2.0/include -I../../../library/utilities/include -I../../../library/utilities/shared_include -I../../../library/generic-runtime/newt -I/usr/include/mysql -march=i586 -mtune=i686 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -g -DPIC -fPIC -DUNDEF_HAVE_INITGROUPS -fno-strict-aliasing -I/usr/include -DDLOAD_JVM -I/usr/include -DENABLE_LUA_MODULES -MT myx_grt_lua.lo -MD -MP -MF .deps/myx_grt_lua.Tpo -c myx_grt_lua.c  -fPIC -DPIC -o .libs/myx_grt_lua.o
myx_grt_lua.c:42: error: 'luaopen_loadlib' undeclared here (not in a function)
make[4]: *** [myx_grt_lua.lo] Error 1
[7 Oct 2007 19:04] Janos Kovacs
I have Frugalware Linux 0.7rc2 with:

kernel version:
$ uname -r
2.6.22-fw5

lua version:
$ pacman -Q lua
lua 5.1.1-1

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

and the make error:
 gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../../library/generic-runtime/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -I../../../library/utilities/include -I../../../library/utilities/shared_include -I../../../library/generic-runtime/newt -I/usr/include/mysql -march=i686 -pipe -I/usr/include -DDLOAD_JVM -I/usr/include -DENABLE_JAVA_MODULES -DENABLE_LUA_MODULES -DLUA_TEXT_DIALOGS -MT myx_grt_lua.lo -MD -MP -MF .deps/myx_grt_lua.Tpo -c myx_grt_lua.c  -fPIC -DPIC -o .libs/myx_grt_lua.o
myx_grt_lua.c:42: error: 'luaopen_loadlib' undeclared here (not in a function)
make[4]: *** [myx_grt_lua.lo] Error 1
make[4]: Leaving directory `/home/janny/mysql/mysql-svn/mysql-gui-common/library/generic-runtime/source'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/janny/mysql/mysql-svn/mysql-gui-common/library/generic-runtime'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/janny/mysql/mysql-svn/mysql-gui-common/library'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/janny/mysql/mysql-svn/mysql-gui-common'
make: *** [all] Error 2
[9 Nov 2007 18:35] Pavel Alexeev
I also found this, and another 2 errors during compilation on Fedora ~8 from src.rpm.

Patch below.
[9 Nov 2007 18:35] Pavel Alexeev
Patch to compile whith lua-5.1.x

Attachment: mysql-gui-tools-configure.in_lua5.1.patch (application/octet-stream, text), 2.78 KiB.

[7 Dec 2008 20:21] Mark Johnson
This continues to fail to compile with mysql-gui-tools 5.0r14.

I have Slackware 12.1 with Gnome Slack Build version 2.22 installed.  This uses lua 5.1.3.

Pavel's patch no longer applies due to changing the name of the directory from mysql-gui-common.  Editting the patch helped, but one chunk did not apply to configure.in.  I THINK that I worked around this by specifying options to configure for where to look for it.  However, the compile still fails.
[14 Dec 2008 19:52] Pavel Alexeev
I steep from r12 to r14 and build fails by few reasons. Because directory structure had been changed, I had to rewrite all patches. Additionaly I add 2 patches to compile it correctly. So, without concrete error from you, I do not known about speach now.
You may see my RPM fo fedora, which compiled sucsessfully, and get all my patches from it - http://hubbitus.net.ru/rpm/Fedora9/mysql-gui-tools/mysql-gui-tools-5.0r14-1.fc9.src.rpm