LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-26-2014, 10:48 PM   #1
GreenFireFly
Member
 
Registered: Jul 2013
Posts: 218

Rep: Reputation: Disabled
Question WXGTK3 Problem


Hello Everyone,

I used to have WXGTK 2.9.4 but i upgrade to WXGTK 3.0.2 from Slackbuilds.
But now when i try to compile dolphin-emu i keep getting this error

/usr/include/gtk-2.0/gdk/gdktypes.h:114:39: error: 'GdkWindow' has a previous declaration as 'typedef struct _GdkDrawable GdkWindow'
typedef struct _GdkDrawable GdkWindow;
^
make[2]: *** [Source/Core/DolphinWX/CMakeFiles/dolphin-emu.dir/X11Utils.cpp.o] Error 1
make[1]: *** [Source/Core/DolphinWX/CMakeFiles/dolphin-emu.dir/all] Error 2
make: *** [all] Error 2

How can i fix this?

BTW I'm running Slackware 14.1 64bit. Also if i downgrade to WXGTK 2.9.4
it compiles with any issue.
 
Old 10-27-2014, 04:28 PM   #2
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,891

Rep: Reputation: 1928Reputation: 1928Reputation: 1928Reputation: 1928Reputation: 1928Reputation: 1928Reputation: 1928Reputation: 1928Reputation: 1928Reputation: 1928Reputation: 1928
i have contacted Larry (dolphin-emu maintainer in SBo) about this and he will investigate this issue this weekend
 
Old 10-27-2014, 10:20 PM   #3
GreenFireFly
Member
 
Registered: Jul 2013
Posts: 218

Original Poster
Rep: Reputation: Disabled
Smile

Hello willysr,

Thank you very much.
 
Old 10-28-2014, 02:01 AM   #4
a4z
Senior Member
 
Registered: Feb 2009
Posts: 1,727

Rep: Reputation: 745Reputation: 745Reputation: 745Reputation: 745Reputation: 745Reputation: 745Reputation: 745
not all applications are wxGTK3 ready,
for example, last time I looked at CodeBlocks there was no way to build it with v3.
could be that this has changed meanwhile in the nightlies,

but what I want to say, check the homepage of the program and look if it supports wxWidgets 3
 
Old 10-28-2014, 11:17 AM   #5
larryhaja
Member
 
Registered: Jul 2008
Distribution: Slackware 13.1
Posts: 305

Rep: Reputation: 80
Quote:
Originally Posted by GreenFireFly View Post
/usr/include/gtk-2.0/gdk/gdktypes.h:114:39: error: 'GdkWindow' has a previous declaration as 'typedef struct _GdkDrawable GdkWindow'
typedef struct _GdkDrawable GdkWindow;
^
make[2]: *** [Source/Core/DolphinWX/CMakeFiles/dolphin-emu.dir/X11Utils.cpp.o] Error 1
make[1]: *** [Source/Core/DolphinWX/CMakeFiles/dolphin-emu.dir/all] Error 2
make: *** [all] Error 2
Other platforms are having similar issues with wxGTK3.
https://code.google.com/p/dolphin-em...detail?id=7555
https://bugzilla.redhat.com/show_bug.cgi?id=1124402
https://code.google.com/p/dolphin-em...detail?id=7069

The issue is that you have wxGTK3 built with gtk3 and dolphin is pulling in gtk2. It is explicitly looking for gtk2 once wxWidgets is found. Unfortunately, the cmake/gtk3 package in Slackware 14.1 doesn't come with a FindGTK3.cmake file so you have to update the CMakeLists.txt file to search for the proper gtk.h header file and gtk3 libs. I've created a patch that allows dolphin-emu to build with gtk3 and can be applied by adding "patch -p1 < $CWD/wxGTK3.patch" before the "mkdir build" step in dolphin-emu.SlackBuild.
Code:
diff -Naur dolphin-4.0.2.orig/CMakeLists.txt dolphin-4.0.2/CMakeLists.txt
--- dolphin-4.0.2.orig/CMakeLists.txt	2013-11-29 21:05:19.000000000 +0000
+++ dolphin-4.0.2/CMakeLists.txt	2014-10-28 14:54:54.694148746 +0000
@@ -702,18 +702,13 @@
 		# gdk-pixbuf-2.0.  On yet another hand, cmake version 2.8.3 in
 		# Ubuntu Natty does not find the glib libraries correctly.
 		# Ugly!!!
-		execute_process(COMMAND lsb_release -c -s
-			OUTPUT_VARIABLE DIST_NAME
-			ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
-		if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}
-				VERSION_EQUAL 2.8.2 OR "${DIST_NAME}" STREQUAL "natty")
-			check_lib(GTK2 gtk+-2.0 gtk.h REQUIRED)
-		else()
-			include(FindGTK2)
-			if(GTK2_FOUND)
-				include_directories(${GTK2_INCLUDE_DIRS})
-			endif()
-		endif()
+		execute_process(COMMAND
+				pkg-config --libs gtk+-3.0
+				OUTPUT_VARIABLE GTK3_LIBS_OUT
+				OUTPUT_STRIP_TRAILING_WHITESPACE)
+		set(GTK3_LIBS_OUT "${GTK3_LIBS_OUT}")
+		check_lib(GTK3 gtk+-3.0 gtk.h REQUIRED)
+		set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GTK3_LIBS_OUT}")
 	endif()
 
 	if(wxWidgets_FOUND)
I haven't tested the patch to see if dolphin runs correctly when build against gtk3 but dolphin does compile correctly with this patch.

NB: I don't plan to support this patch. In fact, I'm planning on using "-DDISABLE_WX:BOOL=ON" in the cmake step in order to bypass any wxWidgets requirements. dolphin-emu doesn't require wxWidgets to run anyways and I'll let upstream fix this.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Do I have a path problem, an Apache2 problem or a Javascript problem or any other pro rblampain Linux - Networking 0 12-29-2010 03:50 AM
Slackware 12.0: boot problem & sudo / wifi-radar problem War_Ensemble Slackware 7 01-15-2008 09:49 AM
Sound Card problem(every time i install linux i have diffirent hardware problem) jacka1l Linux - Newbie 7 08-11-2005 06:10 AM
Lan configuration problem - NFS boot problem - RX&TX packets errors 242VDM242 Linux - Networking 4 11-25-2004 01:35 PM
perl problem? apache problem? cgi problem? WorldBuilder Linux - Software 1 09-17-2003 07:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration