[openSuse] Can't compile ANY of example games

It exits with “Compilation of events failed, and scene cannot be previewed. Please report this problem to Game Develop’s developer, joining this file:
/tmp/GDTemporaries/compilationErrors.txt”

Logs:

[code]Please send this file to CompilGames@gmail.com, or include this content when reporting the problem to Game Develop’s developer.
Veuillez envoyer ce fichier à CompilGames@gmail.com, ou l’inclure lorsque vous rapportez ce problème au développeur de Game Develop.

Clang output:
In file included from /tmp/GDTemporaries/0x9a15a90events.cpp:3:
In file included from include/GDL/GDL/ObjectTools.h:6:
In file included from /usr/include/c++/4.5/map:59:
/usr/include/c++/4.5/bits/stl_tree.h:140:3: error: unknown type name ‘_GLIBCXX_PURE’
_GLIBCXX_PURE _Rb_tree_node_base*
^
/usr/include/c++/4.5/bits/stl_tree.h:140:35: error: expected ‘;’ after top level declarator
_GLIBCXX_PURE _Rb_tree_node_base*
^
;
/usr/include/c++/4.5/bits/stl_tree.h:143:3: error: unknown type name ‘_GLIBCXX_PURE’
_GLIBCXX_PURE const _Rb_tree_node_base*
^
/usr/include/c++/4.5/bits/stl_tree.h:143:17: error: expected unqualified-id
_GLIBCXX_PURE const _Rb_tree_node_base*
^
/usr/include/c++/4.5/bits/stl_tree.h:146:3: error: unknown type name ‘_GLIBCXX_PURE’
_GLIBCXX_PURE _Rb_tree_node_base*
^
/usr/include/c++/4.5/bits/stl_tree.h:146:35: error: expected ‘;’ after top level declarator
_GLIBCXX_PURE _Rb_tree_node_base*
^
;
/usr/include/c++/4.5/bits/stl_tree.h:149:3: error: unknown type name ‘_GLIBCXX_PURE’
_GLIBCXX_PURE const _Rb_tree_node_base*
^
/usr/include/c++/4.5/bits/stl_tree.h:149:17: error: expected unqualified-id
_GLIBCXX_PURE const _Rb_tree_node_base*
^
/usr/include/c++/4.5/bits/stl_tree.h:311:33: error: must use ‘struct’ tag to refer to type ‘_Rb_tree_node_base’ in this scope
_Rb_tree_node_base* __x,
^
struct
/usr/include/c++/4.5/bits/stl_tree.h:312:33: error: must use ‘struct’ tag to refer to type ‘_Rb_tree_node_base’ in this scope
_Rb_tree_node_base* __p,
^
struct
/usr/include/c++/4.5/bits/stl_tree.h:313:33: error: must use ‘struct’ tag to refer to type ‘_Rb_tree_node_base’ in this scope
_Rb_tree_node_base& __header) throw ();
^
struct
/usr/include/c++/4.5/bits/stl_tree.h:315:3: error: must use ‘struct’ tag to refer to type ‘_Rb_tree_node_base’ in this scope
_Rb_tree_node_base*
^
struct
/usr/include/c++/4.5/bits/stl_tree.h:316:52: error: expected expression
_Rb_tree_rebalance_for_erase(_Rb_tree_node_base* const __z,
^
/usr/include/c++/4.5/bits/stl_tree.h:317:40: error: expected ‘;’ after top level declarator
_Rb_tree_node_base& __header) throw ();
^
;
/usr/include/c++/4.5/bits/stl_tree.h:328:15: error: must use ‘struct’ tag to refer to type ‘_Rb_tree_node_base’ in this scope
typedef _Rb_tree_node_base* _Base_ptr;
^
struct
/usr/include/c++/4.5/bits/stl_tree.h:329:21: error: must use ‘struct’ tag to refer to type ‘_Rb_tree_node_base’ in this scope
typedef const _Rb_tree_node_base* _Const_Base_ptr;
^
struct
/usr/include/c++/4.5/bits/stl_tree.h:429:4: error: must use ‘struct’ tag to refer to type ‘_Rb_tree_node_base’ in this scope
_Rb_tree_node_base _M_header;
^
struct
/usr/include/c++/4.5/bits/stl_tree.h:1549:3: error: unknown type name ‘_GLIBCXX_PURE’
_GLIBCXX_PURE unsigned int
^
/usr/include/c++/4.5/bits/stl_tree.h:1549:17: error: expected unqualified-id
_GLIBCXX_PURE unsigned int
^
In file included from /tmp/GDTemporaries/0x9a15a90events.cpp:18:
In file included from include/GDL/GDL/LightweightCommonTools.h:13:
In file included from /usr/include/c++/4.5/sstream:38:
In file included from /usr/include/c++/4.5/istream:39:
In file included from /usr/include/c++/4.5/ios:42:
In file included from /usr/include/c++/4.5/bits/ios_base.h:42:
/usr/include/c++/4.5/bits/locale_classes.h:393:5: error: unknown type name ‘_GLIBCXX_CONST’
_GLIBCXX_CONST static const char*
^
/usr/include/c++/4.5/bits/locale_classes.h:393:20: error: expected member name or ‘;’ after declaration specifiers
_GLIBCXX_CONST static const char*
~~~~~~~~~~~~~~ ^
In file included from /tmp/GDTemporaries/0x9a15a90events.cpp:18:
In file included from include/GDL/GDL/LightweightCommonTools.h:13:
In file included from /usr/include/c++/4.5/sstream:38:
In file included from /usr/include/c++/4.5/istream:39:
In file included from /usr/include/c++/4.5/ios:44:
In file included from /usr/include/c++/4.5/bits/basic_ios.h:38:
In file included from /usr/include/c++/4.5/bits/locale_facets.h:2600:
/usr/include/c++/4.5/bits/locale_facets.tcc:135:3: error: unknown type name ‘_GLIBCXX_PURE’
_GLIBCXX_PURE bool
^
/usr/include/c++/4.5/bits/locale_facets.tcc:135:17: error: expected unqualified-id
_GLIBCXX_PURE bool
^
/usr/include/c++/4.5/bits/locale_facets.tcc:356:21: error: no member named ‘__verify_grouping’ in namespace ‘std’
if (!std::__verify_grouping(__lc->_M_grouping,
~~~~~^
/usr/include/c++/4.5/bits/locale_facets.tcc:553:16: error: no member named ‘__verify_grouping’ in namespace ‘std’
if (!std::__verify_grouping(__lc->_M_grouping,
~~~~~^[/code]

I am running 32-bit openSuSE 11.3 (Linux) if that’s help.

//edit: GD version is 2.0.1541.53179 Release according to about box. Please help quickly as this renders this tool useless for me.

hello,

Because Game Develop supports Ubuntu only and Windows, it uses a specific version (the version provided on the last version of Ubuntu : 4.6) of the compiler. Your distribution may not have a compatible compiler.
But, you can try to install the last libstdc++6 development packages.

Then maybe you could refactor your code so it’ll use more common gcc version (which is 4.3 to 4.5 I believe)? This way it’ll work on gcc 4.6 since it is compatible with it’s older versions (heck, my friend even recompiled on one of recent svn builds of gcc code which was originally compiled with gcc 2.x, he didn’t remember exact version but who would because he wanted to take advantage of new optimalizations and he didn’t have to change single line of code).

But will try to install headers, thanks.

//edit: Updating headers didn’t help. Same error, different logs.
pastebin.com/NLZZzP5P

Game Develop is not internally using GCC but Clang ( clang.llvm.org/ ).
The main problem is that, as the code generated by Game Develop from the events is making a lot of calls to functions exposed by extensions or Game Develop itself, we must ensure that Game Develop, its extensions, and the generated code are compatible.

This can be achieved mainly by using the same headers for GD compilation and for events compilation.
On windows, as there is no default compiler and so no default headers, Game Develop is shipped with TDM-GCC 4.5 headers ( which is the compiler used to compile Game Develop ).
On linux, as Game Develop is for now officially only supported on Ubuntu ( It’s very hard to make a program distribution independent. It’s even hard to make the program working on two different versions of Ubuntu. ), I assumed that headers are available and are the same as the one used to compile GD.

Even the compilation would have succeeded, it is risky as the headers provided by openSuse are not necessary compatible with the one used during GD compilation ( Some objects like std::string may have different structure in memory ) and it could result in weird crash.
It is by the way quite strange that Clang wasn’t able to use your headers.

What I can do is to identify all of the headers needed on linux and ship them with GD, forcing the internal compiler ( Clang ) to use them instead of system headers.
In this case, the compilation should be effective on any distribution, provided that GD can be launched on this distribution.

Provide the header of libstdc++ is the best way but you have to provide the compiled libstdc++6.so with the game.

Isn’t GD Open Source? If so, where I can get sources (if I compile GD by myself, I suppose it’ll work).

No, Game Develop isn’t open-source, it’s only free as it costs nothing.

OK, so when you’ll fix this issue? Did you read logs? Some of these errors are most basic ones like missing curly brackets, type identifiers or semicolons…

//edit: From pastebin I posted earlier link to:

Clang output: In file included from /tmp/GDTemporaries/0x9a26488events.cpp:1: In file included from include/GDL/GDL/CommonInstructions.h:8: In file included from /usr/include/c++/4.6/string:40: /usr/include/c++/4.6/bits/stringfwd.h:42:15: error: expected '{' namespace std _GLIBCXX_VISIBILITY(default) ^ /usr/include/c++/4.6/bits/stringfwd.h:42:15: error: C++ requires a type specifier for all declarations namespace std _GLIBCXX_VISIBILITY(default) ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/4.6/bits/stringfwd.h:42:35: error: expected expression namespace std _GLIBCXX_VISIBILITY(default) ^ /usr/include/c++/4.6/bits/stringfwd.h:42:43: error: expected ';' after top level declarator namespace std _GLIBCXX_VISIBILITY(default) ^ ;

The error seems happen in a gcc header file. I think the error happens because of a problem with the macro _GLIBCXX_VISIBILITY(defaut).
But, the only way to fix this bug is to provide GCC headers with GD.

Wait for 4ian, he has certainly an idea to fix this bug and it’s the only one Game Develop developer. :wink:

OK, thanks. But after some research, I’ve found out that problem might be Clang itself…

Sorry for bump, but is there any progress on fixing it? I may play role of tester if you want.

I’ve checked in Clang sources : Clang has some include directories for openSuse, but they seems to be for openSuse 11.1 and for an older ( 4.3 ) version of GCC.
I will release a test version shipped with (hopefully) all the needed include files, making ( hopefully ) GD more distro-independant.

Here is a version with includes files provided with GD : compilgames.net/dl/gd2010543linux.tar.lzma

Let me know if compilation is now working or not.

The link doesn’t work :wink:

Fixed, thanks. :slight_smile:

Above post is related to my issue too! Yay!

Now I must start to learn this, probably by trial&error since wiki is incomplete.

I’m not sure I understood, is GD running correctly now ? ( Your screenshot is a bit weird but I assume that you modified the game so there is nothing wrong :slight_smile: )

Yes! And no, didn’t modify anything, just ran 3DEngineAndPhysics.gdg. It’s an example of wolf3d-like game.

Works on Arch Linux.
Only one bug : the ribbon categories are always folded.
(and I’ve no texture but I’m using a virtual box to test)

I’ve corrected this issue, the ribbon should now be properly display on any OS :slight_smile: