Compilation error - 0.4.3 and 0.4.4 - Slackware 64 current

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Post Reply
Message
Author
sombragris
Space Krill
Posts: 3
Joined: Wed Jan 14, 2015 9:25 pm

Compilation error - 0.4.3 and 0.4.4 - Slackware 64 current

#1 Post by sombragris »

Hi there,

I cannot compile FreeOrion on Slackware64-current (Linux). I have met all dependencies.

Compilation fails at about 48% with this output:

Code: Select all

Scanning dependencies of target pagedgeometry
[ 48%] Building CXX object PagedGeometry/CMakeFiles/pagedgeometry.dir/source/BatchedGeometry.cpp.o
In file included from /tmp/SBo/freeorion-code-7708-tags-RELEASE_V_0_4_4/PagedGeometry/source/BatchedGeometry.cpp:35:0:
/tmp/SBo/freeorion-code-7708-tags-RELEASE_V_0_4_4/PagedGeometry/include/BatchedGeometry.h: In constructor 'Forests::BatchedGeometry::BatchedGeometry(Ogre::SceneManager*, Ogre::SceneNode*)':
/tmp/SBo/freeorion-code-7708-tags-RELEASE_V_0_4_4/PagedGeometry/include/BatchedGeometry.h:190:31: warning: 'Forests::BatchedGeometry::m_pParentSceneNode' will be initialized after [-Wreorder]
       Ogre::SceneNode*        m_pParentSceneNode;
                               ^
/tmp/SBo/freeorion-code-7708-tags-RELEASE_V_0_4_4/PagedGeometry/include/BatchedGeometry.h:185:31: warning:   'bool Forests::BatchedGeometry::m_bWithinFarDistance' [-Wreorder]
       bool                    m_bWithinFarDistance;
                               ^
/tmp/SBo/freeorion-code-7708-tags-RELEASE_V_0_4_4/PagedGeometry/source/BatchedGeometry.cpp:74:1: warning:   when initialized here [-Wreorder]
 BatchedGeometry::BatchedGeometry(Ogre::SceneManager *mgr, Ogre::SceneNode *rootSceneNode) :
 ^
In file included from /tmp/SBo/freeorion-code-7708-tags-RELEASE_V_0_4_4/PagedGeometry/source/BatchedGeometry.cpp:35:0:
/tmp/SBo/freeorion-code-7708-tags-RELEASE_V_0_4_4/PagedGeometry/include/BatchedGeometry.h:185:31: warning: 'Forests::BatchedGeometry::m_bWithinFarDistance' will be initialized after [-Wreorder]
       bool                    m_bWithinFarDistance;
                               ^
/tmp/SBo/freeorion-code-7708-tags-RELEASE_V_0_4_4/PagedGeometry/include/BatchedGeometry.h:176:31: warning:   'bool Forests::BatchedGeometry::m_Built' [-Wreorder]
       bool                    m_Built;
                               ^
/tmp/SBo/freeorion-code-7708-tags-RELEASE_V_0_4_4/PagedGeometry/source/BatchedGeometry.cpp:74:1: warning:   when initialized here [-Wreorder]
 BatchedGeometry::BatchedGeometry(Ogre::SceneManager *mgr, Ogre::SceneNode *rootSceneNode) :
 ^
In file included from /tmp/SBo/freeorion-code-7708-tags-RELEASE_V_0_4_4/PagedGeometry/source/BatchedGeometry.cpp:35:0:
/tmp/SBo/freeorion-code-7708-tags-RELEASE_V_0_4_4/PagedGeometry/include/BatchedGeometry.h:178:31: warning: 'Forests::BatchedGeometry::m_vecCenter' will be initialized after [-Wreorder]
       Ogre::Vector3           m_vecCenter;
                               ^
/tmp/SBo/freeorion-code-7708-tags-RELEASE_V_0_4_4/PagedGeometry/include/BatchedGeometry.h:177:31: warning:   'bool Forests::BatchedGeometry::m_BoundsUndefined' [-Wreorder]
       bool                    m_BoundsUndefined;
                               ^
/tmp/SBo/freeorion-code-7708-tags-RELEASE_V_0_4_4/PagedGeometry/source/BatchedGeometry.cpp:74:1: warning:   when initialized here [-Wreorder]
 BatchedGeometry::BatchedGeometry(Ogre::SceneManager *mgr, Ogre::SceneNode *rootSceneNode) :
 ^
In file included from /tmp/SBo/freeorion-code-7708-tags-RELEASE_V_0_4_4/PagedGeometry/source/BatchedGeometry.cpp:35:0:
/tmp/SBo/freeorion-code-7708-tags-RELEASE_V_0_4_4/PagedGeometry/include/BatchedGeometry.h: In constructor 'Forests::BatchedGeometry::SubBatch::SubBatch(Forests::BatchedGeometry*, Ogre::SubEntity*)':
/tmp/SBo/freeorion-code-7708-tags-RELEASE_V_0_4_4/PagedGeometry/include/BatchedGeometry.h:130:28: warning: 'Forests::BatchedGeometry::SubBatch::m_pBestTechnique' will be initialized after [-Wreorder]
          Ogre::Technique*  m_pBestTechnique;       ///< Technique recalculated every frame
                            ^
/tmp/SBo/freeorion-code-7708-tags-RELEASE_V_0_4_4/PagedGeometry/include/BatchedGeometry.h:118:28: warning:   'Ogre::VertexData* Forests::BatchedGeometry::SubBatch::m_pVertexData' [-Wreorder]
          Ogre::VertexData* m_pVertexData;          ///<
                            ^
/tmp/SBo/freeorion-code-7708-tags-RELEASE_V_0_4_4/PagedGeometry/source/BatchedGeometry.cpp:460:1: warning:   when initialized here [-Wreorder]
 BatchedGeometry::SubBatch::SubBatch(BatchedGeometry *parent, SubEntity *ent) :
 ^
In file included from /usr/include/OGRE/OgreHardwareBuffer.h:33:0,
                 from /usr/include/OGRE/OgreHardwareVertexBuffer.h:33,
                 from /usr/include/OGRE/OgreVertexIndexData.h:32,
                 from /usr/include/OGRE/OgreRenderOperation.h:32,
                 from /usr/include/OGRE/OgreRenderable.h:34,
                 from /usr/include/OGRE/OgreNode.h:38,
                 from /usr/include/OGRE/OgreSceneNode.h:33,
                 from /usr/include/OGRE/OgreSceneManager.h:37,
                 from /usr/include/OGRE/OgreSceneManagerEnumerator.h:33,
                 from /usr/include/OGRE/OgreRoot.h:36,
                 from /tmp/SBo/freeorion-code-7708-tags-RELEASE_V_0_4_4/PagedGeometry/source/BatchedGeometry.cpp:16:
/tmp/SBo/freeorion-code-7708-tags-RELEASE_V_0_4_4/PagedGeometry/source/BatchedGeometry.cpp: In member function 'void Forests::BatchedGeometry::SubBatch::addSubEntity(Ogre::SubEntity*, const Ogre::Vector3&, const Ogre::Quaternion&, const Ogre::Vector3&, const Ogre::ColourValue&, void*)':
/usr/include/OGRE/OgreException.h:265:126: error: invalid conversion from 'int' to 'Ogre::Exception::ExceptionCodes' [-fpermissive]
 #define OGRE_EXCEPT(code, desc, src)         Ogre::ExceptionFactory::throwException(code, code, desc, src, __FILE__, __LINE__)
                                                                                                                              ^
/tmp/SBo/freeorion-code-7708-tags-RELEASE_V_0_4_4/PagedGeometry/source/BatchedGeometry.cpp:550:10: note: in expansion of macro 'OGRE_EXCEPT'
          OGRE_EXCEPT(0, "Unknown RenderSystem color format", "BatchedGeometry::SubBatch::addSubMesh()");
          ^
