Bug #40958 Unable to run mysql-workbench-5.1.4alpha on mandriva 2009.0
Submitted: 23 Nov 2008 17:39 Modified: 26 Dec 2008 12:28
Reporter: Raphaël Gertz Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench Severity:S1 (Critical)
Version:5.1.4alpha OS:Linux (Mandriva 2009.0)
Assigned to: Alfredo Kojima CPU Architecture:Any

[23 Nov 2008 17:39] Raphaël Gertz
Description:
After patching to be able to build mysql-workbench with previously reported patch, i tried to run the binary.

I only get a segfault on splash screen step...

Env setup (emulate the strater script lines) :
[user@localhost ~]$ basedirname=/usr
[user@localhost ~]$ export LD_LIBRARY_PATH="/usr/lib/mysql-workbench:$LD_LIBRARY_PATH"
[user@localhost ~]$ export MWB_DATA_DIR="$basedirname/share/mysql-workbench"
[user@localhost ~]$ export MWB_MODULE_DIR="$basedirname/lib/mysql-workbench/modules"
[user@localhost ~]$ export MWB_PLUGIN_DIR="$basedirname/lib/mysql-workbench/plugins"
[user@localhost ~]$ export DBC_DRIVER_PATH="$basedirname/lib/mysql-workbench"

Gdb backtrace :
[user@localhost ~]$ gdb /usr/bin/mysql-workbench-bin 
GNU gdb 6.8-2mdv2009.0 (Mandriva Linux release 2009.0)
Copyright (C) 2008 Free Software Foundation, Inc.     
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.           
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"   
and "show warranty" for details.                                             
This GDB was configured as "i586-mandriva-linux-gnu"...                      
(gdb) run                                                                    
Starting program: /usr/bin/mysql-workbench-bin                               
[Thread debugging using libthread_db enabled]                                
[New Thread 0xb54f4730 (LWP 22181)]                                          
Detaching after fork from child process 22184.                               
[New Thread 0xb5162b90 (LWP 22185)]                                          
Detaching after fork from child process 22186.                               
Detaching after fork from child process 22187.                               
Detaching after fork from child process 22188.                               
Detaching after fork from child process 22189.                               
Detaching after fork from child process 22190.                               

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb5162b90 (LWP 22185)]        
0xb7cb4db6 in find_child_object (list=@0xb5161610, id=@0xb5161984, recursive=true, visited=@0xb51617f8) at grtpp.h:182
182         inline Type type() const { return _value ? _value->get_type() : UnknownType; }                            
Missing debug package(s), you should install: GConf2-debug ORBit2-debug atk1.0-debug audiofile-debug avahi-debug cairo-debug cairomm-debug dbus-debug dbus-glib-debug e2fsprogs-debug esound-debug fontconfig-debug freetype2-debug gcc-debug glib2.0-debug glibc-debug glibmm2.4-debug gnome-vfs2-debug gtk+2.0-debug gtkmm2.4-debug ia_ora-gnome-debug libbonobo-debug libglade2.0-debug libgnome2-debug libpng-debug libsigc++2.0-debug libx11-debug libxau-debug libxcb-debug libxcomposite-debug libxcursor-debug libxdamage-debug libxdmcp-debug libxext-debug libxfixes-debug libxi-debug libxinerama-debug libxml2-debug libxrandr-debug libxrender-debug libzip-debug lua-debug ncurses-debug openssl-debug pango-debug pangomm-debug pcre-debug pixman-debug readline-debug rpm-debug zlib-debug                           
(gdb) bt
#0  0xb7cb4db6 in find_child_object (list=@0xb5161610, id=@0xb5161984, recursive=true, visited=@0xb51617f8) at grtpp.h:182
#1  0xb7cb49f5 in find_child_object (object=@0xb51616b8, id=@0xb5161984, recursive=true, visited=@0xb51617f8) at grtpp_util.cpp:407
#2  0xb7cb4855 in find_child_object (object=@0xb516179c, id=@0xb5161984, recursive=true, visited=@0xb51617f8) at grtpp_util.cpp:431
#3  0xb7cb3eab in find_child_object (dict=@0xb5161850, id=@0xb5161984, recursive=true, visited=@0xb51617f8) at grtpp_util.cpp:358  
#4  0xb7cb5465 in grt::find_child_object (dict=@0xb5161850, id=@0xb5161984, recursive=<value optimized out>) at grtpp_util.cpp:454 
#5  0xb7c95a7f in grt::GRT::find_object_by_id (this=0x7000000, id=@0xb5161984, subpath=@0x83513b0) at grtpp_grt.cpp:394            
#6  0xb7ce1e2a in grt::internal::Unserializer::traverse_xml_recreating_tree (this=0xb5162084, node=0x983c088) at unserializer.cpp:204
#7  0xb7ce042a in grt::internal::Unserializer::unserialize_object_contents (this=0xb5162084, object=@0xb5161b48, node=0x7000000) at unserializer.cpp:458
#8  0xb7ce0d3d in grt::internal::Unserializer::unserialize_object_step2 (this=0xb5162084, node=0x983bb78) at unserializer.cpp:420                       
#9  0xb7ce13d6 in grt::internal::Unserializer::traverse_xml_recreating_tree (this=0xb5162084, node=0x983bb78) at unserializer.cpp:357                   
#10 0xb7ce1c17 in grt::internal::Unserializer::traverse_xml_recreating_tree (this=0xb5162084, node=0x9825db0) at unserializer.cpp:337                   
#11 0xb7ce042a in grt::internal::Unserializer::unserialize_object_contents (this=0xb5162084, object=@0xb5161ee8, node=0x7000000) at unserializer.cpp:458
#12 0xb7ce0d3d in grt::internal::Unserializer::unserialize_object_step2 (this=0xb5162084, node=0x97ead88) at unserializer.cpp:420                       
#13 0xb7ce13d6 in grt::internal::Unserializer::traverse_xml_recreating_tree (this=0xb5162084, node=0x97ead88) at unserializer.cpp:357                   
#14 0xb7ce2956 in grt::internal::Unserializer::unserialize_from_xml (this=0xb5162084, node=0x97ead88) at unserializer.cpp:129                           
#15 0xb7ce2a08 in grt::internal::Unserializer::unserialize_xmldoc (this=0x7000000, doc=0x7000000) at unserializer.cpp:118                               
#16 0xb7ce2cc8 in grt::internal::Unserializer::load_from_xml (this=0xb5162084, path=@0xb51621d0, doctype=0x0, docversion=0x0) at unserializer.cpp:95    
#17 0xb7c925bc in grt::GRT::unserialize (this=0x7000000, path=@0xb51621d0) at grtpp_grt.cpp:427
---Type <return> to continue, or q <return> to quit---
#18 0x0831dfdb in wb::WBComponentPhysical::setup_context_grt (this=0x96043d8, grt=0x7000000, options=0x7000000) at wb_component_physical.cpp:499
#19 0x081a2f25 in wb::WBContext::setup_context_grt (this=0x95fc860, grt=0x95ff3b0, options=0xbfd01a90) at wb_context.cpp:514
#20 0x081a31ed in sigc::internal::slot_call1<sigc::bind_functor<-1, sigc::bound_mem_functor2<grt::ValueRef, wb::WBContext, grt::GRT*, wb::WBOptions*>, wb::WBOptions*, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil>, grt::ValueRef, grt::GRT*>::call_it (rep=0x97d36f8, a_1=@0xb5162278)
    at /usr/include/sigc++-2.0/sigc++/functors/mem_fun.h:1917
