Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 482156

Summary: dev-db/mysql-workbench-6.0.7 version bump
Product: Gentoo Linux Reporter: Alex Barker <alex>
Component: New packagesAssignee: Hans de Graaff <graaff>
Status: RESOLVED FIXED    
Severity: normal CC: bugs, god, h.habighorst, jaak, kuba.iluvatar
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://www.mysql.com/products/workbench/
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 482448    
Bug Blocks:    
Attachments: ebuild for mysql-workbench-6.0.6
CMakeLists patch (files subdirectory)
added dev-libs/tinyxml[stl] dependency
build.log.gz
updated ebuild
Fixup PCRE ldflags / inclusion to fix as_needed ldflag
Fix ext/scintilla to reference GTK2_PANGOCAIRO_LIBRARY and to remove hardcoded CXX Flags
ebuild updated - fix CMAKE dependency
CMakeLists.txt file
Updated ebuild
Updated ebuild
necessary patch for CMakeLists.txt
build.log.gz
Fix Oracle provided FindIODBC.cmake script to properly set include path
CMakeLists Patch: Take bundled antlr-c
Ebuild: Take bundled antlr-c instead of system antlr-c.
Readded python deps (paramiko / pexpect) from mysql-workbench-5.2.47-r1 ebuild
mysql-workbench-6.0.7-CMakeLists.patch.out
Ebuild for MySQL Workbench 6.0.8
mysql workbench 6.0.8 cmakelists patch
Fixup PCRE ldflags / inclusion to fix as_needed ldflag

Description Alex Barker 2013-08-22 22:22:52 UTC
It looks like there is an update to Oracle's rubbish MySQL management utility.  Hopefully this version will bring some refuge from the constant segfaults plaguing the 5.X branch.


Reproducible: Always
Comment 1 Hans de Graaff gentoo-dev Security 2013-08-23 05:54:29 UTC
I'm aware of the new version but haven't had time to look at it yet. Patches or ebuilds for review are welcome.
Comment 2 H.Habighorst 2013-08-25 18:19:18 UTC
Created attachment 356992 [details]
ebuild for mysql-workbench-6.0.6
Comment 3 H.Habighorst 2013-08-25 18:19:37 UTC
Created attachment 356994 [details, diff]
CMakeLists patch (files subdirectory)
Comment 4 H.Habighorst 2013-08-25 18:38:49 UTC
I created an ebuild for mysql-workbench-6.0.6

I started from the last mysql workbench ebuild (5.2.47).

List of changes:

=> use python-single-r1, as only python:2 is supported

=> port to CMAKE

=> (try to, not sure if it is correct) block glibc 2.36, but depend on glibc:2
==> lot of deprecated warnings, mostly g_mutex_new / g_static_mutex stuff

=> added dev-db/mysql-connector-c++ dependency

=> added dev-db/vsqlite++ dependency (will file another bug for the ebuild, not yet in portage tree)

=> added append-ldflags $(no-as-needed) as build breaks with undefined symbols in pcre_* (around 10-12 % progress)

=> ported to new cmake system: removal of hardcoded CXXFLAGS in ext/scintilla/gtk

The rest ist mostly adapation to cmake.

I needed to patch the CMakeLists.txt file:

1) try not to use an external ANTLR3C project, hardcode to internal bundle (non upstream version as already confirmed in the old ebuild)

2) disable pkgconfig check and comment for ubuntu
==> we configure python via CMAKE, this is not needed

3) remove unixODBC check
==> old ebuild supported only iodbc, and the comment / option setting in CMakeLists.txt defaults to using iodbc, too

4) I'm unsure wether this is correct or not
=> we do not hard depend on GNOME_KEYRING
=> set USE_GNOME_KEYRING via CMAKE to ON if gnome-keyring use flag is activated (default CMakeLists.txt OFF)
=> so check if UNIX AND GNOME_KEYRING are set
==> if yes and no gnome-keyring package was found, abort
==> default was to just go on ignoring the not found package

5) remove unnecessary comments and hardcode to use internal bundled ANTLR3C library

6) use ${WORKBENCH_SOURCE_DIR} for files lying in source directory (had an INSTALL error while trying to copy LICENSE.mysql [which did not exist...], as the COPYING file could not be found....)

Haven't written so far an ebuild ... Experience a bit in autohell, but cmakehell is new for me.

Put myself in CC list, if anyone has questions...
Comment 5 Alex Barker 2013-08-25 21:09:31 UTC
I am getting a cmake error:

