Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails on archlinux64 #1

Closed
fdev31 opened this issue Jul 2, 2014 · 20 comments
Closed

Build fails on archlinux64 #1

fdev31 opened this issue Jul 2, 2014 · 20 comments

Comments

@fdev31
Copy link

fdev31 commented Jul 2, 2014

Using gtk-3.12.2 and wxgtk-3.0.0, I get the following traceback while building on some Archlinux system:

In file included from /usr/include/gtk-3.0/gdk/gdkapplaunchcontext.h:30:0,
                 from /usr/include/gtk-3.0/gdk/gdk.h:32,
                 from /usr/include/gtk-3.0/gtk/gtk.h:30,
                 from /tmp/gd/src/GD-build/Core/GDCore/IDE/Dialogs/ResourcesEditor.cpp:55:
/usr/include/gtk-3.0/gdk/gdktypes.h:127:39: erreur: conflicting declaration ‘typedef struct _GdkWindow GdkWindow’
 typedef struct _GdkWindow             GdkWindow;
                                       ^
In file included from /usr/include/wx-3.0/wx/treectrl.h:18:0,
                 from /tmp/gd/src/GD-build/Core/./GDCore/IDE/Dialogs/ResourcesEditor.h:10,
                 from /tmp/gd/src/GD-build/Core/GDCore/IDE/Dialogs/ResourcesEditor.cpp:8:
/usr/include/wx-3.0/wx/defs.h:3396:33: note: previous declaration as ‘typedef struct _GdkDrawable GdkWindow’
     typedef struct _GdkDrawable GdkWindow;
                                 ^
Core/CMakeFiles/GDCore.dir/build.make:1522: recipe for target 'Core/CMakeFiles/GDCore.dir/GDCore/IDE/Dialogs/ResourcesEditor.cpp.o' failed
make[2]: *** [Core/CMakeFiles/GDCore.dir/GDCore/IDE/Dialogs/ResourcesEditor.cpp.o] Error 1
CMakeFiles/Makefile2:78: recipe for target 'Core/CMakeFiles/GDCore.dir/all' failed
make[1]: *** [Core/CMakeFiles/GDCore.dir/all] Error 2
Makefile:75: recipe for target 'all' failed
make: *** [all] Error 2

Is it some familiar definition conflict to you ?
What are the supported gtk/wx versions ? I'm really not sure it's a bug, or eventually in the cmake files...

@4ian
Copy link
Owner

4ian commented Jul 2, 2014

I never had this error, maybe the problem is in wxgtk-3.0.0. I've found this thread where the issue seems similar: http://forums.wxwidgets.org/viewtopic.php?t=37593&p=153082

Be sure to to a "make clean", then try to do a "./configure --with-gtk=2", then "make" and "make install" to force the use of GTK+2 instead of GTK+3... But it's quite strange, I've successfully built GD on Ubuntu with GTK+3.

@victorlevasseur
Copy link
Contributor

Try to build Game Develop using WxWidgets 3.0.1.

@4ian
Copy link
Owner

4ian commented Aug 24, 2014

It should be fixed with GTK3 and wxWidgets 3.0.1, I'm closing the issue, re-open another one if still facing a similar issue :)

@4ian 4ian closed this as completed Aug 24, 2014
@FocusGFX
Copy link

FocusGFX commented Oct 3, 2014

today I tried building GD on fedora-20-x86_64 and I have the same error, what is the solution ?
using wxWidgets-3.0.1

@4ian
Copy link
Owner

4ian commented Oct 3, 2014

Could you paste here the errors messages ?
First, you could check if wxWidgets is built to be used with GTK3 (as GD is now referring explicitly to GTK3, such error will arise if wxWidgets is built using GTK2) (and so my previous messages were probably wrong, when I said to use --with-gtk=2! On the contrary, GTK3 should always be used).

I reopen the issue so that we can try to find a solution. 😃

@4ian 4ian reopened this Oct 3, 2014
@FocusGFX
Copy link

FocusGFX commented Oct 3, 2014

today I tried to build it again after building wxwidgets with ./configure --with-gtk=2 and it gave me the same error, and it looks like it still includes gtk3 !

[  7%] Building CXX object Core/CMakeFiles/GDCore.dir/GDCore/IDE/Dialogs/LayoutEditorCanvas/LayoutEditorCanvas.cpp.o
In file included from /usr/include/gtk-3.0/gdk/gdkapplaunchcontext.h:30:0,
                 from /usr/include/gtk-3.0/gdk/gdk.h:32,
                 from /usr/include/gtk-3.0/gdk/gdkx.h:28,
                 from /mnt/4/Downloads/Linux/GameDevelopment/GameDevelop/GD/Core/GDCore/IDE/Dialogs/LayoutEditorCanvas/LayoutEditorCanvas.cpp:37:
/usr/include/gtk-3.0/gdk/gdktypes.h:127:39: error: conflicting declaration ‘typedef struct _GdkWindow GdkWindow’
 typedef struct _GdkWindow             GdkWindow;
                                       ^
In file included from /usr/local/include/wx-3.0/wx/event.h:14:0,
                 from /usr/local/include/wx-3.0/wx/window.h:18,
                 from /usr/local/include/wx-3.0/wx/panel.h:19,
                 from /mnt/4/Downloads/Linux/GameDevelopment/GameDevelop/GD/Core/GDCore/IDE/Dialogs/LayoutEditorCanvas/LayoutEditorCanvas.h:10,
                 from /mnt/4/Downloads/Linux/GameDevelopment/GameDevelop/GD/Core/GDCore/IDE/Dialogs/LayoutEditorCanvas/LayoutEditorCanvas.cpp:7:
/usr/local/include/wx-3.0/wx/defs.h:3414:33: error: ‘GdkWindow’ has a previous declaration as ‘typedef struct _GdkDrawable GdkWindow’
     typedef struct _GdkDrawable GdkWindow;
                                 ^
make[2]: *** [Core/CMakeFiles/GDCore.dir/GDCore/IDE/Dialogs/LayoutEditorCanvas/LayoutEditorCanvas.cpp.o] Error 1
make[1]: *** [Core/CMakeFiles/GDCore.dir/all] Error 2

@4ian
Copy link
Owner

4ian commented Oct 3, 2014

Yes, as I said in my previous comment GTK3 is always included and used by GD. So wxWidgets has to use it: try to compile wxWidgets with ./configure --with-gtk=3 😉

@victorlevasseur
Copy link
Contributor

I've already built GD on Arch Linux x64 and I needed some special config for wxwidgets as GCC 4.9.0/1 has a bug with wxwidgets : you should add -fno-strict-aliasing to the CXXFLAGS when using ./configure

@4ian
Copy link
Owner

4ian commented Oct 3, 2014

So the commandline to use to build wxWidgets should be ./configure CXXFLAGS="-fno-strict-aliasing" --with-gtk=3
(@victorlevasseur, correct me if I make a mistake :))

@victorlevasseur
Copy link
Contributor

Yes, but I don't remember if that fixed this error and no another one.

@FocusGFX
Copy link

FocusGFX commented Oct 3, 2014

[4ian]
well, building wxwidgets with
./configure --enable-ribbon --enable-webview --with-gtk-3
successfully builds. using gcc 4.8
thanks for your help.

[victorlevasseur]
using 4.8 gcc, so no need for -fno-strict-aliasing CXXFLAGS, thanks

@FocusGFX
Copy link

FocusGFX commented Oct 3, 2014

something weird though, the web export only works with firefox, but not chrome, any one know why ?

@4ian
Copy link
Owner

4ian commented Oct 3, 2014

Excellent!! I close the issue.
For the web export, exported files should be sent to a web server otherwise Chrome disallow the loading of local files. :) (When previewing, GD creates a mini web server so that it works with any browser).

Do you think you would be able to create a package for Archlinux ?

@4ian 4ian closed this as completed Oct 3, 2014
@FocusGFX
Copy link

FocusGFX commented Oct 3, 2014

You want me to create an rpm for Archlinux you mean ?

@FocusGFX
Copy link

FocusGFX commented Oct 3, 2014

I totally forgot about chrome not loading files without a web server, thanks

@victorlevasseur
Copy link
Contributor

@4ian you should add a note in the doc to say that you cant use GCC 4.9.

@4ian
Copy link
Owner

4ian commented Oct 3, 2014

@FocusGFX Yes, if you have some spare time, you could create a rpm 😄 (or better, a script that is used to create it, like a PKGBUILD script).

@victorlevasseur Is the error with GCC 4.9 only related to wxWidgets?

@FocusGFX
Copy link

FocusGFX commented Oct 3, 2014

[4ian]
actually, I'm in a middle of a project right now, but I guess I'll finish it by tomorrow or the day after.
when I'm done with it I'll create the rpm.

@4ian
Copy link
Owner

4ian commented Oct 5, 2014

@FocusGFX Thanks, let me know if you get something working or need help! 😃

Bouh referenced this issue in Bouh/GDevelop Dec 4, 2019
Bouh referenced this issue in Bouh/GDevelop Dec 4, 2019
Bouh referenced this issue in Bouh/GDevelop Dec 21, 2019
Bouh referenced this issue in Bouh/GDevelop Dec 25, 2019
@Bouh
Copy link
Collaborator

Bouh commented Feb 16, 2020

Oops
I will no use hashtags in next comments for avoid to create references.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants