Nifogre Failure to compile [Solved]

Everything about development and the OpenMW source code.
Post Reply
Draygera
Posts: 16
Joined: 21 Dec 2011, 18:15

Nifogre Failure to compile [Solved]

Post by Draygera » 26 Dec 2011, 15:56

I just recently started trying to compile openmw and I get stuck at 35%:

Here's the error I'm getting:

Code: Select all


[ 35%] Building CXX object components/CMakeFiles/components.dir/nifogre/ogre_nif                                        
_loader.cpp.o
/home/draygera/Source/Engines/OpenMW/openmw/components/nifogre/ogre_nif_loader.c                                        
pp: In member function 'Ogre::Vector3 NifOgre::NIFLoader::convertVector3(const N                                        
if::Vector&)':
/home/draygera/Source/Engines/OpenMW/openmw/components/nifogre/ogre_nif_loader.c                                        
pp:80:35: error: no matching function for call to 'Ogre::Vector3::Vector3(const                                         
float [3])'
/home/draygera/Source/Engines/OpenMW/openmw/components/nifogre/ogre_nif_loader.c                                        
pp:80:35: note: candidates are:
/usr/include/OGRE/OgreVector3.h:85:25: note: Ogre::Vector3::Vector3(Ogre::Real)
/usr/include/OGRE/OgreVector3.h:85:25: note:   no known conversion for argument                                         
1 from 'const float [3]' to 'Ogre::Real {aka double}'
/usr/include/OGRE/OgreVector3.h:80:25: note: Ogre::Vector3::Vector3(Ogre::Real*)
/usr/include/OGRE/OgreVector3.h:80:25: note:   no known conversion for argument                                         
1 from 'const float [3]' to 'Ogre::Real* {aka double*}'
/usr/include/OGRE/OgreVector3.h:73:25: note: Ogre::Vector3::Vector3(const int*)
/usr/include/OGRE/OgreVector3.h:73:25: note:   no known conversion for argument                                         
1 from 'const float [3]' to 'const int*'
/usr/include/OGRE/OgreVector3.h:66:25: note: Ogre::Vector3::Vector3(const Real*)
/usr/include/OGRE/OgreVector3.h:66:25: note:   no known conversion for argument                                         
1 from 'const float [3]' to 'const Real* {aka const double*}'
/usr/include/OGRE/OgreVector3.h:61:16: note: Ogre::Vector3::Vector3(Ogre::Real,                                         
Ogre::Real, Ogre::Real)
/usr/include/OGRE/OgreVector3.h:61:16: note:   candidate expects 3 arguments, 1                                         
provided
/usr/include/OGRE/OgreVector3.h:57:16: note: Ogre::Vector3::Vector3()
/usr/include/OGRE/OgreVector3.h:57:16: note:   candidate expects 0 arguments, 1                                         
provided
/usr/include/OGRE/OgreVector3.h:51:23: note: Ogre::Vector3::Vector3(const Ogre::                                        
Vector3&)
/usr/include/OGRE/OgreVector3.h:51:23: note:   no known conversion for argument                                         
1 from 'const float [3]' to 'const Ogre::Vector3&'
/home/draygera/Source/Engines/OpenMW/openmw/components/nifogre/ogre_nif_loader.c                                        
pp: In member function 'void NifOgre::NIFLoader::handleNiTriShape(Nif::NiTriShap                                        
e*, int, BoundsFinder&)':
/home/draygera/Source/Engines/OpenMW/openmw/components/nifogre/ogre_nif_loader.c                                        
pp:686:85: error: no matching function for call to 'Ogre::Vector3::Vector3(float                                        
*)'
/home/draygera/Source/Engines/OpenMW/openmw/components/nifogre/ogre_nif_loader.c                                        
pp:686:85: note: candidates are:
/usr/include/OGRE/OgreVector3.h:85:25: note: Ogre::Vector3::Vector3(Ogre::Real)
/usr/include/OGRE/OgreVector3.h:85:25: note:   no known conversion for argument                                         
1 from 'float*' to 'Ogre::Real {aka double}'
/usr/include/OGRE/OgreVector3.h:80:25: note: Ogre::Vector3::Vector3(Ogre::Real*)
/usr/include/OGRE/OgreVector3.h:80:25: note:   no known conversion for argument                                         
1 from 'float*' to 'Ogre::Real* {aka double*}'
/usr/include/OGRE/OgreVector3.h:73:25: note: Ogre::Vector3::Vector3(const int*)
/usr/include/OGRE/OgreVector3.h:73:25: note:   no known conversion for argument                                         
1 from 'float*' to 'const int*'
/usr/include/OGRE/OgreVector3.h:66:25: note: Ogre::Vector3::Vector3(const Real*)
/usr/include/OGRE/OgreVector3.h:66:25: note:   no known conversion for argument                                         
1 from 'float*' to 'const Real* {aka const double*}'
/usr/include/OGRE/OgreVector3.h:61:16: note: Ogre::Vector3::Vector3(Ogre::Real,                                         
Ogre::Real, Ogre::Real)
/usr/include/OGRE/OgreVector3.h:61:16: note:   candidate expects 3 arguments, 1                                         
provided
/usr/include/OGRE/OgreVector3.h:57:16: note: Ogre::Vector3::Vector3()
/usr/include/OGRE/OgreVector3.h:57:16: note:   candidate expects 0 arguments, 1                                         
provided
/usr/include/OGRE/OgreVector3.h:51:23: note: Ogre::Vector3::Vector3(const Ogre::                                        
Vector3&)
/usr/include/OGRE/OgreVector3.h:51:23: note:   no known conversion for argument                                         
1 from 'float*' to 'const Ogre::Vector3&'
/home/draygera/Source/Engines/OpenMW/openmw/components/nifogre/ogre_nif_loader.c                                        
pp:696:90: error: no matching function for call to 'Ogre::Vector3::Vector3(float                                        
*)'
/home/draygera/Source/Engines/OpenMW/openmw/components/nifogre/ogre_nif_loader.c                                        
pp:696:90: note: candidates are:
/usr/include/OGRE/OgreVector3.h:85:25: note: Ogre::Vector3::Vector3(Ogre::Real)
/usr/include/OGRE/OgreVector3.h:85:25: note:   no known conversion for argument                                         
1 from 'float*' to 'Ogre::Real {aka double}'
/usr/include/OGRE/OgreVector3.h:80:25: note: Ogre::Vector3::Vector3(Ogre::Real*)
/usr/include/OGRE/OgreVector3.h:80:25: note:   no known conversion for argument                                         
1 from 'float*' to 'Ogre::Real* {aka double*}'
/usr/include/OGRE/OgreVector3.h:73:25: note: Ogre::Vector3::Vector3(const int*)
/usr/include/OGRE/OgreVector3.h:73:25: note:   no known conversion for argument                                         
1 from 'float*' to 'const int*'
/usr/include/OGRE/OgreVector3.h:66:25: note: Ogre::Vector3::Vector3(const Real*)
/usr/include/OGRE/OgreVector3.h:66:25: note:   no known conversion for argument                                         
1 from 'float*' to 'const Real* {aka const double*}'
/usr/include/OGRE/OgreVector3.h:61:16: note: Ogre::Vector3::Vector3(Ogre::Real,                                         
Ogre::Real, Ogre::Real)
/usr/include/OGRE/OgreVector3.h:61:16: note:   candidate expects 3 arguments, 1                                         
provided
/usr/include/OGRE/OgreVector3.h:57:16: note: Ogre::Vector3::Vector3()
/usr/include/OGRE/OgreVector3.h:57:16: note:   candidate expects 0 arguments, 1                                         
provided
/usr/include/OGRE/OgreVector3.h:51:23: note: Ogre::Vector3::Vector3(const Ogre::                                        
Vector3&)
/usr/include/OGRE/OgreVector3.h:51:23: note:   no known conversion for argument                                         
1 from 'float*' to 'const Ogre::Vector3&'
/home/draygera/Source/Engines/OpenMW/openmw/components/nifogre/ogre_nif_loader.c                                        
pp: In member function 'Ogre::Vector3 NifOgre::NIFLoader::convertVector3(const N                                        
if::Vector&)':
/home/draygera/Source/Engines/OpenMW/openmw/components/nifogre/ogre_nif_loader.c                                        
pp:81:1: warning: control reaches end of non-void function [-Wreturn-type]
make[2]: *** [components/CMakeFiles/components.dir/nifogre/ogre_nif_loader.cpp.o                                        
] Error 1
make[1]: *** [components/CMakeFiles/components.dir/all] Error 2
make: *** [all] Error 2

I have the latest version of Ogre installed and am running Gentoo 64-bit with kernel-3.2-rc6.
Last edited by Draygera on 26 Dec 2011, 22:20, edited 1 time in total.

User avatar
Zini
Posts: 5537
Joined: 06 Aug 2011, 15:16

Re: Nifogre Failure to compile

Post by Zini » 26 Dec 2011, 16:05

I see a possible problem. It seems you are building OGRE with Ogre::Real as double. By default this is float instead. I guess OpenMW won't compile with this flavour of OGRE.

Draygera
Posts: 16
Joined: 21 Dec 2011, 18:15

Re: Nifogre Failure to compile

Post by Draygera » 26 Dec 2011, 16:24

I'm going to rebuild Ogre and see if that fixes the problem.

Draygera
Posts: 16
Joined: 21 Dec 2011, 18:15

Re: Nifogre Failure to compile

Post by Draygera » 26 Dec 2011, 17:25

After rebuilding Ogre from source and manually installing it instead of depending on portage from gentoo, I was able to build openmw without issues.

Weirdest thing ever. Thank you for pointing out the obvious and getting back to me as quickly as you did.

Post Reply