-- <<< Gentoo configuration >>>
Build type      Gentoo
Install path    /usr
Compiler flags:
C               -march=native -O2 -fdata-sections -ffunction-sections -flto -fomit-frame-pointer -fpredictive-commoning -fuse-linker-plugin -pipe 
C++             -march=native -O2 -fdata-sections -ffunction-sections -flto -fomit-frame-pointer -fpredictive-commoning -fuse-linker-plugin -pipe 
Linker flags:
Executable       -Wl,-O1 -Wl,--as-needed -Wl,--gc-sections -flto -fuse-linker-plugin -Wl,--no-as-needed
Module           -Wl,-O1 -Wl,--as-needed -Wl,--gc-sections -flto -fuse-linker-plugin -Wl,--no-as-needed
Shared           -Wl,-O1 -Wl,--as-needed -Wl,--gc-sections -flto -fuse-linker-plugin -Wl,--no-as-needed

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
TINYXML_LIBRARY
    linked by target "wbprivate" in directory /var/tmp/portage/dev-db/mysql-workbench-6.0.6/work/mysql-workbench-community-6.0.6-src/backend/wbprivate
    linked by target "mforms" in directory /var/tmp/portage/dev-db/mysql-workbench-6.0.6/work/mysql-workbench-community-6.0.6-src/library/forms

-- Configuring incomplete, errors occurred!
Comment 6 Alex Barker 2013-08-25 21:17:58 UTC
Add dev-libs/tinyxml to deps.
Comment 7 H.Habighorst 2013-08-25 21:19:24 UTC
Created attachment 357008 [details]
added dev-libs/tinyxml[stl] dependency

sorry, overlooked the dependency. in CMakeLists.txt is -DTIXML_USE_STL=1 set, so package should depend on tinyxml compiled with use flag stl.
Comment 8 Alex Barker 2013-08-26 15:11:47 UTC
Created attachment 357084 [details]
build.log.gz

Another build issue.  Missing GTK/Gnome depend?

Portage 2.1.12.2 (default/linux/amd64/13.0/desktop, gcc-4.7.3, glibc-2.15-r3, 3.10.7-gentoo x86_64)
=================================================================
System uname: Linux-3.10.7-gentoo-x86_64-Intel-R-_Core-TM-_i7_CPU_950_@_3.07GHz-with-gentoo-2.2
KiB Mem:    12302992 total,   1990896 free
KiB Swap:    2000088 total,   2000028 free
Timestamp of tree: Sun, 25 Aug 2013 02:15:01 +0000
ld GNU gold (GNU Binutils 2.23.2) 1.11
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.5-r2, 3.2.5-r2
dev-util/cmake:           2.8.10.2-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.7.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.7 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo proaudio sunrise steam-overlay local_overlay
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -fomit-frame-pointer -pipe"                                                                                                              
CHOST="x86_64-pc-linux-gnu"                                                                                                                                        
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"                                                                             
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"                                                                  
CXXFLAGS="-march=native -O2 -fomit-frame-pointer -pipe"                                                                                                            
DISTDIR="/usr/portage/distfiles"                                                                                                                                   
EMERGE_DEFAULT_OPTS="--with-bdeps=y"                                                                                                                               
FCFLAGS="-O2 -pipe"                                                                                                                                                
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"                                                                                     
FFLAGS="-O2 -pipe"                                                                                                                                                 
GENTOO_MIRRORS="ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ ftp://gentoo.mirrors.pair.com/ ftp://kde.mirror.anlx.net/"                                            
LANG="en_US.UTF-8"                                                                                                                                                 
LDFLAGS="-Wl,-O1 -Wl,--as-needed"                                                                                                                                  
MAKEOPTS="-j10"                                                                                                                                                    
PKGDIR="/usr/portage/packages"                                                                                                                                     
PORTAGE_CONFIGROOT="/"                                                                                                                                             
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"                                                                                                                       
PORTAGE_TMPDIR="/var/tmp"                                                                                                                                          
PORTDIR="/usr/portage"                                                                                                                                             
PORTDIR_OVERLAY="/var/lib/layman/pro-audio /var/lib/layman/sunrise /var/lib/layman/steam /usr/local/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="X a52 aac accessibility acl acpi alsa amd64 amr berkdb bitmap-fonts bmp branding bzip2 cairo cdda cddb cdinstall cdr cifs cli consolekit cracklib crypt curl custom-cflags cxx dbus divx dri dts dvd dvdr dvdread emboss encode exif faac fam ffmpeg firefox firefox3 flac flash fortran ftp g3dvl gdbm gif gles2 gnutls gpm gsm gstreamer gtk gtk2 hal iconv icu ipv6 java java6 jpeg jpg jpg2k kde lame lcms libnotify lto lzma mad minizip mmx mmx2 mmxext mng modules mozilla mp3 mp4 mpeg mudflap multilib musepack ncurses nfs nls nptl nptlonl nsplugin nvidia offensive ogg openal openexr opengl openmp opus osc pam pango pcre pdf pic png policykit ppds python3 qt qt3support qt4 quciktime rar rdesktop rdp readline real samba scanner sdl semantic-desktop session speex spell sqlite sse sse2 sse3 sse4 sse41 sse42 ssl ssse3 startup-notification svg system-sqlite tcpd theora tiff truetype truetype-fonts type1-fonts udev udisks unicode upower usb v4l v4l2 vdpau videos vnc vorbis vpx wav wavpack wxwidgets x264 xcb xml xscreensaver xulrunner xv xvid xvmc zip zlib" ABI_X86="32 64" ALSA_CARDS="hda-intel" APACHE2_MODULES="access_compat actions alias auth_basic authn_core authz_core authz_host autoindex dir env filter log_config mime negotiation rewrite setenvif unique_id unixd" APACHE2_MPMS="prefork" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US" NETBEANS_MODULES="apisupport cnd dlight harness ide java nb php profiler websvccommon" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19 ruby18" SANE_BACKENDS="artec_eplus48u" USERLAND="GNU" VIDEO_CARDS="nvidia vesa fbdev" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 9 Alex Barker 2013-08-26 15:28:48 UTC
I was also getting the following error which was attached to the wrong bug report:  https://bugs.gentoo.org/attachment.cgi?id=357014
Comment 10 H.Habighorst 2013-08-26 20:50:41 UTC
I cannot reproduce your error.

