Compiling mysql workbench on Fedora 21

2

I was trying to compile mysql-workbench from source (since mysql's fedora 21 repo still doesn't have it). Installed all the dependencies as recommended in many online sources. Currently i'm stuck at the following error message and not sure how to proceed. Can someone please help me out?

[root@localhost wb-build]# cmake .. -DBUILD_CONFIG=mysql_release
-- C/C++ version 1.1.4+: TRUE
-- C/C++ version 1.1.5+: 1
Found iodbc, using it as ODBC library.
- checking for module 'gnome-keyring-1'
--   package 'gnome-keyring-1' not found
-- checking for module 'gnome-keyring'
--   package 'gnome-keyring' not found
Using bundled Antlr C runtime
Generating mysql.parser files...
The antlr-3.4-complete.jar file could not be found.
Please make sure that linux-res is in /home/sherzodr/Downloads or add the ANTLR_JAR_PATH     enviroment variable with the path to the file.
You'll also need Java Runtime Enviroment installed, so the parser files can be regenerated.
CMake Error at library/mysql.parser/grammar/CMakeLists.txt:9 (message):
  Generating mysql.parser files failed with result='1'

-- Configuring incomplete, errors occurred!

By the way, I also tried to install Fedora 20 rpm and a RedHat package; they both install fine, but the result set are empty. So re-compiling from source is the only option i have.

Thank you

sherzodr

Posted 2015-01-11T09:33:18.493

Reputation: 41

Answers

2

I finally successfully compiled mysql-workbench 6.2.4 on Fedora 21, after several days of trying. I confirm that it's working. Grid's in result sets are no longer empty.

@Brady's suggestion of using antlr-3.5.2-complete.jar didn't work for me. Instead antlr-3.4.2-complete.jar was required. Otherwise incompatible header files would be generated (which is the reason for errors related to MySQLLexer's C code. @Brady's all other suggestions are a MUST for success, including source updates related to: recordset_text_storage.cpp .

@lorelogo's was on the right track, but to take his suggestion further, I also had to remove all the header files generated by antlr-3.5.2-complete.jar (they are not in the wb-build/ folder, but inside the parent). Switching to antlr-3.4.2-complete.jar in the middle is not a fix, since it doesn't re-generate the header files anew. For me it was easier to just extract the mysql-workbench's source archive anew and start over.

If you don't have ctemplate 2.2 installed (which is not available in fc21 repositories) you start getting other compile errors, usually related to missing ctemplate/template.h or Ctemplate::* type definitions. It's IMPORTANT to get ctemplate 2.2 from https://code.google.com/p/ctemplate/downloads/list and compile it yourself. But since mysql-workbench looks for ctemplate.so.2 in /usr/lib64/ but "make install" installed it on my /usr/local/lib folder, I created symlinks in my /usr/lib64 by doing

ln -s /usr/local/lib/libctemplate* .

The last step wasn't required for me to successfully compile. But without this step compiled workbench doesn't start (since it tried to load /usr/lib64/libctemplate.so.2).

although I'm now using mysql-workbench, it's hard for me to ignore all the warnings from GLib-GObject-WARNING. I might attempt to downgrade glib and see if that fixes.

It's possible I forgot few other steps I had to take to fix this, since this struggle continued a week. Just post your problems you're facing. It might help me to recall other details.

Thanks to everybody. I could not have done it without you!

sherzodr

Posted 2015-01-11T09:33:18.493

Reputation: 41

0

For the Antlr error, it disappered for me using the following binary: antlr-3.5.2-complete.jar.
You can find it at ANTLR v3 downloads page.

It didn't work for me with the specified 3.4-complete binary.
After download at your preferred location, just try issuing a command like:

ANTLR_JAR_PATH=/path/to/jar/antlr-3.5.2-complete.jar cmake -DBUILD_CONFIG=mysql_release

For the gnome-keyring(s) error, a simple

sudo yum install libgnome-keyring-devel

should do.

Also, prior to this, remember to follow the patch solution like in this previous answer to get rid of the deprecated function (if you haven't already done so).

Marco

Posted 2015-01-11T09:33:18.493

Reputation: 26

Brady, thank you, you got me one step closer. I reached the "make" step. But while it was generating the MySQLLexer.c.o object it went awry: [ 7%] Building C object library/mysql.parser/CMakeFiles/mysqlparser.dir/MySQLLexer.c.o /home/sherzodr/Downloads/mysql-workbench-community-6.2.4-src/library/mysql.parser/MySQLLexer.c:15976:45: error: ‘_empty’ undeclared here (not in a function) dfa11_T1, dfa11_T2, dfa11_T3, dfa11_T4, _empty, _empty, dfa11_T0, dfa11_T4, – sherzodr – 2015-01-18T08:41:23.723

0

Downloading the JAR file did not fully work for me. It got me through the cmake step for mysql-workbench but once I started to compile with make I hit a lot of errors associated with antlr.

I found that antlr is in the Fedora 21 repositories that ships with the distro. This allowed me to start compiling the mysql-workbench. Start... but did not finish as there is some C code issues I am now confronted with outside of the subject here.

sudo yum install antlr-tool antlr3-java

Brady

Posted 2015-01-11T09:33:18.493

Reputation: 103

0

I solved the issue in this way on OpenSuse 13.1 64bit:

ANTLR_JAR_PATH=/path/to/jar/antlr-3.4-complete.jar cmake ..

If you can't resolve, try to remove the wb-build directory and its content and rerun cmake. Let we know!

lorelogo

Posted 2015-01-11T09:33:18.493

Reputation: 1

0

An RPM package for Fedora 21 64-bit (mysql-workbench-community-6.2.5-1.fc21.x86_64.rpm) is now available on the official MySQL downloads page:

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

Hooks ZHang

Posted 2015-01-11T09:33:18.493

Reputation: 1