Bug #16604 Multiple compilation errors in configuration scripts
Submitted: 18 Jan 2006 13:12 Modified: 26 Apr 2006 17:07
Reporter: Ronald Bradford Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Preview Severity:S1 (Critical)
Version:1.0.0 OS:Linux (linux)
Assigned to: Alfredo Kojima CPU Architecture:Any

[18 Jan 2006 13:12] Ronald Bradford
Description:
Attempting to build MySQL Workbench 1.0.0 from source on CentOS 4.2  (a.k.a. RHEL4.2) as binary does not work, see other open bugs on that.

Multiple problems in configure  (3 of)
Errors in Makefile  (1 of)

Would really help if you provided in binary release the versions of libraries used, as it's taken some 5-6 hours of trial and error of libraries just to get to finally compiling the actual workbench.  There are several forum posts that obvious have issues I could easily log issues of minimum dependencies I've found so far.

How to repeat:
Using ftp://ftp.mysql.com/pub/mysql/download/mysql-workbench-1.0.0-alpha-linux.tar.gz 

cd /src/mysql-workbench-1.0.0/mysql-gui-common

1. ./configure: line 3488: -f: command not found   (As noted in forums, but still obviously outstanding)

2. ./configure: line 7368: syntax error near unexpected token `else'

3.  Compilation error  (as part of misleading configure minimum requirement)
./configure
make
MGTableEditor.cc:265: error: 'class Gtk::ComboBoxEntry' has no member named 'get_entry'

4. Complication error (linking gui-common with mysql-workbench)
cd /src/mysql-workbench-1.0.0/mysql-workbench
./configure
make
make[3]: Entering directory `/src/mysql-workbench-1.0.0/mysql-workbench/source/linux'
make[3]: *** No rule to make target `../../../mysql-gui-common/source/linux/libwbcommongui.a', needed by `mysql-workbench-bin'.  Stop.

Suggested fix:
1. Line 2488 should read.

if test ! -f po ; then

2.  Line 7366 should read.

if test "${ac_cv_prog_PCRE_LIBS+set}" = set; then

3. ComboBoxEntry has get_entry in gtkmm 2.4 Refer to docs at http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1ComboBoxEntry.html

Original configuration in mysql-gui-common long before finding the long path of dependancies provided initial dependency error.
./configure
No package 'gtkmm-2.4' found

This is indeed an invalid minimum requirement, it must indeed have at least gtkmm-2.6 to actually compile mysql-gui-common

4. This could be a naming problem. Have now knowledge of makefile.

cd /src/mysql-workbench-1.0.0/mysql-workbench/source/linux  (current make directory)
 ls -l ../../../mysql-gui-common/source/linux/lib*
-rw-r--r--  1 root root 7410114 Jan 18 22:43 ../../../mysql-gui-common/source/linux/libmacommongui.a
-rw-r--r--  1 root root 8006062 Jan 18 22:44 ../../../mysql-gui-common/source/linux/libqbcommongui.a

Not similar library name exists, but not libwbcommongui.a
[18 Jan 2006 13:23] Ronald Bradford
correct spelling error in synopsis
[18 Jan 2006 13:24] Aleksey Kishkin
Ronald,
   at this moment we do not process bugs of mysql workbench, because it's still
in the intensive development, and we provided snapshot in order to give people
first implression of WB. 

I am changing status to 'Analyzing' and return to this bugreport when WB will be
issued officially.
[18 Jan 2006 14:36] Ronald Bradford
That comment doesn't fly with me.

You say "we provided snapshot in order to give people first implression of WB. "

It's just a cute and paste from another bug as it still has a typo in it.
For the record, your snaphot binary was not built by the supplied source.  Perhaps you can provide the supplied source that built the binary so at least us poor gumbies are working with the same apples.

That, or could I suggest you even just have a quick look at it. I'm not a C++ developer, but I've spent an entire day to get this far. The least you could do is fix the obvious mistakes I've clearly documented and perhaps look at the error that's been thrown.  

Let me put it another way.  I don't believe your snapshot could have possibily been built via the supplied source.  Please, prove me wrong.  I'm not the only person wanting to see MySQL workbench operating under Linux.
[18 Jan 2006 16:23] Alfredo Kojima
Hi Ronald,

1 and 2 are fixed
3. indeed, gtkmm-2.6 was required for some stuff, but I've removed those dependencies so that the next release should build with 2.4
4. you need to configure gui-common with: ./configure --enable-grt --enable-canvas to enable the components needed by Workbench.

Workbench is still in alpha, but at some point we'll provide build instructions at some point (as well as providing binaries in various formats).

I believe soon we will make a new release which should have many of the build issues you mention fixed, but if you really want to finish building 1.0.0 feel free to email me or reply to this bug.
[19 Jan 2006 1:18] Ronald Bradford
Thank you for your prompt and positive response. It helped to know all my hard work was received. However, it only moved me 2 places to obviously more specific MySQL complication errors.

make[3]: Entering directory `/src/mysql-workbench-1.0.0/mysql-gui-common/library_grt/source'
if gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../library_grt/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -I../../library_util/include -I../../library_util/shared_include -I../../library_grt/newt -I/opt/mysql/include -I/usr/include/pcre -I/usr/include/python2.3  -DENABLE_JAVA_MODULES -DENABLE_PYTHON_MODULES -DLUA_TEXT_DIALOGS    -g -O2 -MT lua_dialogs.o -MD -MP -MF ".deps/lua_dialogs.Tpo" -c -o lua_dialogs.o lua_dialogs.c; \
then mv -f ".deps/lua_dialogs.Tpo" ".deps/lua_dialogs.Po"; else rm -f ".deps/lua_dialogs.Tpo"; exit 1; fi
lua_dialogs.c:20:17: lua.h: No such file or directory
lua_dialogs.c:21:21: lauxlib.h: No such file or directory
....
make[3]: *** [lua_dialogs.o] Error 1
make[3]: Leaving directory `/src/mysql-workbench-1.0.0/mysql-gui-common/library_grt/source'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/src/mysql-workbench-1.0.0/mysql-gui-common/library_grt'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/src/mysql-workbench-1.0.0/mysql-gui-common'

Assuming wildly this is http://www.lua.org  download, compile and rebuild which goes past this error to another more MySQL specific error.

make[3]: Entering directory `/src/mysql-workbench-1.0.0/mysql-gui-common/source/linux'
MySQLGRT/MGRT.cc: In member function `void MGRT::init_thread(const std::string&)':
MySQLGRT/MGRT.cc:115: error: `myx_grt_shell_print_welcome' undeclared (first use this function)
MySQLGRT/MGRT.cc:115: error: (Each undeclared identifier is reported only once for each function it appears in.)
MySQLGRT/MGRT.cc:170: error: `myx_lua_init_loader' undeclared (first use this function)
MySQLGRT/MGRT.cc:194: error: `myx_grt_init_lua_shell' undeclared (first use this function)
MySQLGRT/MGRT.cc: In member function `void MGRT::perform_shell_command(const Glib::ustring&)':
MySQLGRT/MGRT.cc:275: error: `myx_grt_lua_shell_execute' undeclared (first use this function)
MySQLGRT/MGRT.cc: In member function `Glib::ustring MGRT::shell_prompt()':

This seems defined in library_grt/source/myx_grt_lua_shell.c  which has compiled to object code.  So it's probably clearly related with the lua dependency in some way, but I'm not a C++ developer so apart from googling and greping it's a good 3 levels over my head.  You expertise is again required to nedge me forward.

On a lighter note, I am making detailed notes on my blog for installation which I will gladly post on forums for further installation assistance on my eventual success.
[19 Jan 2006 17:43] Alfredo Kojima
Did you run configure in mysql-gui-common again after installing lua? It sounds like configure doesn't know you already have lua installed.
You also need the JDK 1.4 or newer installed and pass (the requirement for Java has been removed now) the following flags to configure:
./configure --enable-grt --with-java-ldflags="-L/opt/j2sdk1.4.2_07/jre/lib/i386/client/ -ljvm" --enable-canvas

If you want, you can try the latest version in the subversion repository, which should be easier to build. That version doesn't require Java and have several issues fixed:

svn co http://svn.mysql.com/svnpublic/mysql-gui-common/
svn co http://svn.mysql.com/svnpublic/mysql-workbench/

Please note that some stuff might be broken depending on when you pull the sources.
[20 Jan 2006 8:49] Ronald Bradford
Correct, I did not configure again (I guess this is a C/C++ building 101 type mistake). Did that, still issues.

$ ./configure
/configure: line 5556: ./po/POTFILES.in: No such file or directory
$ make
MySQLGRT/MGRTValueTree.cc:255: instantiated from here
/usr/include/sigc++-2.0/sigc++/adaptors/bound_argument.h:158: error: 'const class sigc::bound_argument< std ::list< MYX_GRT_VALUE*, std::allocator< MYX_GRT_VALUE*> >&>’ has no member named ‘visit’
make[3]: *** [MGRTValueTree.o] Error 1
make[3]: Leaving directory `/src/mysql-workbench-1.0.0/mysql-gui-common/source/linux’
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/src/mysql-workbench-1.0.0/mysql-gui-common/source’
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/src/mysql-workbench-1.0.0/mysql-gui-common’
make: *** [all] Error 2

There is an error in the configure file at line 5556. Must have missed before, but I doubt, related to the later error.  

Google gets me to http://mail.gnome.org/archives/gtkmm-list/2005-November/msg00194.html which repeats the same problem, however no solution. Further reference to confirm the libc++ 2.0 API Docs indicating visit is indeed a member. I have the lasted version from http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.0/ of 2.0.17. No indication of error at Gnome Bug Tracking including using detailed serach. So I’ve exshausted my investigative knowledge here.

I also tried the compile from source as per your request, but that opened other errors, and I don't wish to pollute this bug with the details.  For reference my notes of this compile from source are at http://blog.arabx.com.au/?p=80  including missing makefiles and different complication error.
[26 Apr 2006 17:07] Alfredo Kojima
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Please refer to http://forge.mysql.com/wiki/Building_MySQL_GUI_Tools_on_Linux for info on building Workbench.