Error on start FFS.

Get help for specific problems
Posts: 9
Joined: 9 Feb 2012

comandante1977

Hello.

Installed FFS 5.0. And I've got an error on start:
" GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is
not supported "

I have GTK+3.2.2 installed.

System - SLES11SP1.

Thanks
User avatar
Site Admin
Posts: 7279
Joined: 9 Dec 2007

Zenju

Did you compile manually? If you're using the precompiled or Launchpad
version, then you'll have a GTK 2 dependency baked in. However GTK 2 is not a
requirement of FFS, but of wxWidgets only. So if you're able to compile
wxWidgets with GTK 3, FFS shouldn't casue any trobule.

> Using GTK+ 2.x and GTK+ 3 in the same process is not supported
Weird. Seems like a wxWidgets bug/issue.
Posts: 9
Joined: 9 Feb 2012

comandante1977

All packages I compiled manually except wxWidgets, which I couldn't compile
with GTK3 (errors on make). So I installed wxGTK from repo.
As I can see now, wxWidget is still depends on GTK2. GTK3 support is only
planned in future release.

Just now found wxWidgets port to GTK3. Will try to recompile.

If wxWidgets will installed without errors have I recompile FFS?
User avatar
Site Admin
Posts: 7279
Joined: 9 Dec 2007

Zenju

FFS has a few "#include <gtk/gtk.h>" statements, which will include GTK3 on
your system, while the repostory version of wxGTK is built on GTK2. This is
the source of the mismatch.

> If wxWidgets will installed without errors have I recompile FFS?
Probably, in any way, just let the makefile resolve all dependencies.
Posts: 9
Joined: 9 Feb 2012

comandante1977

Unfortunately still no luck with compiling wxWidgets.
I've got errors like this:

./src/gtk/dataview.cpp: In member function ‘virtual bool
wxGtkDataViewModelNotifier::ValueChanged(const wxDataViewItem&, unsigned
int)’:
./src/gtk/dataview.cpp:1683:38: error: ‘GtkTreeViewColumn’ has no member named
‘button’
./src/gtk/dataview.cpp: In constructor
‘wxDataViewCtrlDCImpl::wxDataViewCtrlDCImpl(wxDC*, wxDataViewCtrl*)’:
./src/gtk/dataview.cpp:2370:78: error: ‘gtk_widget_get_colormap’ was not
declared in this scope
./src/gtk/dataview.cpp: In member function ‘virtual void
wxDataViewCustomRenderer::RenderText(const wxString&, int, wxRect, wxDC*,
int)’:
./src/gtk/dataview.cpp:2454:53: error: cannot convert ‘GdkWindow* {aka
_GdkWindow*}’ to ‘cairo_t* {aka _cairo*}’ for argument ‘2’ to ‘void
gtk_cell_renderer_render(GtkCellRenderer*, cairo_t*, GtkWidget*, const
GdkRectangle*, const GdkRectangle*, GtkCellRendererState)’
./src/gtk/dataview.cpp: In member function ‘gboolean
wxDataViewCtrlInternal::get_iter(GtkTreeIter*, GtkTreePath*)’:
./src/gtk/dataview.cpp:3861:42: warning: cast to pointer from integer of
different size
./src/gtk/dataview.cpp: In member function ‘gboolean
wxDataViewCtrlInternal::iter_next(GtkTreeIter*)’:
./src/gtk/dataview.cpp:3964:42: warning: cast to pointer from integer of
different size
./src/gtk/dataview.cpp: In member function ‘gboolean
wxDataViewCtrlInternal::iter_nth_child(GtkTreeIter*, GtkTreeIter*, gint)’:
./src/gtk/dataview.cpp:4118:42: warning: cast to pointer from integer of
different size
make: *** Error 1
User avatar
Site Admin
Posts: 7279
Joined: 9 Dec 2007

Zenju

From what I found on Google so far wxWidgets seems not ready for GTK+3 for a
while to come. So the solution to build FFS is to use GTK+2 everywhere.
I'm right now downloading SUSE 12.1. If I get it to run on VirtualBox I'll
check out how to make FFS work.
Posts: 9
Joined: 9 Feb 2012

comandante1977

Yes, it seems to be so. Let me know how it will work.
I will try for awhile to compile wxWidgets port.
Posts: 9
Joined: 9 Feb 2012

comandante1977

Finally I compiled wxWidgets with GTK3 with --disable-dataviewctrl option.
Compiling FFS get an error:

/usr/local/include/wx-2.9/wx/event.h: In member function ‘void
zen::Grid::redirectRowLabelEvent(wxMouseEvent&)’:
/usr/local/include/wx-2.9/wx/event.h:3023:18: error: ‘virtual bool
wxEvtHandler::ProcessEvent(wxEvent&)’ is inaccessible
wx+/grid.cpp:1546:33: error: within this context
make: *** Error 1
Posts: 9
Joined: 9 Feb 2012

comandante1977

In wx+/grid.cpp change
mainWin_->ProcessEvent(event);
to mainWin_->GetEventHandler()->ProcessEvent(event);

Error gone.

But new errors appears:

/usr/local/lib/libwx_gtk3u_adv-2.9.so: undefined reference to
`gdk_window_lookup_for_display'
/usr/local/lib/libwx_gtk3u_adv-2.9.so: undefined reference to
`gdk_window_clear_area'
/usr/local/lib/libwx_gtk3u_adv-2.9.so: undefined reference to
`GTK_WIDGET_REALIZED'
/usr/local/lib/libwx_gtk3u_adv-2.9.so: undefined reference to
`GTK_WIDGET_APP_PAINTABLE'
/usr/local/lib/libwx_gtk3u_adv-2.9.so: undefined reference to
`GTK_WIDGET_NO_WINDOW'
/usr/local/lib/libwx_gtk3u_adv-2.9.so: undefined reference to
`gdk_window_set_back_pixmap'
collect2: ld returned 1 exit status


Tired for today :)
User avatar
Site Admin
Posts: 7279
Joined: 9 Dec 2007

Zenju

> Finally I compiled wxWidgets with GTK3 with --disable-dataviewctrl option.
> Compiling FFS get an error:
I didn't get any errors when compiling wxWidgets 2.9.3 development release
using
./configure --with-gtk --disable-debug --enable-unicode
Did you use the same instruction?

> wx+/grid.cpp:1546:33: error: within this context
They deprecated this call in wxWidgets 2.9.3. I've fixed the source code
accordingly.

Generally I'll try to make FFS free from libgtkmm. Now with gtk3 on suse,
managing the makefiles and build instructions isn't worth the few lines that
can be rewritten using gtk directly.
Posts: 9
Joined: 9 Feb 2012

comandante1977

> I didn't get any errors when compiling wxWidgets 2.9.3 development release
using ./configure --with-gtk --disable-debug --enable-unicode Did you use the
same instruction?



Do you compiled with GTK3?
On my attempts compiling wxWidgets 2.9.3 witn GTK3 I've got next errors:

/Distr/wxWidgets-2.9.3/bk-deps g++ -c -o coredll_gtk_app.o
-I./.pch/wxprec_coredll -D__WXGTK__ -DWXBUILDING -I./src/regex
-I./src/expat/lib -DWXUSINGDLL -DWXMAKINGDLL_CORE -DwxUSE_BASE=0 -fPIC -DPIC
-Wall -Wundef -Wunused-parameter -Wno-ctor-dtor-privacy -Woverloaded-virtual
-D_FILE_OFFSET_BITS=64 -DwxDEBUG_LEVEL=0
-I/Distr/wxWidgets-2.9.3/lib/wx/include/gtk2-unicode-2.9 -I./include
-DGSEAL_ENABLE -pthread -I/opt/gtk/include/gtk-3.0
-I/usr/local/include/atk-1.0 -I/usr/local/include/cairo -I/usr/local/include
/gdk-pixbuf-2.0 -I/usr/local/include/pango-1.0 -I/usr/local/include/glib-2.0
-I/usr/local/lib/glib-2.0/include -I/usr/local/include/pixman-1
-I/usr/local/include/libpng15 -I/usr/include/freetype2 -DG_DISABLE_CAST_CHECKS
-DWX_PRECOMP -pthread -O2 -fno-strict-aliasing -fvisibility=hidden
-fvisibility-inlines-hidden ./src/gtk/app.cpp
./src/gtk/app.cpp: In member function ‘virtual bool wxApp::OnInitGui()’:
./src/gtk/app.cpp:236:57: error: ‘gtk_widget_get_default_visual’ was not
declared in this scope
./src/gtk/app.cpp:238:62: error: ‘gdk_colormap_new’ was not declared in this
scope
./src/gtk/app.cpp:239:51: error: ‘gtk_widget_set_default_colormap’ was not
declared in this scope
./src/gtk/app.cpp:255:73: error: ‘gdk_colormap_new’ was not declared in this
scope
./src/gtk/app.cpp:256:59: error: ‘gtk_widget_set_default_colormap’ was not
declared in this scope
./src/gtk/app.cpp:263:77: error: ‘gdk_colormap_new’ was not declared in this
scope
./src/gtk/app.cpp:264:63: error: ‘gtk_widget_set_default_colormap’ was not
declared in this scope
./src/gtk/app.cpp: In member function ‘virtual bool wxApp::Initialize(int&,
wxChar**)’:
./src/gtk/app.cpp:290:9: warning: ‘void g_thread_init(gpointer)’ is deprecated
(declared at /usr/local/include/glib-2.0/glib/deprecated/gthread.h:259)
./src/gtk/app.cpp:290:27: warning: ‘void g_thread_init(gpointer)’ is
deprecated (declared at
/usr/local/include/glib-2.0/glib/deprecated/gthread.h:259)
make: *** Error 1
User avatar
Site Admin
Posts: 7279
Joined: 9 Dec 2007

Zenju

> Do you compiled with GTK3?
A clear "maybe". I didn't specify a specific GTK version when building
wxWidgets, so I'd expect it to use the currently installed version which is
GTK3, even if wxWidgets says it's using GTK2.
How did you instruct wxWidgets to explicitly use GTK3?
User avatar
Site Admin
Posts: 7279
Joined: 9 Dec 2007

Zenju

Success! Compiles and runs on openSuse 12.1 x64 with wxWidgets 2.9.3 using the
default build instructions.
I don't get any GTK+3 vs GTK+2 errors during runtime, so it must be a pure
GTK+2 build.
Posts: 9
Joined: 9 Feb 2012

comandante1977

While checking environment wxWidgets wants gtk+-2.0.pc pkgconfig file. I have
GTK+2 installed through YAST, so I haven't such file. GTK+3 installed from
sources, so I simply made a symlink to gtk+-3.0.pc. And in this way wxWidget
use GTK+3 libraries.
User avatar
Site Admin
Posts: 7279
Joined: 9 Dec 2007

Zenju

Here are the updated source files:
[404, Invalid URL: http://www.2shared.com/file/ZtM7bwgG/FFS_Source_v51_beta.html]

I also updated Compile.txt and included instructions for Suse. This should
work now for a pure GTK+2 build.

However I would recomment to use the older stable wxWidgets release 2.8.11 for
testing. The 2.9 series is still relatively buggy.
Posts: 9
Joined: 9 Feb 2012

comandante1977

Today continued to try fix wxWidget GTK3 port to compile FFS in GTK3
environment.

/usr/local/lib/libwx_gtk3u_adv-2.9.so: undefined reference to
`gdk_window_lookup_for_display'
Fix - in ../src/gtk/eggtrayicon.c gdk_window_lookup_for_display changed to
gdk_x11_window_lookup_for_display
_
/usr/local/lib/libwx_gtk3u_adv-2.9.so: undefined reference to
`gdk_window_set_back_pixmap'_
Fix - in ../src/gtk/eggtrayicon.c gdk_window_set_back_pixmap changed to
gdk_window_set_background_pattern

Errors
/usr/local/lib/libwx_gtk3u_adv-2.9.so: undefined reference to
`gdk_window_clear_area'
/usr/local/lib/libwx_gtk3u_adv-2.9.so: undefined reference to
`GTK_WIDGET_REALIZED'
/usr/local/lib/libwx_gtk3u_adv-2.9.so: undefined reference to
`GTK_WIDGET_APP_PAINTABLE'
/usr/local/lib/libwx_gtk3u_adv-2.9.so: undefined reference to
`GTK_WIDGET_NO_WINDOW'

are still presents. I'm not a developer at all. :)
As I can see some functions was withdrawn from GTK3 and how to migrate it I
dont know. :)