It seems like libpangocairo is missing - can you run an ebuild mysql-workbench-6.0.6.ebuild configure and append the following file or verify the following:

/var/tmp/portage/dev-db/mysql-workbench-6.0.6/work/mysql-workbench-6.0.6_build/CMakeCache.txt :

=> GTK2_PANGOCAIRO_LIBRARY is set 
(GTK2_PANGOCAIRO_LIBRARY:FILEPATH=/usr/lib64/libpangocairo-1.0.so)

=> wbscintilla_LIB_DEPENDS contains a reference to libpangocairo*

I'm clueless why there is a segmentation fault in your second build report.

I'm unsure if it works, but I updated the ebuild to patch the scintilla build file to reference explicitly GTK2_PANGOCAIRO_LIBRARY...

I've included another patch which should fix the as-needed trouble with PCRE.
Comment 11 Alex Barker 2013-08-26 21:01:03 UTC
(In reply to H.Habighorst from comment #10)
> It seems like libpangocairo is missing - can you run an ebuild
> mysql-workbench-6.0.6.ebuild configure and append the following file or
> verify the following:
> 
> /var/tmp/portage/dev-db/mysql-workbench-6.0.6/work/mysql-workbench-6.0.
> 6_build/CMakeCache.txt :
> 
> => GTK2_PANGOCAIRO_LIBRARY is set 
> (GTK2_PANGOCAIRO_LIBRARY:FILEPATH=/usr/lib64/libpangocairo-1.0.so)
> 
> => wbscintilla_LIB_DEPENDS contains a reference to libpangocairo*

That is a negative for both of those.  Here is the file:  http://bpaste.net/show/126492/

> I'm clueless why there is a segmentation fault in your second build report.

I am also unable to reproduce the second error at this time.

> I'm unsure if it works, but I updated the ebuild to patch the scintilla
> build file to reference explicitly GTK2_PANGOCAIRO_LIBRARY...
> 
> I've included another patch which should fix the as-needed trouble with PCRE.

When / Where were these updated?
Comment 12 H.Habighorst 2013-08-26 21:08:24 UTC
Created attachment 357124 [details]
updated ebuild

- added PCRE patch to fix as-needed ld issues
- added SCINTILLA patch to always reference GTK2_PANGOCAIRO_LIBRARY and to patch out the hardcoded CXXFLAGS (i hope that build breaks if GTK2_PANGOCAIRO_LIBRARY is not set... but unsure if it does)
- removed pkg_setup() as append-ldflags is unnecessary and python-single-r1_pkg_setup is called automatically
Comment 13 H.Habighorst 2013-08-26 21:09:20 UTC
Created attachment 357126 [details, diff]
Fixup PCRE ldflags / inclusion to fix as_needed ldflag
Comment 14 H.Habighorst 2013-08-26 21:10:28 UTC
Created attachment 357128 [details, diff]
Fix ext/scintilla to reference GTK2_PANGOCAIRO_LIBRARY and to remove hardcoded CXX Flags
Comment 15 H.Habighorst 2013-08-26 21:13:42 UTC
Missing pangocairo explains the build problem...

Can you try an...

revdep-rebuild -i
emerge -1 pango cairo gtk+ 

Afaik there is no specific USE flag or package to activate pangocairo... It should "just be there"... If it does not exist, there might be a linking problem.
Comment 16 Alex Barker 2013-08-26 23:04:43 UTC
(In reply to H.Habighorst from comment #15)
> Missing pangocairo explains the build problem...
> 
> Can you try an...
> 
> revdep-rebuild -i
> emerge -1 pango cairo gtk+ 
> 
It is definitely on the system, but I rebuilt it all just in case.
~ $ pkg-config --libs pangocairo
-lpangocairo-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lcairo 

~ $ locate pangocairo
/usr/include/pango-1.0/pango/pangocairo.h
/usr/lib32/libpangocairo-1.0.so
/usr/lib32/libpangocairo-1.0.so.0
/usr/lib32/libpangocairo-1.0.so.0.3000.1
/usr/lib32/pkgconfig/pangocairo.pc
/usr/lib64/libpangocairo-1.0.so
/usr/lib64/libpangocairo-1.0.so.0
/usr/lib64/libpangocairo-1.0.so.0.3000.1
/usr/lib64/pkgconfig/pangocairo.pc
/usr/lib64/python2.7/site-packages/gtk-2.0/pangocairo.so

Tried out the new ebuild which produces the same error.
Comment 17 H.Habighorst 2013-08-27 00:19:01 UTC
Created attachment 357136 [details]
ebuild updated - fix CMAKE dependency

- remove scintilla patch (wrong fix)
- depend on CMAKE 2.8.11.1
- remove DHAVE PYTHON
==> CMAKE 2.8.10.2-r2 FindGTK2.cmake (/usr/share/cmake/Modules) doesn't include a check for pangocairo...
==> ergo: no pangocairo defined!
Comment 18 H.Habighorst 2013-08-27 00:23:58 UTC
_GTK2_FIND_LIBRARY    (GTK2_PANGOCAIRO_LIBRARY pangocairo true true)

is missing in stable CMAKE (2.8.10.2-r2), /usr/share/cmake/Modules/FindGKT2.cmake under gtkmm configuration.

The ebuild requires now a minimum CMake version of 2.8.11.1 to fix this.
Comment 19 Alex Barker 2013-08-27 06:04:32 UTC
(In reply to H.Habighorst from comment #18)
> _GTK2_FIND_LIBRARY    (GTK2_PANGOCAIRO_LIBRARY pangocairo true true)
> 
> is missing in stable CMAKE (2.8.10.2-r2),
> /usr/share/cmake/Modules/FindGKT2.cmake under gtkmm configuration.
> 
> The ebuild requires now a minimum CMake version of 2.8.11.1 to fix this.

I was able to get the most recent ebuild to work correctly.  I did run across a few CFLAG problems during the process.  Both LTO and -fpredictive-commoning cause the build to fail.  I was able to get things built with -fno-predictive-commoning -fno-lto -fno-use-linker-plugin.  I will do some testing tomorrow at work and report any issues.  Thanks for all your work on this ebuild.
Comment 20 Alex Barker 2013-08-27 16:40:15 UTC
It compiles but crashes immediately after trying to connect to any database.  The error I see is "/usr/bin/mysql-workbench-bin: symbol lookup error: /usr/lib/mysql-workbench/libmforms.so: undefined symbol: scintilla_new"

Compiled With: CFLAGS="-march=native -O2 -fomit-frame-pointer -pipe" and default LDFLAGS.
Comment 21 Alex Barker 2013-08-28 00:14:32 UTC
I added the following patch which solves the issue I was having.  Not sure if it is the correct solution or if other problems exist.  I will test further tomorrow.

-target_link_libraries(wbscintilla ${GTK2_LIBRARIES})
+target_link_libraries(wbscintilla ${GTK2_LIBRARIES} ${GTK2_PANGOCAIRO_LIBRARY})
 
 install(TARGETS wbscintilla DESTINATION ${WB_INSTALL_LIB_DIR})

--- mysql-workbench-community-6.0.6-nodocs-src.orig/library/forms/CMakeLists.txt        2013-08-27 16:52:20.574566475 -0700
+++ mysql-workbench-community-6.0.6-nodocs-src/library/forms/CMakeLists.txt             2013-08-27 16:52:30.404821010 -0700
@@ -114,6 +114,6 @@
        )
 endif()
 
-target_link_libraries(mforms linux_utilities ${CAIRO_LIBRARIES} ${GTK2_LIBRARIES} ${GNOME_KEYRING_LIBRARIES} ${TINYXML_LIBRARY})
+target_link_libraries(mforms linux_utilities wbscintilla ${CAIRO_LIBRARIES} ${GTK2_LIBRARIES} ${GNOME_KEYRING_LIBRARIES} ${TINYXML_LIBRARY})
 
 install(TARGETS mforms DESTINATION ${WB_INSTALL_LIB_DIR})
Comment 22 Alex Barker 2013-08-28 16:56:47 UTC
Getting errors like (mysql-workbench-bin:3144): Gtk-CRITICAL **: gtk_tree_view_unref_tree_helper: assertion `node != NULL' failed and just exit codes like 0206.  Most of the time it just crashes to prompt without a message just return code 134.
Comment 23 Hans de Graaff gentoo-dev Security 2013-09-01 07:42:22 UTC
(In reply to H.Habighorst from comment #4)
> I created an ebuild for mysql-workbench-6.0.6

Thanks!

> I started from the last mysql workbench ebuild (5.2.47).

I still had a pending 5.2.47-r1 ready that I've just committed. Only difference is that is used dev-libs/antlr-c instead of the bundled version.

> => (try to, not sure if it is correct) block glibc 2.36, but depend on
> glibc:2
> ==> lot of deprecated warnings, mostly g_mutex_new / g_static_mutex stuff

I think you mean dev-libs/glib here, right? For this case you should not use an ||(), but you can just list both requirements as normal dependencies.

Depending on <dev-libs/glib-2.36.0 is nasty because this will suddenly break in the future when those older versions are removed. I think we should wait with adding mysql-workbench until this is fixed upstream. (This is fine while testing the ebuild, obviously).

> => added append-ldflags $(no-as-needed) as build breaks with undefined
> symbols in pcre_* (around 10-12 % progress)

Can't we fix the broken linking instead? Ah, that's what you did in a later version. Good, since using append-ldflags won't work for people who set this in their gcc profile directly.

> => ported to new cmake system: removal of hardcoded CXXFLAGS in
> ext/scintilla/gtk

Uhm, yes. We should probably see if we can't depend on x11-libs/fox instead. I've been ignoring that issue for the 5.2 series :-/

> 1) try not to use an external ANTLR3C project, hardcode to internal bundle
> (non upstream version as already confirmed in the old ebuild)

This can probably be ignored now if we use the gentoo provided version.

> 2) disable pkgconfig check and comment for ubuntu
> ==> we configure python via CMAKE, this is not needed
> 
> 3) remove unixODBC check
> ==> old ebuild supported only iodbc, and the comment / option setting in
> CMakeLists.txt defaults to using iodbc, too

We could support unixodbc as well, but then we'd need an additional USE flag for that. Not a high priority item as far as I'm concerned.
Comment 24 Hans de Graaff gentoo-dev Security 2013-09-01 09:17:11 UTC
(In reply to Hans de Graaff from comment #23)

> Depending on <dev-libs/glib-2.36.0 is nasty because this will suddenly break
> in the future when those older versions are removed.

Looks like there is no need to restrict this. glib 2.36 triggers a lot of deprecation warnings, but still seems to work.

I can't install the current ebuild:

 * ERROR: dev-db/mysql-workbench-6.0.6 failed:
 *   multilib-strict check failed!

This happens because the ebuild installs files in /usr/lib unconditionally, but it should install this in a multilib-aware way, i.e. in /usr/lib64 on amd64.
Comment 25 H.Habighorst 2013-09-01 10:41:51 UTC
Uh ^^ Lots of feedback. I had a rather busy week, but I'm still working on it.

> I still had a pending 5.2.47-r1 ready that I've just committed. Only
> difference is that is used dev-libs/antlr-c instead of the bundled version.

=> Okay. Will try this out....

> Depending on <dev-libs/glib-2.36.0 is nasty because this will suddenly break
> in the future when those older versions are removed. I think we should wait
> with adding mysql-workbench until this is fixed upstream. (This is fine
> while testing the ebuild, obviously).
--
> Looks like there is no need to restrict this. glib 2.36 triggers a lot of 
> deprecation warnings, but still seems to work.

Sorry, due to Gentoo Bug #405173 I've downgraded to 2.34 and masked 2.36, I've looked at the API docs, guess they removed simple the deprecated calls in the docs but not yet the functions.

> Can't we fix the broken linking instead? Ah, that's what you did in a later
> version. Good, since using append-ldflags won't work for people who set this
> in their gcc profile directly.

Yes... But I'm still unable to reproduce the errors of Alex Barker... 
 
> Uhm, yes. We should probably see if we can't depend on x11-libs/fox instead.
> I've been ignoring that issue for the 5.2 series :-/

Don't know x11-libs/fox... But found an fxscintilla library which relies on fox toolkit as it seems.

> This can probably be ignored now if we use the gentoo provided version.

Good. Will test it out.

> We could support unixodbc as well, but then we'd need an additional USE flag
> for that. Not a high priority item as far as I'm concerned.

Ok.


> I can't install the current ebuild:

> * ERROR: dev-db/mysql-workbench-6.0.6 failed:
> *   multilib-strict check failed!

> This happens because the ebuild installs files in /usr/lib unconditionally, 
> but it should install this in a multilib-aware way, i.e. in /usr/lib64 on 
> amd64.

Ah. Okay. I will patch the CMakeFile.

I've had a few changes lying around and a bit of cleanup, so I will comment when I've finished including your feedback and everything compiled 2 times fine.

Thx alot!
Comment 26 H.Habighorst 2013-09-01 13:43:21 UTC
Created attachment 357558 [details]
CMakeLists.txt file

As I'm currently toying around with a few things, I'm just using a CMakeLists.txt file - will provide a patch (which will just provide the necessary changes) if everything works well.

http://pastebin.com/SetvhFB4 => Diff of changes to CMakeLists.txt

- use CMAKE variables and especially ${CMAKE_INSTALL_LIBDIR}
- bail out if library should be used but was not found
- remove unnecessary comments
- remove "-Wall -Wsign-compare -Wextra" from add_definitions to reduce warnings
Comment 27 H.Habighorst 2013-09-01 13:49:14 UTC
Created attachment 357560 [details]
Updated ebuild

- remove < glib-2.36 dependency
- readd dependency on sys-libs/e2fsprogs-libs or dev-libs/ossp-uuid for uuid
- add strip-flags to src_prepare to filter out possible dangerous flags
- remove unnecessary stuff in src_configure

Together with the CMakeLists.txt file, it should fix the multilib issues and due to strip_flags it should automatically remove flags like LTO which break the build.

Installed fine and correctly to /usr/lib64 and I was able to run queries in the workbench without problems.
Comment 28 H.Habighorst 2013-09-01 17:58:35 UTC
Created attachment 357582 [details]
Updated ebuild

- patch CMakeLists.txt 
- depend on either libiodbc or unixODBC ( via USE flag iodbc )
--> default to iodbc use flag enabled
- directly set CMAKE configure option LIB_INSTALL_DIR for multilib
- remove internal bundled antlr runtime
- depend on antlr-c-3.4
Comment 29 H.Habighorst 2013-09-01 18:00:46 UTC
Created attachment 357584 [details, diff]
necessary patch for CMakeLists.txt

- patch includes the necessary changes to enable use flags for gnome-keyring
- to depend on either libiodbc or unixODBC
- to fix the check for files (needs PROJECT_SOURCE_DIR)
- to bail out if a library is not found
- removes internal bundled antlr-c library and adds a rudimentary check for antlr-c
- removes the version check
==> necessary as there seems to be no default CMake file for detecting antlr-c
Comment 30 H.Habighorst 2013-09-01 18:03:37 UTC
This should finish including the feedback of Hans de Graaf.

> Uhm, yes. We should probably see if we can't depend on x11-libs/fox instead. 
> I've been ignoring that issue for the 5.2 series :-/

Seems to be the only left item except for testing.
Comment 31 Alex Barker 2013-09-01 19:11:49 UTC
Created attachment 357588 [details]
build.log.gz

The updated ebuild continues to fail for me.  I have attached the output:  /var/tmp/portage/dev-db/mysql-workbench-6.0.6/work/mysql-workbench-community-6.0.6-src/plugins/migration/copytable/copytable.h:23:17: fatal error: sql.h: No such file or directory
Comment 32 H.Habighorst 2013-09-02 20:08:57 UTC
Created attachment 357708 [details, diff]
Fix Oracle provided FindIODBC.cmake script to properly set include path

The FindIODBC.cmake module sets the IODBC_INCLUDE_DIRS variable to empty.
This results in 2 problems:
a) not compiling if only libiodbc is present (sql.h missing)
b) taking unixODBC sql.h from /usr/include if unixODBC and libiodbc are both installed instead of /usr/include/iodbc/sql.h
=> fix this by stripping off "-I" from IODBC_DEFINITIONS ( iodbc-config --cflags )
=> this sets the include path correctly
Comment 33 H.Habighorst 2013-09-02 20:13:44 UTC
Created attachment 357710 [details, diff]
CMakeLists Patch: Take bundled antlr-c

I hitted crashes / segfaults with system antlr-c.

It seems that this bug: https://bugzilla.redhat.com/show_bug.cgi?id=966973 is related to the problem. I checked the 3.4 version and 3.5 version and It seems like the patches mentioned in the bug were only partially applied, but are fully applied to the bundled version of antlr-c.

To hit the bug, open an query window for a database connection. If it has not already crashed, it should as soon as the context help on the right side of the screen is opened... With the bundled antlr-c version, I cannot reproduce the segmentation faults. Tried to run 5-10 queries. Will try to test this further.

Sorry for the inconvenience.
Comment 34 H.Habighorst 2013-09-02 20:14:39 UTC
Created attachment 357712 [details]
Ebuild: Take bundled antlr-c instead of system antlr-c.

See CMakeLists.patch comment.
Comment 35 Jakub Caban 2013-09-03 08:25:19 UTC
I believe dev-python/paramiko should be dep of mysql-workbench. Otherwise SSH connections fails with:

Traceback (most recent call last):
  File "/usr/lib64/mysql-workbench/modules/wb_admin_grt.py", line 28, in <module>
    import wb_admin_main
  File "/usr/lib64/mysql-workbench/modules/wb_admin_main.py", line 35, in <module>
    from wb_admin_configuration_startup import WbAdminConfigurationStartup
  File "/usr/lib64/mysql-workbench/modules/wb_admin_configuration_startup.py", line 25, in <module>
    from wb_log_reader import ErrorLogFileReader
  File "/usr/lib64/mysql-workbench/modules/wb_log_reader.py", line 100, in <module>
    from wb_server_management import SudoTailInputFile, LocalInputFile, SFTPInputFile
  File "/usr/lib64/mysql-workbench/modules/wb_server_management.py", line 36, in <module>
    from wb_admin_ssh import WbAdminSSH, ConnectionError
  File "/usr/lib64/mysql-workbench/modules/wb_admin_ssh.py", line 136, in <module>
    log_warning(_this_file, 'Cannot use connect with timeout in paramiko version %s\n' % paramiko.__version__)
AttributeError: 'NoneType' object has no attribute '__version__'
Comment 36 Alex Barker 2013-09-03 18:07:11 UTC
Still having a lot of issues using the utility.

Right click and edit existing connection, click test connection and it crashes to prompt without message.

Removing stored connections crashes to prompt, no message.

Connecting to some stored connections cases another crash to prompt, no message.

Most of the errors seem to be related to the mysql connector.  The best I can get with gdb is the following:

Temporary breakpoint 1, main (argc=1, argv=0x7fffffffd8b8)
    at /var/tmp/portage/dev-db/mysql-workbench-6.0.6/work/mysql-workbench-community-6.0.6-src/frontend/linux/workbench/main.cpp:44
44      /var/tmp/portage/dev-db/mysql-workbench-6.0.6/work/mysql-workbench-community-6.0.6-src/frontend/linux/workbench/main.cpp: No such file or directory.
(gdb) continue 
Continuing.
** Message: Gnome keyring daemon seems to not be available. Stored passwords will be lost once quit
[New Thread 0x7fffedf58700 (LWP 6065)]
Ready.

** Message: no gnome keyring support

Program received signal SIGABRT, Aborted.
0x00007ffff0a3ff69 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64      ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007ffff0a3ff69 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007ffff0a4149f in __GI_abort () at abort.c:91
#2  0x0000003b5260e9ed in ?? () from /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/libgcc_s.so.1
#3  0x0000003b5260f437 in ?? () from /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/libgcc_s.so.1
#4  0x0000003b5260fd6b in _Unwind_RaiseException () from /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/libgcc_s.so.1
#5  0x0000003b52a63c41 in __cxa_throw () from /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/libstdc++.so.6
#6  0x00007ffff7f82ceb in sql::mysql::MySQL_Connection::init(std::map<sql::SQLString, boost::variant<int, double, bool, sql::SQLString, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_>, std::less<sql::SQLString>, std::allocator<std::pair<sql::SQLString const, boost::variant<int, double, bool, sql::SQLString, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_> > > >&) ()
   from /usr/lib64/libmysqlcppconn.so.6
#7  0x00007ffff7f96d6c in sql::mysql::MySQL_Connection::MySQL_Connection(sql::Driver*, sql::mysql::NativeAPI::NativeConnectionWrapper&, std::map<sql::SQLString, boost::variant<int, double, bool, sql::SQLString, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_>, std::less<sql::SQLString>, std::allocator<std::pair<sql::SQLString const, boost::variant<int, double, bool, sql::SQLString, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_> > > >&) () from /usr/lib64/libmysqlcppconn.so.6
#8  0x00007ffff7f96e39 in sql::mysql::MySQL_Driver::connect(std::map<sql::SQLString, boost::variant<int, double, bool, sql::SQLString, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_>, std::less<sql::SQLString>, std::allocator<std::pair<sql::SQLString const, boost::variant<int, double, bool, sql::SQLString, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_> > > >&) ()
   from /usr/lib64/libmysqlcppconn.so.6
#9  0x00007fffffff62e0 in ?? ()
#10 0x0000000000000000 in ?? ()
Comment 37 Alex Barker 2013-09-03 18:13:19 UTC
(In reply to Alex Barker from comment #36)
> Still having a lot of issues using the utility.
> 
> Right click and edit existing connection, click test connection and it
> crashes to prompt without message.
> 
> Removing stored connections crashes to prompt, no message.
> 
> Connecting to some stored connections cases another crash to prompt, no
> message.
> 

Scratch my last post, it looks like I needed to rebuild mysql-connector-c++.  I have everything running in gdb at the moment so I will report back with unusual crashes.
Comment 38 H.Habighorst 2013-09-08 08:24:26 UTC
Created attachment 358252 [details]
Readded python deps (paramiko / pexpect) from mysql-workbench-5.2.47-r1 ebuild
Comment 39 H.Habighorst 2013-09-08 11:49:22 UTC
MySQL Workbench 6.0.7 was released.

See bug #484220 for an updated ebuild.
Comment 40 Jeroen Roovers (RETIRED) gentoo-dev 2013-09-08 14:41:39 UTC
*** Bug 484220 has been marked as a duplicate of this bug. ***
Comment 41 Alex Barker 2013-09-09 17:50:07 UTC
Created attachment 358384 [details]
mysql-workbench-6.0.7-CMakeLists.patch.out

Seems that mysql-workbench-6.0.7-CMakeLists.patch is not applying.  The 6.0.6 version has been surprisingly stable though ;)
Comment 42 H.Habighorst 2013-09-09 20:55:01 UTC
Quote from your log:

|--- mysql-workbench-community-6.0.6-src.orig/CMakeLists.txt	2013-08-09 17:32:52.000000000 +0200
|+++ mysql-workbench-community-6.0.6-src/CMakeLists.txt	2013-09-02 21:34:33.553413501 +0200

Are you sure you picked the right patch?

https://484220.bugs.gentoo.org/attachment.cgi?id=358260

Should apply correctly to the ebuild for 6.0.7.
Comment 43 Alex Barker 2013-09-10 00:38:40 UTC
(In reply to H.Habighorst from comment #42)
> Quote from your log:
> 
> |--- mysql-workbench-community-6.0.6-src.orig/CMakeLists.txt	2013-08-09
> 17:32:52.000000000 +0200
> |+++ mysql-workbench-community-6.0.6-src/CMakeLists.txt	2013-09-02
> 21:34:33.553413501 +0200
> 
> Are you sure you picked the right patch?
> 
> https://484220.bugs.gentoo.org/attachment.cgi?id=358260
> 
> Should apply correctly to the ebuild for 6.0.7.

I am fairly confident that I did NOT apply the correct patch.  The attachment id 358260 is not an active attachment to this bug... where was the patch?
Comment 44 Hans de Graaff gentoo-dev Security 2013-10-19 13:49:42 UTC
I've now added mysql-workbench 6.0.7 to the gentoo tree. Thanks H.Habighorst for providing the initial and updated ebuilds, and to the other for testing.
Comment 45 H.Habighorst 2013-11-09 16:50:03 UTC
Created attachment 362884 [details]
Ebuild for MySQL Workbench 6.0.8

MySQL Workbench 6.0.8 ebuild
- version bump
- removed misleading comment
Comment 46 H.Habighorst 2013-11-09 16:51:24 UTC
Created attachment 362886 [details, diff]
mysql workbench 6.0.8 cmakelists patch

- adapted to upstream changes
Comment 47 H.Habighorst 2013-11-09 16:51:59 UTC
Created attachment 362888 [details, diff]
Fixup PCRE ldflags / inclusion to fix as_needed ldflag

- same as for version 6.0.7
Comment 48 Vasilis Lourdas 2013-11-09 16:55:44 UTC
Version 6.0.8 has already made the tree. See #490740.
Comment 49 H.Habighorst 2013-11-09 16:57:23 UTC
MySQL Workbench 6.0.8 was released on 2013-11-07.

They've even updated the Changelog Page:

http://dev.mysql.com/doc/relnotes/workbench/en/wb-news-6-0-8.html

I don't think the 6.0.* should be stabilized soon...

Oracle does not update the bug tracker entries "reliably", but I've hit this bug and can say that it really eats ALL of your memory (in my case ~ 16 GB!):

http://bugs.mysql.com/bug.php?id=70786
Comment 50 Hans de Graaff gentoo-dev Security 2013-11-10 07:55:46 UTC
(In reply to H.Habighorst from comment #49)
> MySQL Workbench 6.0.8 was released on 2013-11-07.

Thanks for the updated ebuilds. As it happens I already bumped it myself but that won't usually be the case. I've just checked your patches and we found the same solutions. :-)

> I don't think the 6.0.* should be stabilized soon...

I have no intention of doing that. I've just filed a stable bug for the most recent 5.2.47 version and I expect that to be our stable version for some time.