Compilation error after upgrading cegui and ogre to 2.0

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

jjonj
Not too shy to talk
Not too shy to talk
Posts: 28
Joined: Fri Mar 21, 2014 22:11

Compilation error after upgrading cegui and ogre to 2.0

Postby jjonj » Sat May 02, 2015 22:04

Hey there!

I'm in the process of upgrading a ogre 1.8 project into 2.0 and have upgraded cegui as well.
For that we have a setup script that compiles ogre, cegui as well as a number of other things on windows.

I'm compiling using mingw 4.7.3. I'm using CEGUI from here: https://github.com/OpenTechEngine/CEGUI

I get a number of errors looking like this error:

Code: Select all

In file included from c:\mingw\bin../lib/gcc/i686-w64-mingw32/4.7.3/include/xmmintrin.h:36:0,
from C:/mingw/OgreSDK/include/OGRE/OgreCommon.h:35,
from C:/mingw/OgreSDK/include/OGRE/OgreMath.h:34,
from D:/Users/jacob/Documents/git/ThriveDirectReview2/src/engine/serialization.h:7,
from D:\Users\jacob\Documents\git\ThriveDirectReview2\src\engine\engine.cpp:8:
c:\mingw\bin../lib/gcc/i686-w64-mingw32/4.7.3/include/mmintrin.h:53:1: error: previous declaration of 'void _m_empty()' with 'C++' linkage
In file included from C:/mingw/install/include/glm/core/setup.hpp:549:0,
from C:/mingw/install/include/glm/glm.hpp:89,
from C:/mingw/install/include/cegui-9999/CEGUI/../CEGUI/Size.h:37,
from C:/mingw/install/include/cegui-9999/CEGUI/../CEGUI/Rect.h:33,
from C:/mingw/install/include/cegui-9999/CEGUI/../CEGUI/Image.h:33,
from C:/mingw/install/include/cegui-9999/CEGUI/../CEGUI/BitmapImage.h:30,
from C:/mingw/install/include/cegui-9999/CEGUI/../CEGUI/CEGUI.h:37,
from D:\Users\jacob\Documents\git\ThriveDirectReview2\src\engine\engine.cpp:21:


Looking at /glm/core/setup.hpp:549:0 we have:

Code: Select all

    if defined(MINGW32) && (GLM_ARCH != GLM_ARCH_PURE)
    include intrin.h
    endif



So it seems like ogre 2.0 is using xmmintrin from gcc, and cegui is using intrin.h from GLM and both of these headers define pretty much the same interface.

All of the the relevant source code can be found here: https://github.com/Revolutionary-Games/ ... ee/ogre2.0
The powershell scripts that are responsible for downloading and compiling ogre and cegui themselves can be found here:
https://github.com/Revolutionary-Games/ ... ingw_setup
Note that this is NOT where the compilation fails, the compilation fails when trying to compile the actual game and not ogre/cegui.

An issue with comments explaining the process that have been gone through in attempting to get this working on windows can be found here: https://github.com/Revolutionary-Games/ ... t-97486668

So can anyone help me figure out what's going wrong? Should both intrin and mmintrin be included and if so, what causes the definition collisions?
Hope you can help, thanks!

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Compilation error after upgrading cegui and ogre to 2.0

Postby Ident » Sun May 03, 2015 10:40

Would be extremely helpful to know what CEGUI version that is. The one page says 0.8.3, is that correct?
CrazyEddie: "I don't like GUIs"

jjonj
Not too shy to talk
Not too shy to talk
Posts: 28
Joined: Fri Mar 21, 2014 22:11

Re: Compilation error after upgrading cegui and ogre to 2.0

Postby jjonj » Sun May 03, 2015 16:31

Thanks for having a look!
As far as I know it is 0.8.3 but possibly with some minor changes seemingly unrelated to the errors.
If you think trying a different version/source of cegui could solve the issue then I'd be happy to try!
It's worth noting that this combination has compiled and worked on linux (not by myself).

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Compilation error after upgrading cegui and ogre to 2.0

Postby Ident » Sun May 03, 2015 21:09

After looking at it again I dont think a different version of CEGUI will solve this. This seems to be related to those two includes being in public namespace (am I right?) and conflicting. I am not sure why glm does things the way it does.

Was the system compiled on where the error occured a 64bit system? Was the program compiled in 64bit? Maybe the macro used by glm is insufficient. Either way it seems that only one of those headers may be included at a time. Also as far as a comment on this is correct, intrin.h is not supported on mingw, only the *intrin.h files are: http://stackoverflow.com/questions/2520 ... -directory

Sorry that I can't really be of help here. Have you checked if the latest glm version does anything different in regards to the includes? Also you might want to ask them about it. They are quite active as well.
CrazyEddie: "I don't like GUIs"

jjonj
Not too shy to talk
Not too shy to talk
Posts: 28
Joined: Fri Mar 21, 2014 22:11

Re: Compilation error after upgrading cegui and ogre to 2.0

Postby jjonj » Sun May 03, 2015 21:38

This seems to be related to those two includes being in public namespace (am I right?) and conflicting

Yep.
Was the system compiled on where the error occured a 64bit system? Was the program compiled in 64bit?

64bit windows 8.1, program is 32bit.
Either way it seems that only one of those headers may be included at a time.

Why am I the only one having this issue seemingly :S

Also as far as a comment on this is correct, intrin.h is not supported on mingw, only the *intrin.h files

I have intrin.h with my mingw 4.7.3 distribution!

Sorry that I can't really be of help here. Have you checked if the latest glm version does anything different in regards to the includes?

I'll have to check! Asking on the glm forums might be a good idea since it's basically a glm + mingw issue.

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Compilation error after upgrading cegui and ogre to 2.0

Postby Ident » Sun May 03, 2015 21:47

jjonj wrote:I'll have to check! Asking on the glm forums might be a good idea since it's basically a glm + mingw issue.

Yea, I think that even if we knew a solution we couldn't provide something that will always work because it has to be done on the side of the library that introduces the issue.

If only you have the issue then I would strongly recommend to check what exact versions your dependencies (glm, and whatever it conflicts with) are and to compare it with the version of those who have no issues. We lately had issues with a row of Linux users who couldn't render CEGUI anymore correctly, turned out they had a glm update they didnt know of and that caused the issue. It was fixed for the next Release but yea, the source of the issue was very hard to figure out given the fact that no one told us what packages had gotten updated on their computers shortly before it stopped working.
CrazyEddie: "I don't like GUIs"

jjonj
Not too shy to talk
Not too shy to talk
Posts: 28
Joined: Fri Mar 21, 2014 22:11

Re: Compilation error after upgrading cegui and ogre to 2.0

Postby jjonj » Mon May 04, 2015 11:54

Will do, thanks for your assistance.

jjonj
Not too shy to talk
Not too shy to talk
Posts: 28
Joined: Fri Mar 21, 2014 22:11

Re: Compilation error after upgrading cegui and ogre to 2.0

Postby jjonj » Tue May 05, 2015 21:04



Return to “Help”

Who is online

Users browsing this forum: No registered users and 12 guests