#21 0xb7c0efd9 in GRTSimpleTask::execute (this=0x97d3768, grt=0x95ff3b0) at /usr/include/sigc++-2.0/sigc++/functors/slot.h:515
#22 0xb7c0b935 in bec::GRTDispatcher::execute_task (this=0x9600610, gtask=0x97d3768) at grt_dispatcher.cpp:566
#23 0xb7c0ce78 in bec::GRTDispatcher::worker_thread (data=0x9600610) at grt_dispatcher.cpp:400
#24 0xb7273724 in ?? () from /usr/lib/libglib-2.0.so.0
#25 0xb7028315 in start_thread () from /lib/i686/libpthread.so.0
#26 0xb6eacdde in clone () from /lib/i686/libc.so.6
(gdb) quit

How to repeat:
Install mandriva 2009.0 i586.

Patch to allow build :
diff -urNp configure.in.orig configure.in
--- configure.in.orig	2008-10-15 22:29:09.145592501 +0200
+++ configure.in	2008-10-15 23:02:23.455591149 +0200
@@ -218,7 +218,7 @@ if test $enable_php = yes; then
     AC_MSG_RESULT(not found)
   else
 # php-config --prefix ?
-    PHP_LIBS="/usr/lib/php5/lib/libphp5.a -L[$(php-config --extension-dir)] $PHP_LIBS"
+    PHP_LIBS="-L[$(php-config --extension-dir)] $PHP_LIBS -llua"
     PHP_CFLAGS=[$(php-config --includes)]
     ENABLED_MODULES="$ENABLED_MODULES -DENABLE_PHP_MODULES"
     AC_MSG_RESULT($PHP_LIBS)
