Project

General

Profile

Actions

Emulator Issues #9414

closed

Build fails with wxWidget3-GTK3

Added by sheepdestroyer over 8 years ago. Updated over 6 years ago.

Status:
Won't fix
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

On Fedora 23, wxWidget3 is tied to GTK3,

After forcing cmake to discover it (see https://bugs.dolphin-emu.org/issues/7555), builds will fail with gtk2 complaints :

[ 87%] Building CXX object Source/Core/DolphinWX/CMakeFiles/dolphin-emu.dir/AboutDolphin.cpp.o
In file included from /usr/include/wx-3.0/wx/arrstr.h:14:0,
                 from /home/sheepdestroyer/temp/dolphin/Source/Core/DolphinWX/X11Utils.h:18,
                 from /home/sheepdestroyer/temp/dolphin/Source/Core/DolphinWX/X11Utils.cpp:12:
/usr/include/wx-3.0/wx/defs.h:3412:31: error: conflicting declaration ‘typedef struct _GdkWindow GdkWindow’
     typedef struct _GdkWindow GdkWindow;
                               ^
In file included from /usr/include/gtk-2.0/gdk/gdkscreen.h:32:0,
                 from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:31,
                 from /usr/include/gtk-2.0/gdk/gdk.h:32,
                 from /usr/include/gtk-2.0/gtk/gtk.h:32,
                 from /home/sheepdestroyer/temp/dolphin/Source/Core/DolphinWX/X11Utils.h:16,
                 from /home/sheepdestroyer/temp/dolphin/Source/Core/DolphinWX/X11Utils.cpp:12:
/usr/include/gtk-2.0/gdk/gdktypes.h:114:39: note: previous declaration as ‘typedef struct _GdkDrawable GdkWindow’
 typedef struct _GdkDrawable           GdkWindow;
                                       ^
In file included from /usr/include/wx-3.0/wx/arrstr.h:14:0,
                 from /home/sheepdestroyer/temp/dolphin/Source/Core/DolphinWX/X11Utils.h:18,
                 from /home/sheepdestroyer/temp/dolphin/Source/Core/DolphinWX/MainNoGUI.cpp:118:
/usr/include/wx-3.0/wx/defs.h:3412:31: error: conflicting declaration ‘typedef struct _GdkWindow GdkWindow’
     typedef struct _GdkWindow GdkWindow;
                               ^
In file included from /usr/include/gtk-2.0/gdk/gdkscreen.h:32:0,
                 from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:31,
                 from /usr/include/gtk-2.0/gdk/gdk.h:32,
                 from /usr/include/gtk-2.0/gtk/gtk.h:32,
                 from /home/sheepdestroyer/temp/dolphin/Source/Core/DolphinWX/X11Utils.h:16,
                 from /home/sheepdestroyer/temp/dolphin/Source/Core/DolphinWX/MainNoGUI.cpp:118:
/usr/include/gtk-2.0/gdk/gdktypes.h:114:39: note: previous declaration as ‘typedef struct _GdkDrawable GdkWindow’
 typedef struct _GdkDrawable           GdkWindow;
                                       ^
Source/Core/DolphinWX/CMakeFiles/dolphin-emu-nogui.dir/build.make:86: recipe for target 'Source/Core/DolphinWX/CMakeFiles/dolphin-emu-nogui.dir/X11Utils.cpp.o' failed
make[2]: *** [Source/Core/DolphinWX/CMakeFiles/dolphin-emu-nogui.dir/X11Utils.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 87%] Building CXX object Source/Core/DolphinWX/CMakeFiles/dolphin-emu.dir/ControllerConfigDiag.cpp.o
Source/Core/DolphinWX/CMakeFiles/dolphin-emu-nogui.dir/build.make:62: recipe for target 'Source/Core/DolphinWX/CMakeFiles/dolphin-emu-nogui.dir/MainNoGUI.cpp.o' failed
make[2]: *** [Source/Core/DolphinWX/CMakeFiles/dolphin-emu-nogui.dir/MainNoGUI.cpp.o] Error 1
CMakeFiles/Makefile2:979: recipe for target 'Source/Core/DolphinWX/CMakeFiles/dolphin-emu-nogui.dir/all' failed
make[1]: *** [Source/Core/DolphinWX/CMakeFiles/dolphin-emu-nogui.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 87%] Building CXX object Source/Core/DolphinWX/CMakeFiles/dolphin-emu.dir/Cheats/CheatSearchTab.cpp.o
[ 87%] Building CXX object Source/Core/DolphinWX/CMakeFiles/dolphin-emu.dir/Cheats/CheatsWindow.cpp.o
In file included from /usr/include/gtk-2.0/gdk/gdkscreen.h:32:0,
                 from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:31,
                 from /usr/include/gtk-2.0/gdk/gdk.h:32,
                 from /usr/include/gtk-2.0/gtk/gtk.h:32,
                 from /home/sheepdestroyer/temp/dolphin/Source/Core/DolphinWX/X11Utils.h:16,
                 from /home/sheepdestroyer/temp/dolphin/Source/Core/DolphinWX/ControllerConfigDiag.cpp:37:
/usr/include/gtk-2.0/gdk/gdktypes.h:114:39: error: conflicting declaration ‘typedef struct _GdkDrawable GdkWindow’
 typedef struct _GdkDrawable           GdkWindow;
                                       ^
In file included from /usr/include/wx-3.0/wx/button.h:14:0,
                 from /home/sheepdestroyer/temp/dolphin/Source/Core/DolphinWX/ControllerConfigDiag.cpp:9:
/usr/include/wx-3.0/wx/defs.h:3412:31: note: previous declaration as ‘typedef struct _GdkWindow GdkWindow’
     typedef struct _GdkWindow GdkWindow;
                               ^
[ 87%] Building CXX object Source/Core/DolphinWX/CMakeFiles/dolphin-emu.dir/Cheats/CreateCodeDialog.cpp.o
Source/Core/DolphinWX/CMakeFiles/dolphin-emu.dir/build.make:110: recipe for target 'Source/Core/DolphinWX/CMakeFiles/dolphin-emu.dir/ControllerConfigDiag.cpp.o' failed
make[2]: *** [Source/Core/DolphinWX/CMakeFiles/dolphin-emu.dir/ControllerConfigDiag.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /usr/include/gtk-2.0/gdk/gdkscreen.h:32:0,
                 from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:31,
                 from /usr/include/gtk-2.0/gdk/gdk.h:32,
                 from /usr/include/gtk-2.0/gtk/gtk.h:32,
                 from /home/sheepdestroyer/temp/dolphin/Source/Core/DolphinWX/X11Utils.h:16,
                 from /home/sheepdestroyer/temp/dolphin/Source/Core/DolphinWX/Frame.h:24,
                 from /home/sheepdestroyer/temp/dolphin/Source/Core/DolphinWX/Cheats/CheatsWindow.cpp:33:
/usr/include/gtk-2.0/gdk/gdktypes.h:114:39: error: conflicting declaration ‘typedef struct _GdkDrawable GdkWindow’
 typedef struct _GdkDrawable           GdkWindow;
                                       ^
In file included from /usr/include/wx-3.0/wx/button.h:14:0,
                 from /home/sheepdestroyer/temp/dolphin/Source/Core/DolphinWX/Cheats/CheatsWindow.cpp:11:
/usr/include/wx-3.0/wx/defs.h:3412:31: note: previous declaration as ‘typedef struct _GdkWindow GdkWindow’
     typedef struct _GdkWindow GdkWindow;
                               ^
Source/Core/DolphinWX/CMakeFiles/dolphin-emu.dir/build.make:158: recipe for target 'Source/Core/DolphinWX/CMakeFiles/dolphin-emu.dir/Cheats/CheatsWindow.cpp.o' failed
make[2]: *** [Source/Core/DolphinWX/CMakeFiles/dolphin-emu.dir/Cheats/CheatsWindow.cpp.o] Error 1
CMakeFiles/Makefile2:930: recipe for target 'Source/Core/DolphinWX/CMakeFiles/dolphin-emu.dir/all' failed
make[1]: *** [Source/Core/DolphinWX/CMakeFiles/dolphin-emu.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
[sheepdestroyer@sheepora Build] $ 

Actions #1

Updated by sheepdestroyer over 8 years ago

on Fedora systems where wxWidget3-devel is installed, it will in fact be detected and build will fail by default (trying to use GTK2)

-- Found wxWidgets: -pthread;;;-lwx_gtk3u_xrc-3.0;-lwx_gtk3u_webview-3.0;-lwx_gtk3u_html-3.0;-lwx_gtk3u_qa-3.0;-lwx_gtk3u_adv-3.0;-lwx_gtk3u_core-3.0;-lwx_baseu_xml-3.0;-lwx_baseu_net-3.0;-lwx_baseu-3.0 (found version "3.0.2") 
-- Found wxWidgets: -pthread;;;-lwx_gtk3u_core-3.0;-lwx_gtk3u_aui-3.0;-lwx_gtk3u_adv-3.0;-lwx_baseu-3.0 (found version "3.0.2") 
Found wxWidgets version 3.0.2
-- Found GTK2_GTK: /usr/lib64/libgtk-x11-2.0.so  
wxWidgets found, enabling GUI build
Actions #2

Updated by sheepdestroyer over 8 years ago

So, the bug is in CmakeLists.txt :
instead of searching for the right GTK version, the search is hardcoded to GTK2,

Wwith the following quick and dirty modifications to force searching for GTK3, the build will complete successfully and be nicely themed and consistent with my GTK3 system :

from CmakeLists.txt line 829, change :

			check_lib(GTK3 gtk+-3.0 gtk+-3.0 gtk.h REQUIRED)
		else()
			include(FindGTK3)
			if(GTK3_FOUND)
				include_directories(${GTK3_INCLUDE_DIRS})
				list(APPEND LIBS ${GTK3_LIBRARIES})

I also needed to copy and use (I know nothing about dev, I am a mort) https://chromium.googlesource.com/external/Webkit/+/master/Source/cmake/FindGTK3.cmake
because by default cmake is not aware of GTK3 ; chromium carries this file, I think it would be OK for dolphin too.

As it is, build always fail if wxWidget3-devel libraries are installed on a fedora system.

If need be, I can open a new bug entry for Cmake's failure to check the right GTK version according to which wxWidget3 is linked to on the system. I do not feel like I would be able to make a clean PR myself though.

Actions #3

Updated by leoetlino over 6 years ago

  • Status changed from New to Won't fix

wxWidgets is bugged when compiled with GTK+3, so we can't really fix this.

Actions

Also available in: Atom PDF