/usr/include/OGRE/OgreException.h:240:29: error:   initializing argument 1 of 'static void Ogre::ExceptionFactory::throwException(Ogre::Exception::ExceptionCodes, int, const String&, const String&, const char*, long int)' [-fpermissive]
   static OGRE_NORETURN void throwException(
                             ^
make[2]: *** [PagedGeometry/CMakeFiles/pagedgeometry.dir/source/BatchedGeometry.cpp.o] Error 1
make[1]: *** [PagedGeometry/CMakeFiles/pagedgeometry.dir/all] Error 2
make: *** [all] Error 2
Thanks for any help or suggestion on helping me to compile it.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Compilation error - 0.4.3 and 0.4.4 - Slackware 64 curre

#2 Post by Geoff the Medio »

What version of Ogre are you building against?

Have you googled the error messages? Something like "error: invalid conversion from 'int' to 'Ogre::Exception::ExceptionCodes'" doesn't seem like a FreeOrion specific issue.

It's also in the PagedGeometry code, which we have a copy of but don't maintain for various reasons.

You might try building the SDL / SDK update branch instead, as it avoids all the Ogre stuff.

sombragris
Space Krill
Posts: 3
Joined: Wed Jan 14, 2015 9:25 pm

Re: Compilation error - 0.4.3 and 0.4.4 - Slackware 64 curre

#3 Post by sombragris »

Geoff the Medio wrote:What version of Ogre are you building against?
Ogre version 1.9.
You might try building the SDL / SDK update branch instead, as it avoids all the Ogre stuff.
Great suggestion.

I'll also try to google the error messages. If the Ogre version is relevant please let me know. Thank you!

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Compilation error - 0.4.3 and 0.4.4 - Slackware 64 curre

#4 Post by Dilvish »

sombragris wrote:Ogre version 1.9....If the Ogre version is relevant please let me know. Thank you!
There was some uncertainty that had made me note on our Compile in Linux page that it might be best to stick to Ogre 1.81 rather than go to Ogre 1.9, but unfortunately I didn't record the cause of my concern and It's slipped my mind now. I suspect that by now Folks have in fact been building FO fine with Ogre 1.9 or we would have heard about more trouble, but still, you could consider trying 1.81
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

Chriss
Dyson Forest
Posts: 231
Joined: Sun May 11, 2008 10:50 am

Re: Compilation error - 0.4.3 and 0.4.4 - Slackware 64 curre

#5 Post by Chriss »

As far as I can tell, I've been using Ogre 1.9.0 with my Arch Linux install since January / February 2014, so I've compiled FO (svn main branch) a few times with it in summer / fall last year. Including the 0.4.4 release.
Attached patches are released under GPL 2.0 or later.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Compilation error - 0.4.3 and 0.4.4 - Slackware 64 curre

#6 Post by Geoff the Medio »

Chriss wrote:As far as I can tell, I've been using Ogre 1.9.0 with my Arch Linux install since January / February 2014, so I've compiled FO (svn main branch) a few times with it in summer / fall last year. Including the 0.4.4 release.
Nothing in the PagedGeomtry code has changed recently, so the difference must be in your Ogre code, or perhaps the compiler?

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Compilation error - 0.4.3 and 0.4.4 - Slackware 64 curre

#7 Post by Dilvish »

Geoff the Medio wrote:
Chriss wrote:As far as I can tell, I've been using Ogre 1.9.0 with my Arch Linux install since January / February 2014, so I've compiled FO (svn main branch) a few times with it in summer / fall last year. Including the 0.4.4 release.
Nothing in the PagedGeomtry code has changed recently, so the difference must be in your Ogre code, or perhaps the compiler?
I'm pretty sure that Chriss was just responding to my uncertainty about Ogre 1.9, letting us know that Ogre 1.9 has been working fine for him for FO.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Compilation error - 0.4.3 and 0.4.4 - Slackware 64 curre

#8 Post by Geoff the Medio »

Dilvish wrote:I'm pretty sure that Chriss was just responding to my uncertainty about Ogre 1.9, letting us know that Ogre 1.9 has been working fine for him for FO.
That may be, but the point remains... nothing has changed in the PagedGeometry code, so whatever has suddenly caused the compile to fail must be something else. If it's not Ogre 1.9, and it's not PagedGeometry, did the compiler change versions?

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Compilation error - 0.4.3 and 0.4.4 - Slackware 64 curre

#9 Post by Dilvish »

Geoff the Medio wrote:so whatever has suddenly caused the compile to fail must be something else. If it's not Ogre 1.9, and it's not PagedGeometry, did the compiler change versions?
Not so much that the compiler 'changed versions' as simply that sombagris (the OP) is trying to build in slackware-64, and his compiler is appearing a bit fussy where others hadn't been.

Code: Select all

/usr/include/OGRE/OgreException.h:265:126: error: invalid conversion from 'int' to 'Ogre::Exception::ExceptionCodes' [-fpermissive]
 #define OGRE_EXCEPT(code, desc, src)         Ogre::ExceptionFactory::throwException(code, code, desc, src, __FILE__, __LINE__)
sombagris, would you consider it acceptable to simply try adding the -fpermissive compiler flag? Otherwise you could try adding the code to define the conversion from int to Ogre::Exception::ExceptionCodes. I can't think of anything else to suggest (but I'm far from a compilation expert).
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

sombragris
Space Krill
Posts: 3
Joined: Wed Jan 14, 2015 9:25 pm

Re: Compilation error - 0.4.3 and 0.4.4 - Slackware 64 curre

#10 Post by sombragris »

Dilvish wrote:
Geoff the Medio wrote:so whatever has suddenly caused the compile to fail must be something else. If it's not Ogre 1.9, and it's not PagedGeometry, did the compiler change versions?
Not so much that the compiler 'changed versions' as simply that sombagris (the OP) is trying to build in slackware-64, and his compiler is appearing a bit fussy where others hadn't been.

Code: Select all

/usr/include/OGRE/OgreException.h:265:126: error: invalid conversion from 'int' to 'Ogre::Exception::ExceptionCodes' [-fpermissive]
 #define OGRE_EXCEPT(code, desc, src)         Ogre::ExceptionFactory::throwException(code, code, desc, src, __FILE__, __LINE__)
sombagris, would you consider it acceptable to simply try adding the -fpermissive compiler flag? Otherwise you could try adding the code to define the conversion from int to Ogre::Exception::ExceptionCodes. I can't think of anything else to suggest (but I'm far from a compilation expert).
Dilvish: thank you for the pointers.

Free Orion 0.4.4 compiled fine once I downgraded OGRE to 1.81. So I think it's a sort of interaction caused by OGRE 1.9 with the other specific dependencies I have installed on my system.

Post Reply