diff -urNp frontend/linux/sqlide/Makefile.am.orig frontend/linux/sqlide/Makefile.am
--- frontend/linux/sqlide/Makefile.am.orig	2008-11-06 22:40:40.000000000 +0100
+++ frontend/linux/sqlide/Makefile.am	2008-11-23 15:45:50.486454303 +0100
@@ -15,3 +15,6 @@ INCLUDES=@GLIB_CFLAGS@ @SIGC_CFLAGS@ @GR
 
 libsqlide_la_SOURCES=\
         sql_editor_fe.cpp
+
+SCINTILLA_LIBS=$(top_srcdir)/ext/scintilla/gtk/libscintilla.la
+libsqlide_la_LDFLAGS=$(SCINTILLA_LIBS)
diff -urNp backend/wbcanvas/Makefile.am.orig backend/wbcanvas/Makefile.am
--- backend/wbcanvas/Makefile.am.orig	2008-11-06 22:40:39.000000000 +0100
+++ backend/wbcanvas/Makefile.am	2008-11-23 15:45:26.959451949 +0100
@@ -54,3 +54,5 @@ libcanvasbe_la_SOURCES=\
 	../objimpl/workbench.logical/workbench_logical_Model.cpp\
 	../objimpl/workbench.logical/workbench_logical_View.cpp
 
+CANVAS_LIBS=$(top_srcdir)/library/canvas/src/libmdcanvas.la
+libcanvasbe_la_LDFLAGS=$(CANVAS_LIBS) -lGL
diff -urNp backend/grt/Makefile.am.orig backend/grt/Makefile.am
--- backend/grt/Makefile.am.orig	2008-11-06 22:40:38.000000000 +0100
+++ backend/grt/Makefile.am	2008-11-23 15:45:04.316714077 +0100
@@ -27,3 +27,5 @@ libgrtbe_la_SOURCES=\
 	tree_model.cpp\
 	ui_form.cpp
 
+GRT_LIBS=$(top_srcdir)/library/grt/src/libgrt.la
+libgrtbe_la_LDFLAGS=$(GRT_LIBS) -luuid
diff -urNp library/grt/src/Makefile.am.orig library/grt/src/Makefile.am
--- library/grt/src/Makefile.am.orig	2008-11-06 22:40:41.000000000 +0100
+++ library/grt/src/Makefile.am	2008-11-23 15:45:15.418459707 +0100
@@ -41,7 +41,8 @@ libgrt_la_SOURCES=\
 	diff/grtdiff.cpp\
 	diff/grtlistdiff.cpp
 
-
+CANVAS_LIBS=$(top_srcdir)/library/utilities/src/libguiutil.la
+libgrt_la_LDFLAGS=$(CANVAS_LIBS) -llua
 
 if BUILD_JAVA
 # no extra sources

Then building with this spec file :
%define libname %mklibname 0
%define ver alpha

Summary:	Extensible modeling tool for MySQL 5.0
Name:		mysql-workbench
Group:		Databases
Version:	5.1.4
Release:	%mkrel 0.%{ver}.1
License:	GPL
URL:		http://www.mysql.com/products/workbench/
Source:		ftp://ftp.mysql.com/pub/mysql/download/gui-tools/%{name}-%{version}-%{ver}.tar.bz2
Patch:		mysql-workbench-5.1.4-alpha-buildfix.patch
BuildRequires: autoconf2.5
BuildRequires: automake
BuildRequires: readline-devel
BuildRequires: libtool
BuildRequires: libzip1-devel
BuildRequires: libxml2-devel
BuildRequires: libsigc++2.0-devel
BuildRequires: libglade2.0-devel >= 2.5
BuildRequires: libgtkmm2.4-devel >= 2.6
BuildRequires: libgnome32-devel >= 1.4
BuildRequires: libmesaglu1-devel
BuildRequires: mysql-devel >= 5.0
BuildRequires: liblua-devel
BuildRequires: pcre-devel >= 5.0
BuildRequires: gcc-c++
BuildRequires: libgnome2-devel
BuildRequires: libpango1.0-devel
BuildRequires: libcairo-devel  >= 1.3.12
BuildRequires: libglitz-devel
BuildRequires: gtk2-devel
BuildRequires: libctemplate-devel
BuildRequires: libpython2.5-devel
BuildRequires: libfcgi0-devel

BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root

%description 
MySQL Workbench is modeling tool that allows you to design and generate MySQL
databases graphically.

MySQL Workbench requires OpenGL and a 3D accelerated graphics card with at
least 16MB of memory.

This is MySQL Workbench %{wb_realversion}.

%prep
%setup -q -n %{name}-%{version}-%{ver}
%patch -p0

# strip away annoying ^M
find . -type f|xargs file|grep 'CRLF'|cut -d: -f1|xargs perl -p -i -e 's/\r//'
find . -type f|xargs file|grep 'text'|cut -d: -f1|xargs perl -p -i -e 's/\r//'

export CPPFLAGS="-D_GNU_SOURCE=1"

# workbench
sh ./autogen.sh \
    --prefix=%{_prefix} \
    --bindir=%{_bindir} \
    --sbindir=%{_sbindir} \
    --sysconfdir=%{_sysconfdir} \
    --datadir=%{_datadir} \
    --includedir=%{_includedir} \
    --libdir=%{_libdir} \
    --libexecdir=%{_libexecdir} \
    --localstatedir=%{_localstatedir}/lib \
    --mandir=%{_mandir} \
    --enable-pcheaders \
	--enable-php-modules \
	--enable-readline \
	--enable-fastcgi \
	--enable-python-modules

%configure2_5x \
    --enable-pcheaders \
	--enable-php-modules \
	--enable-readline \
	--enable-fastcgi \
	--enable-python-modules

%build
%make

%install
rm -rf %{buildroot}
%makeinstall_std

# fix some menu entries and stuff...
install -d %{buildroot}%{_miconsdir}
install -d %{buildroot}%{_iconsdir}
install -d %{buildroot}%{_liconsdir}

rm -f %{buildroot}%{_datadir}/applications/MySQLWorkbench.desktop
cat > %{buildroot}%{_datadir}/applications/mysql-workbench.desktop << EOF
[Desktop Entry]
Name=MySQL Workbench
Comment=MySQL Database Design Tool
Exec=%{_bindir}/mysql-workbench
Terminal=false
Type=Application
Icon=mysql-workbench
Categories=X-MandrivaLinux-MoreApplications-Databases;GTK;Database;Development;Application;
EOF

# make some icons
cp %{buildroot}%{_datadir}/mysql-workbench/images/MySQLWorkbench-16.png %{buildroot}%{_miconsdir}/mysql-workbench.png
cp %{buildroot}%{_datadir}/mysql-workbench/images/MySQLWorkbench-32.png %{buildroot}%{_iconsdir}/mysql-workbench.png
cp %{buildroot}%{_datadir}/mysql-workbench/images/MySQLWorkbench-48.png %{buildroot}%{_liconsdir}/mysql-workbench.png

%if %mdkversion < 200900
%post -n mysql-workbench
%update_menus
%endif

%if %mdkversion < 200900
%postun -n mysql-workbench
%clean_menus
%endif

%clean
rm -rf %{buildroot}

%files 
%defattr(-, root, root)
%doc mysql-workbench/COPYING
%doc mysql-workbench/ChangeLog
%doc mysql-workbench/README.linux
%attr(0755,root,root) %{_bindir}/grtshell
%attr(0755,root,root) %{_bindir}/mysql-workbench
%attr(0755,root,root) %{_bindir}/mysql-workbench-bin

%{_datadir}/mysql-workbench/*
%{_datadir}/mysql-workbench/images/*
%{_datadir}/mysql-workbench/modules/data/*
%{_datadir}/applications/mysql-workbench.desktop

%{_iconsdir}/mysql-workbench.png
%{_liconsdir}/mysql-workbench.png
%{_miconsdir}/mysql-workbench.png

%{_libdir}/mysql-workbench/*.so.*
%{_libdir}/mysql-workbench/modules/*.so.*
%{_libdir}/mysql-workbench/plugins/*.so.*
%exclude %{_libdir}/mysql-workbench/*.so
%exclude %{_libdir}/mysql-workbench/*.a
%exclude %{_libdir}/mysql-workbench/*.la
%exclude %{_libdir}/mysql-workbench/modules/*.so
%exclude %{_libdir}/mysql-workbench/modules/*.a
%exclude %{_libdir}/mysql-workbench/modules/*.la
%exclude %{_libdir}/mysql-workbench/plugins/*.so
%exclude %{_libdir}/mysql-workbench/plugins/*.a
%exclude %{_libdir}/mysql-workbench/plugins/*.la

%changelog
* Wed Oct 15 2008 Raphaël Gertz <rapsys@free.fr> 5.1.4-1.alpha.0mdv2009.1
- 5.1.4-alpha4
- initial Mandriva package

Suggested fix:
I don't have any
[26 Nov 2008 12:25] Alfredo Kojima
Have you tried building by hand instead of from the spec?
Also, try building without the extra flags (like python support etc), these are not working at the moment.
WB builds and works in most other distros, I don't know what could be so different about mandriva.
[27 Dec 2008 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".