CMake Error on Ubuntu 12.04

Found a bug? Report it here.

Moderator: PPS-Leaders

The Jo
General DuGalle
Posts: 121
Joined: Mon Mar 01, 2010 7:43 pm

CMake Error on Ubuntu 12.04

Post by The Jo » Mon May 07, 2012 9:35 pm

I tried to install Orxonox as described in the building pages (including installing the dependencies) and got the following error message when running cmake. I'm still trying to catch the error.

-- *** Build type is Debug ***
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91 (MESSAGE):
Could NOT find CEGUI (version requirements: at least 0.6) (missing:
CEGUI_TOLUA_LIBRARY_OPTIMIZED) (Required is at least version "0.6")
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:252 (_FPHSA_FAILURE_MESSAGE)
cmake/tools/FindPackageHandleAdvancedArgs.cmake:44 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
cmake/tools/FindCEGUI.cmake:133 (FIND_PACKAGE_HANDLE_ADVANCED_ARGS)
cmake/LibraryConfig.cmake:121 (FIND_PACKAGE)
CMakeLists.txt:152 (INCLUDE)
Fail. Fail again. Fail better.

The Jo
General DuGalle
Posts: 121
Joined: Mon Mar 01, 2010 7:43 pm

Re: CMake Error on Ubuntu 12.04

Post by The Jo » Tue May 08, 2012 6:47 pm

Thank you Reto. You fixed the first error quickly. Unfortunately a new one appeared. I try to gather further information. Unfortunately Cmake is still new to me.

In Ubuntu 10.04 I found the Plugin in the package libogre-main-1.6.4:
/usr/lib/OGRE/Plugin_ParticleFx.(la/so)


In Ubuntu 12.04 I found the Plugin in the package libogre-main-1.7.4:
/usr/lib/i386-linux-gnu/OGRE-1.7.4/Plugin_ParticleFX.so
(where is the .la file? is it relevant??)
and in the package libogre-dev:
/usr/include/OGRE/Plugins/ParticleFX (in this folder there are only some header files, so I consider it not to be relevant)

-- *** Build type is Debug ***
CMake Error at cmake/tools/CheckOGREPlugins.cmake:64 (MESSAGE):
Could not find OGRE plugin named Plugin_ParticleFX
Call Stack (most recent call first):
cmake/LibraryConfig.cmake:215 (CHECK_OGRE_PLUGINS)
CMakeLists.txt:152 (INCLUDE)
Fail. Fail again. Fail better.

The Jo
General DuGalle
Posts: 121
Joined: Mon Mar 01, 2010 7:43 pm

Re: CMake Error on Ubuntu 12.04

Post by The Jo » Tue May 08, 2012 7:40 pm

Probably I was able to fix this problem by adding a part of the appropriate path to Ogre's Particle_FX plugin. Unfortunately a new bug arised. I hope that it isn't related to the previous ones.

Console output:

Code: Select all

Error (internal): [cegui] Scheme_xmlHandler::elementStart: Unknown element encountered: <膕>
Crash-Log:

Code: Select all

=======================================================
= time: Tue May  8 21:26:13 2012
=======================================================
Program received signal SIGSEGV, Segmentation fault.
__GI___libc_free (mem=0x4) at malloc.c:2968
(gdb) 
#0  __GI___libc_free (mem=0x4) at malloc.c:2968
#1  0x002f851f in operator delete(void*) ()
   from /usr/lib/i386-linux-gnu/libstdc++.so.6
#2  0x002f857b in operator delete[](void*) ()
   from /usr/lib/i386-linux-gnu/libstdc++.so.6
#3  0x013b7248 in CEGUI::OgreResourceProvider::unloadRawDataContainer(CEGUI::RawDataContainer&) () from /usr/lib/libCEGUIOgreRenderer-0.7.5.so
#4  0x017d1085 in CEGUI::TinyXMLDocument::TinyXMLDocument(CEGUI::XMLHandler&, CEGUI::String const&, CEGUI::String const&, CEGUI::String const&) ()
   from /usr/lib/libCEGUITinyXMLParser-0.7.5.so
#5  0x017d1372 in CEGUI::TinyXMLParser::parseXMLFile(CEGUI::XMLHandler&, CEGUI::String const&, CEGUI::String const&, CEGUI::String const&) ()
   from /usr/lib/libCEGUITinyXMLParser-0.7.5.so
#6  0x09679baa in CEGUI::Scheme_xmlHandler::Scheme_xmlHandler(CEGUI::String const&, CEGUI::String const&) () from /usr/lib/libCEGUIBase-0.7.5.so
#7  0x050d6184 in ?? () from /usr/lib/libCEGUILuaScriptModule-0.7.5.so
#8  0x003819ae in ?? () from /usr/lib/i386-linux-gnu/liblua5.1.so.0
#9  0x0038c7fd in ?? () from /usr/lib/i386-linux-gnu/liblua5.1.so.0
#10 0x00381dc8 in ?? () from /usr/lib/i386-linux-gnu/liblua5.1.so.0
#11 0x0037c150 in ?? () from /usr/lib/i386-linux-gnu/liblua5.1.so.0
#12 0x0038107e in ?? () from /usr/lib/i386-linux-gnu/liblua5.1.so.0
#13 0x00381fa0 in ?? () from /usr/lib/i386-linux-gnu/liblua5.1.so.0
#14 0x0037d733 in lua_pcall () from /usr/lib/i386-linux-gnu/liblua5.1.so.0
#15 0x062f1b80 in orxonox::LuaState::doString (this=0xa504ba0, code=..., 
    sourceFileInfo=...)
    at /home/jo/orxonox/trunk/src/libraries/core/LuaState.cc:188
#16 0x062f181b in orxonox::LuaState::doFile (this=0xa504ba0, filename=...)
    at /home/jo/orxonox/trunk/src/libraries/core/LuaState.cc:135
#17 0x0635ef1f in orxonox::GUIManager::GUIManager (this=0xa33e9d8, 
    mousePosition=..., __in_chrg=<optimized out>, __vtt_parm=<optimized out>)
    at /home/jo/orxonox/trunk/src/libraries/core/GUIManager.cc:325
#18 0x0634c35e in orxonox::Core::loadGraphics (this=0xa03ff60)
    at /home/jo/orxonox/trunk/src/libraries/core/Core.cc:372
#19 0x062c0850 in orxonox::Game::loadGraphics (this=0xa03fd28)
    at /home/jo/orxonox/trunk/src/libraries/core/Game.cc:530
#20 0x062c0df1 in orxonox::Game::loadState (this=0xa03fd28, name=...)
    at /home/jo/orxonox/trunk/src/libraries/core/Game.cc:591
#21 0x062be796 in orxonox::Game::updateGameStateStack (this=0xa03fd28)
    at /home/jo/orxonox/trunk/src/libraries/core/Game.cc:256
#22 0x062be19c in orxonox::Game::run (this=0xa03fd28)
    at /home/jo/orxonox/trunk/src/libraries/core/Game.cc:177
#23 0x00c85842 in orxonox::main (strCmdLine=...)
    at /home/jo/orxonox/trunk/src/orxonox/Main.cc:108
#24 0x0804b838 in main (argc=1, argv=0xbfb84554)
    at /home/jo/orxonox/trunk/src/Orxonox.cc:85
(gdb) 
Kill the program being debugged? (y or n) [answered Y; input not from terminal]
(gdb)
Fail. Fail again. Fail better.

User avatar
x3n
Baron Vladimir Harkonnen
Posts: 810
Joined: Mon Oct 30, 2006 5:40 pm
Contact:

Re: CMake Error on Ubuntu 12.04

Post by x3n » Wed May 09, 2012 7:48 pm

which XML file is that and do you have any clue why one of the elements would become a strange character?
Fabian 'x3n' Landau, Orxonox developer

The Jo
General DuGalle
Posts: 121
Joined: Mon Mar 01, 2010 7:43 pm

Re: CMake Error on Ubuntu 12.04

Post by The Jo » Wed May 09, 2012 9:24 pm

I've got no clue what particular xml file triggers the error. The game crashes while loading. (After starting ./run the screen goes black and the cursor is put in the upper left corner. The crash occurs before the cursor apperance is changed and the menu is loaded. As far as I know all level files are checked during startup - so it could be basically anywhere.)

Probably the problem concerns the tolua++5.1-dev library which I was suggested to use by Reto.
(That was necessary, since CEGUI's embedded tolua++ library has been deleted)
BUT:
<reto> Wie machen die das überhaupt? CEGUI hat tolua modifiziert
<reto> und um Exception handling erweitert
And when looking at the crash log the part /home/jo/orxonox/trunk/src/libraries/core/LuaState.cc:188
seems to take the same line, since at this location Exceptions are handled.

But probably my intuition is wrong:
http://www.cegui.org.uk/phpBB2/viewtopi ... =10&t=6106
Fail. Fail again. Fail better.

User avatar
x3n
Baron Vladimir Harkonnen
Posts: 810
Joined: Mon Oct 30, 2006 5:40 pm
Contact:

Re: CMake Error on Ubuntu 12.04

Post by x3n » Thu May 10, 2012 7:25 pm

I mean, could you try using a debugger to figure out which XML file is opened there?

Looking at your stacktrace, it's GUIManager which executes a lua file, which then goes into CEGUI to (apparently) load a scheme file, but there are plenty of files in /data/gui/scheme/, so any further information is appreciated.

On the other hand, I don't think looking at the XML file helps alot. It looks more like a library/version/linking problem, e.g. unicode vs ascii builds or whatever. This would mean that you use a different version of a library than it was originally linked to, or maybe a related problem.
Fabian 'x3n' Landau, Orxonox developer

User avatar
1337
Baron Vladimir Harkonnen
Posts: 521
Joined: Wed Oct 10, 2007 7:59 am

Re: CMake Error on Ubuntu 12.04

Post by 1337 » Thu May 10, 2012 7:54 pm

The Jo wrote:
<reto> Wie machen die das überhaupt? CEGUI hat tolua modifiziert
<reto> und um Exception handling erweitert
That's because the modifications are in the *.lua files, which actually make up tolua. The C library is just a collection of convenience functions.
And those *.lua files are in src/external/tolua/lua (loaded every time the tolua application is started).
I remembered some time today ;)

I'll get back to the actual problem later. Sorry, just don't have much time right now.
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

User avatar
1337
Baron Vladimir Harkonnen
Posts: 521
Joined: Wed Oct 10, 2007 7:59 am

Re: CMake Error on Ubuntu 12.04

Post by 1337 » Fri May 11, 2012 3:02 pm

I can't seem to nail it at all.

Checking the tolua lib source code reveals NO static data at all. That means liking statically against multiple targets won't be a problem (since the symbols are just functions without static data).

Browsing through the Ubuntu packages, I found only one explanation so far: Orxonox actually links against lua5.2, which was release to the Ubuntu world with oneiric.

Jo, can you check in the CMakeCache.txt file what library Orxonox links against? The variables to check for are called LUA5.1_LIBRARY_OPTIMIZED and LUA5.1_INCLUDE_DIR. Please check both, and if necessary, follow any symlinks.
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

User avatar
1337
Baron Vladimir Harkonnen
Posts: 521
Joined: Wed Oct 10, 2007 7:59 am

Re: CMake Error on Ubuntu 12.04

Post by 1337 » Sun May 20, 2012 3:47 pm

Any luck anyone with oneiric?
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

User avatar
Mozork
Mogthorgar, the mighty
Posts: 134
Joined: Wed Sep 24, 2008 3:27 pm

Re: CMake Error on Ubuntu 12.04

Post by Mozork » Sat Jun 09, 2012 8:52 am

Actually 12.04 is precise not oneiric

I got it to build as well, by installing packages libtolua-dev and libtolua++5.1-dev

However it crashes at start. No crashlog is generated.
My CMakeCache.txt file: http://pastebin.com/yNJ0XaDB

Code: Select all

//Path to a file.
LUA5.1_INCLUDE_DIR:PATH=/usr/include/lua5.1

//Path to a library.
LUA5.1_LIBRARY_OPTIMIZED:FILEPATH=/usr/lib/x86_64-linux-gnu/liblua5.1.so
So it seems to me that it links to lua5.1 after all.

I just looked ad ccmake and there is

Code: Select all

Boost_DIR = Boost_DIR-NOTFOUND
OGRE_PLUGIN_Plugin_CgProgramManager_DEBUG = OGRE_PLUGIN_Plugin_CgProgramManager_DEBUG-NOTFOUND
OGRE_PLUGIN_Plugin_CgProgramManager_OPTIMIZED = OGRE_PLUGIN_Plugin_CgProgramManager_OPTIMIZED-NOTFOUND
OGRE_PLUGIN_RenderSystem_Direct3D9_DEBUG = OGRE_PLUGIN_RenderSystem_Direct3D9_DEBUG-NOTFOUND
OGRE_PLUGIN_RenderSystem_Direct3D9_OPTIMIZED = OGRE_PLUGIN_RenderSystem_Direct3D9_DEBUG-OPTIMIZED
Is this ok? I guess the ogre plugins are probably only needed on windows, but the boost dir?

User avatar
1337
Baron Vladimir Harkonnen
Posts: 521
Joined: Wed Oct 10, 2007 7:59 am

Re: CMake Error on Ubuntu 12.04

Post by 1337 » Sat Jun 09, 2012 11:21 am

That is quite interesting.

And yes, we should add tolua++ (which probably requires tolua) to the dependencies for Ubuntu. Though CEGUI already depends on it anyway.

The plugins are OK because the CgProgramManager is retrieved separately I believe (check the Ubuntu packets) and the Direct3D is not for Linux ;)
We don't actually need a plugin except for a renderer and the particle system.

Boost_DIR should be OK because that variable only serves as a starting point for the rest (BOOST_ROOT is another one). So as long as the libraries and the includes are found, this should not be a problem.

And I may have just found the culprit: FindCEGUI.cmake.
It seems to find the tolua++ in the CEGUI include folder, but uses the system library to link against. This might be problematic.
I'll have a look at the CMake find module.
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

User avatar
Mozork
Mogthorgar, the mighty
Posts: 134
Joined: Wed Sep 24, 2008 3:27 pm

Re: CMake Error on Ubuntu 12.04

Post by Mozork » Sun Jun 10, 2012 9:35 am

I ran a backtrace, it is the same thing that Jo already showed ( http://pastebin.com/n7pX95P9 ).
Interestingly the problem occurs when trying to run InitializeGUI.lua (before that LuaSateInit.lua and Tools.lua are run without any problems). It seems to me that the tolua part that deals with orxonox works fine but the tolua part for CEGUI does not.

The error occurs in InitializeGUI.lua for

Code: Select all

schemeMgr:create(scheme .. "MenuWidgets.scheme")
I also read that this could be a problem related to the TinyXMlParser, if I have time I will build CEGUI on my machine with e.g. the Xerxes parser and see what happens.

User avatar
beni
Baron Vladimir Harkonnen
Posts: 949
Joined: Tue Oct 03, 2006 9:15 am
Location: Zurich
Contact:

Re: CMake Error on Ubuntu 12.04

Post by beni » Thu Sep 06, 2012 3:12 pm

How far are we with this problem? Has the CMake Error been fixed? Can somebody commit this fix?
"I'm Commander Shepard and this is my favorite forum on the internet."

The Jo
General DuGalle
Posts: 121
Joined: Mon Mar 01, 2010 7:43 pm

Re: CMake Error on Ubuntu 12.04

Post by The Jo » Fri Sep 07, 2012 8:56 am

The cmake problem is solved and already commited. But then a runtime error occured which is still not fixed yet. As far as I know the XML parser causes that error.
I see two solutions, but I'm currently not sure how to carry them out. :(
  • replace tinyXML with another XML parser
  • include the tinyXML in our package which can be found in Ubuntu 11.10
Fail. Fail again. Fail better.

User avatar
beni
Baron Vladimir Harkonnen
Posts: 949
Joined: Tue Oct 03, 2006 9:15 am
Location: Zurich
Contact:

Re: CMake Error on Ubuntu 12.04

Post by beni » Fri Sep 07, 2012 11:06 am

It's not in the trunk is it? I still have the cmake error last time I checked.
"I'm Commander Shepard and this is my favorite forum on the internet."

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests