Bug #73855 MySQL Workbench Community Edition 6.1.7 does not build on SLES SP3
Submitted: 9 Sep 2014 12:35 Modified: 11 Oct 2014 15:47
Reporter: Magnus Forsberg Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:6.1.7 OS:Linux (SUSE Enterprise Linux SP3 64-bit)
Assigned to: CPU Architecture:Any
Tags: MySQL, workbench

[9 Sep 2014 12:35] Magnus Forsberg
Description:
MySQL Workbench community Edition 6.1.7 does not compile.

See build log:
[  844s] cd /usr/src/packages/BUILD/mysql-workbench-community-6.1.7-src/build/plugins/migration && /usr/bin/c++   -DHAVE_PRCTL_H -D__STDC_FORMAT_MACROS -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -fno-strict-aliasing -I/usr/include -fno-strict-aliasing -I/usr/include  -I/usr/src/packages/BUILD/mysql-workbench-community-6.1.7-src/plugins/migration/copytable -I/usr/src/packages/BUILD/mysql-workbench-community-6.1.7-src/library/base -I/usr/include/gtk-2.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/sigc++-2.0 -I/usr/lib64/sigc++-2.0/include -I/usr/include/glibmm-2.4 -I/usr/lib64/glibmm-2.4/include -I/usr/include/giomm-2.4 -I/usr/lib64/giomm-2.4/include -I/usr/include/atkmm-1.6 -I/usr/include/cairomm-1.0 -I/usr/include/pangomm-1.4 -I/usr/lib64/pangomm-1.4/include -I/usr/include/gdkmm-2.4 -I/usr/lib64/gdkmm-2.4/include -I/usr/include/gtkmm-2.4 -I/usr/lib64/gtkmm-2.4/include -I/usr/include/python2.6 -I/usr/include/mysql -I/usr/src/packages/BUILD/mysql-workbench-community-6.1.7-src/backend/wbprivate/workbench      -o CMakeFiles/wbcopytables.dir/copytable/copytable.cpp.o -c /usr/src/packages/BUILD/mysql-workbench-community-6.1.7-src/plugins/migration/copytable/copytable.cpp
[  845s] /usr/src/packages/BUILD/mysql-workbench-community-6.1.7-src/plugins/migration/copytable/copytable.cpp: In constructor 'MySQLCopyDataSource::MySQLCopyDataSource(const std::string&, int, const std::string&, const std::string&, const std::string&)':
[  845s] /usr/src/packages/BUILD/mysql-workbench-community-6.1.7-src/plugins/migration/copytable/copytable.cpp:1146: error: cannot convert 'int*' to 'const char*' for argument '3' to 'int mysql_options(MYSQL*, mysql_option, const char*)'
[  845s] /usr/src/packages/BUILD/mysql-workbench-community-6.1.7-src/plugins/migration/copytable/copytable.cpp: In constructor 'MySQLCopyDataTarget::MySQLCopyDataTarget(const std::string&, int, const std::string&, const std::string&, const std::string&, const std::string&)':
[  845s] /usr/src/packages/BUILD/mysql-workbench-community-6.1.7-src/plugins/migration/copytable/copytable.cpp:1651: error: cannot convert 'int*' to 'const char*' for argument '3' to 'int mysql_options(MYSQL*, mysql_option, const char*)'
[  846s] make[2]: *** [plugins/migration/CMakeFiles/wbcopytables.dir/copytable/copytable.cpp.o] Error 1
[  846s] make[2]: Leaving directory `/usr/src/packages/BUILD/mysql-workbench-community-6.1.7-src/build'
[  846s] make[1]: *** [plugins/migration/CMakeFiles/wbcopytables.dir/all] Error 2

How to repeat:
Go download Generic Linux (Architecture Independent), Compressed TAR Archive  from http://dev.mysql.com/downloads/workbench/

Version: 6.1.7
Size: 23.6M
Name: mysql-workbench-community-6.1.7-src.tar.gz
MD5: ac059e239869fb77bf5d7a1f5845a8af 

I have modified the RPM spec from:
http://software.opensuse.org/package/mysql-workbench

...to be able to start building on SLES (dependency errors). Attaching full .spec file to bug report.

Try to build this source against latest SUSE Enterprise repositories from SLES SP3 64-bit:

[   62s] Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.92697
[   62s] + umask 022
[   62s] + cd /usr/src/packages/BUILD
[   62s] + /bin/rm -rf /var/tmp/mysql-workbench-6.1.7-build
[   62s] ++ dirname /var/tmp/mysql-workbench-6.1.7-build
[   62s] + /bin/mkdir -p /var/tmp
[   62s] + /bin/mkdir /var/tmp/mysql-workbench-6.1.7-build
[   62s] + cd mysql-workbench-community-6.1.7-src
[   62s] + export PATH=/usr/src/packages/BUILD/mysql-workbench-community-6.1.7-src/bin:/usr/lib64/mpi/gcc/openmpi/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin:.
[   62s] + PATH=/usr/src/packages/BUILD/mysql-workbench-community-6.1.7-src/bin:/usr/lib64/mpi/gcc/openmpi/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin:.
[   62s] + export SUSE_ASNEEDED=0
[   62s] + SUSE_ASNEEDED=0
[   62s] + export INCLUDES=-I/usr/include
[   62s] + INCLUDES=-I/usr/include
[   62s] + export 'CFLAGS=-fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -fno-strict-aliasing -I/usr/include'
[   62s] + CFLAGS='-fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -fno-strict-aliasing -I/usr/include'
[   62s] + export 'CXXFLAGS=-fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -fno-strict-aliasing -I/usr/include -fno-strict-aliasing -I/usr/include'
[   62s] + CXXFLAGS='-fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -fno-strict-aliasing -I/usr/include -fno-strict-aliasing -I/usr/include'
[   62s] + export MySQL_INCLUDE_DIR=/usr/include/mysql
[   62s] + MySQL_INCLUDE_DIR=/usr/include/mysql
[   62s] + export MySQL_CONFIG_PATH=/usr/bin
[   62s] + MySQL_CONFIG_PATH=/usr/bin
[   62s] + pushd build
[   62s] /usr/src/packages/BUILD/mysql-workbench-community-6.1.7-src/build /usr/src/packages/BUILD/mysql-workbench-community-6.1.7-src
[   62s] + LIB_SUFFIX=lib64
[   62s] + LIB_SUFFIX=64
[   62s] + cmake -DCMAKE_INSTALL_PREFIX=/usr -DLIB_INSTALL_DIR=/usr/lib64 -DCMAKE_BUILD_TYPE=community -DREAL_EXECUTABLE_DIR=/usr/lib64/mysql-workbench -DUSE_UNIXODBC=FALSE -DLIB_SUFFIX=lib64 -DCMAKE_SKIP_RPATH=ON ..

...

[   65s] + make VERBOSE=1 -j2

Suggested fix:
I think this has to do with I am using old SLES mysql packages (mysql-devel) (provided by SUSE), but I am not sure.
[9 Sep 2014 12:36] Magnus Forsberg
Full build log from Open Build Service

Attachment: build.log (text/x-log), 1.13 MiB.

[9 Sep 2014 12:38] Magnus Forsberg
Spec-file from software.opensuse.org slightly modified for SLES

Attachment: mysql-workbench.spec (text/x-rpm-spec), 7.56 KiB.

[11 Sep 2014 15:46] Alfredo Kojima
That's strange, your build error says 

src/plugins/migration/copytable/copytable.cpp:1146: error: cannot convert 'int*' to 'const char*' for argument '3' to 'int mysql_options(MYSQL*, mysql_option, const char*)'

but the mysql header declares that as:

int             STDCALL mysql_options(MYSQL *mysql,enum mysql_option option,
                                      const void *arg);

What version of mysql do you have installed?
[12 Oct 2014 1: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".