Page 1 of 1

Building Orxonox on Tardis - HS2013

Posted: Thu Sep 05, 2013 9:18 am
by The Jo
I try to get Orxonox working on the new tardis machines.

Cmake ..

Code: Select all

-- The C compiler identification is GNU 4.7.2
-- The CXX compiler identification is GNU 4.7.2
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- *** Build type is Debug ***
-- Performing Test _gcc_have_visibility
-- Performing Test _gcc_have_visibility - Success
-- Running on D-ITET isg.ee Tardis Computer. Using customized paths.
-- Found CEGUI: /usr/pack/cegui-0.6.2-sd/include/CEGUI (Required is at least version "0.6") 
-- Found Lua5.1: /usr/lib/x86_64-linux-gnu/liblua5.1.so  
-- Found Ogg: /usr/lib/x86_64-linux-gnu/libogg.so  
-- Found Vorbis: /usr/lib/x86_64-linux-gnu/libvorbis.so  
-- Found ALUT: /usr/lib/libalut.so  
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.7") 
-- Found OpenAL: /usr/lib/x86_64-linux-gnu/libopenal.so  
-- Found TCL: /usr/lib/libtcl.so  
-- Found OGRE: /usr/pack/ogre-1.6.1-sd/amd64-debian-linux5.0/lib/libOgreMain.so (Required is at least version "1.6") 
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Looking for C++ include iso646.h
-- Looking for C++ include iso646.h - found
-- Configuring done
-- Generating done
-- Build files have been written to: /scratch/joOrcs/trunk/build2
This looks good so far.

make -j4:

Code: Select all

Scanning dependencies of target dockingPrecompiledHeader
Scanning dependencies of target toluaapp_orxonox
Scanning dependencies of target orxonoxPrecompiledHeader
Scanning dependencies of target bullet_orxonox
[  1%] Building C object src/external/tolua/CMakeFiles/toluaapp_orxonox.dir/tolua.c.o
[  1%] Building CXX object src/external/bullet/CMakeFiles/bullet_orxonox.dir/BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.cpp.o
Linking C executable ../../../bin/toluaapp_orxonox
[  1%] Built target toluaapp_orxonox
[  1%] Scanning dependencies of target tinyxml_orxonox
Building CXX object src/external/bullet/CMakeFiles/bullet_orxonox.dir/bullet_orxonoxBuildUnit.cc.o
[  1%] Building CXX object src/external/tinyxml/CMakeFiles/tinyxml_orxonox.dir/tinyxml_orxonoxBuildUnit.cc.o
[  1%] [  1%] Generating OrxonoxPrecompiledHeaders.h.gch
Generating DockingPrecompiledHeaders.h.gch
Linking CXX shared library ../../../lib/libtinyxml_orxonox.so
[  1%] Built target tinyxml_orxonox
Scanning dependencies of target util
[  1%] [  1%] Built target dockingPrecompiledHeader
[  1%] Building CXX object src/libraries/util/CMakeFiles/util.dir/StableBuildUnit.cc.o
Building CXX object src/libraries/util/CMakeFiles/util.dir/MultiType.cc.o
[  1%] Built target orxonoxPrecompiledHeader
[  2%] Building CXX object src/libraries/util/CMakeFiles/util.dir/Exception.cc.o
Scanning dependencies of target corePrecompiledHeader
[  2%] Generating CorePrecompiledHeaders.h.gch
[  2%] Building CXX object src/libraries/util/CMakeFiles/util.dir/Math.cc.o
[  2%] Built target corePrecompiledHeader
[  2%] Scanning dependencies of target cpptcl_orxonox
Building CXX object src/libraries/util/CMakeFiles/util.dir/SignalHandler.cc.o
[  2%] Building CXX object src/external/cpptcl/CMakeFiles/cpptcl_orxonox.dir/cpptcl.cc.o
/scratch/joOrcs/trunk/src/libraries/util/SignalHandler.cc: In static member function ‘static void orxonox::SignalHandler::sigHandler(int)’:
/scratch/joOrcs/trunk/src/libraries/util/SignalHandler.cc:149:22: error: ‘pipe’ was not declared in this scope
/scratch/joOrcs/trunk/src/libraries/util/SignalHandler.cc:155:25: error: ‘fork’ was not declared in this scope
/scratch/joOrcs/trunk/src/libraries/util/SignalHandler.cc:168:23: error: ‘close’ was not declared in this scope
/scratch/joOrcs/trunk/src/libraries/util/SignalHandler.cc:172:25: error: ‘STDIN_FILENO’ was not declared in this scope
/scratch/joOrcs/trunk/src/libraries/util/SignalHandler.cc:172:38: error: ‘dup2’ was not declared in this scope
/scratch/joOrcs/trunk/src/libraries/util/SignalHandler.cc:173:26: error: ‘STDOUT_FILENO’ was not declared in this scope
/scratch/joOrcs/trunk/src/libraries/util/SignalHandler.cc:174:26: error: ‘STDERR_FILENO’ was not declared in this scope
/scratch/joOrcs/trunk/src/libraries/util/SignalHandler.cc:176:66: error: ‘execlp’ was not declared in this scope
/scratch/joOrcs/trunk/src/libraries/util/SignalHandler.cc:183:24: error: ‘pipe’ was not declared in this scope
/scratch/joOrcs/trunk/src/libraries/util/SignalHandler.cc:215:59: error: ‘read’ was not declared in this scope
/scratch/joOrcs/trunk/src/libraries/util/SignalHandler.cc:228:41: error: ‘write’ was not declared in this scope
/scratch/joOrcs/trunk/src/libraries/util/SignalHandler.cc:233:41: error: ‘read’ was not declared in this scope
/scratch/joOrcs/trunk/src/libraries/util/SignalHandler.cc:268:41: error: ‘read’ was not declared in this scope
make[2]: *** [src/libraries/util/CMakeFiles/util.dir/SignalHandler.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
Scanning dependencies of target ogreceguirenderer_orxonox
[  3%] Building CXX object src/external/ogreceguirenderer/CMakeFiles/ogreceguirenderer_orxonox.dir/ogreceguirenderer_orxonoxBuildUnit.cc.o
Linking CXX shared library ../../../lib/libcpptcl_orxonox.so
[  3%] Built target cpptcl_orxonox
Scanning dependencies of target ois_orxonox
[  3%] Building CXX object src/external/ois/CMakeFiles/ois_orxonox.dir/ois_orxonoxBuildUnit.cc.o
Linking CXX shared library ../../../lib/libogreceguirenderer_orxonox.so
In file included from /scratch/joOrcs/trunk/build2/src/external/ois/ois_orxonoxBuildUnit.cc:9:0:
/scratch/joOrcs/trunk/src/external/ois/linux/LinuxForceFeedback.cpp: In member function ‘virtual void OIS::LinuxForceFeedback::setMasterGain(float)’:
/scratch/joOrcs/trunk/src/external/ois/linux/LinuxForceFeedback.cpp:102:44: error: ‘write’ was not declared in this scope
/scratch/joOrcs/trunk/src/external/ois/linux/LinuxForceFeedback.cpp: In member function ‘virtual void OIS::LinuxForceFeedback::setAutoCenterMode(bool)’:
/scratch/joOrcs/trunk/src/external/ois/linux/LinuxForceFeedback.cpp:131:44: error: ‘write’ was not declared in this scope
/scratch/joOrcs/trunk/src/external/ois/linux/LinuxForceFeedback.cpp: In member function ‘void OIS::LinuxForceFeedback::_stop(int)’:
/scratch/joOrcs/trunk/src/external/ois/linux/LinuxForceFeedback.cpp:525:42: error: ‘write’ was not declared in this scope
/scratch/joOrcs/trunk/src/external/ois/linux/LinuxForceFeedback.cpp: In member function ‘void OIS::LinuxForceFeedback::_start(int)’:
/scratch/joOrcs/trunk/src/external/ois/linux/LinuxForceFeedback.cpp:543:42: error: ‘write’ was not declared in this scope
In file included from /scratch/joOrcs/trunk/build2/src/external/ois/ois_orxonoxBuildUnit.cc:11:0:
/scratch/joOrcs/trunk/src/external/ois/linux/LinuxJoyStickEvents.cpp: In member function ‘virtual void OIS::LinuxJoyStick::capture()’:
/scratch/joOrcs/trunk/src/external/ois/linux/LinuxJoyStickEvents.cpp:100:77: error: ‘read’ was not declared in this scope
/scratch/joOrcs/trunk/src/external/ois/linux/LinuxJoyStickEvents.cpp: In static member function ‘static OIS::JoyStickInfoList OIS::LinuxJoyStick::_scanJoys()’:
/scratch/joOrcs/trunk/src/external/ois/linux/LinuxJoyStickEvents.cpp:275:13: error: ‘close’ was not declared in this scope
/scratch/joOrcs/trunk/src/external/ois/linux/LinuxJoyStickEvents.cpp:283:12: error: ‘close’ was not declared in this scope
/scratch/joOrcs/trunk/src/external/ois/linux/LinuxJoyStickEvents.cpp: In static member function ‘static void OIS::LinuxJoyStick::_clearJoys(OIS::JoyStickInfoList&)’:
/scratch/joOrcs/trunk/src/external/ois/linux/LinuxJoyStickEvents.cpp:294:20: error: ‘close’ was not declared in this scope
make[1]: *** [src/libraries/util/CMakeFiles/util.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[  3%] Built target ogreceguirenderer_orxonox
Linking CXX shared library ../../../lib/libbullet_orxonox.so
make[2]: *** [src/external/ois/CMakeFiles/ois_orxonox.dir/ois_orxonoxBuildUnit.cc.o] Error 1
make[1]: *** [src/external/ois/CMakeFiles/ois_orxonox.dir/all] Error 2
[  3%] Built target bullet_orxonox
make: *** [all] Error 2
What are this kind of scope errors in trunk/src/libraries/util/SignalHandler.cc
and /src/external/ois/linux/LinuxJoyStickEvents.cpp ?
-
Google told me that the called functions are used before they are declared.
But how could this happen? We hardly change the external libraries.
-
A review of the revisions of trunk/src/libraries/util/SignalHandler.(cc/h) showed me that this files were not modified recently.
And the same is true for code/trunk/src/external/ois/linux/LinuxJoyStickEvents.(cc/h).
-
One reason that might cause trouble: The tardis machines where updated to Debian 7.0 (wheezy).
The problem is definitely not related to the core6 changes. The same error occurs when I use an earlier version of the trunk.
-
By the way ... where are those read, write and close functions declared?
-
Probably including <unistd.h> will solve the problem.
http://gcc.gnu.org/gcc-4.7/porting_to.html
-
Yeah. This solved the problem. Do the includes have to be "ifdefed"?
Now even more new problems occur. I have to use grep to filter them.
-

Code: Select all

/usr/pack/boost-1.42.0-bs/include/boost/thread/thread.hpp:19:2: error: #error "Boost threads unavailable on this platform"
Probably this might help:
http://stackoverflow.com/questions/5389 ... buntu10-10
-

Re: Building Orxonox on Tardis - HS2013

Posted: Fri Sep 06, 2013 8:43 pm
by x3n
Unfortunately I don't have a tardis system to test on, but it looks like some system headers on linux were restructured. It's likely that you have to include some additional files (regarding the errors in SignalHandler and LinuxForceFeedback).

Regarding boost, see if there are newer versions of boost available on tardis. The boost library is pinned to version 1.42 in LibraryConfigTardis.cmake (the current version of boost is 1.54). If there are newer version, you can change this file and hope that the errors are gone.

If there is no other version of boost available on tardis, you can manually download and build a recent version of boost and add local paths in this file, just to see if this helps. If it does, contact ISG.EE and ask them to provide the new version of boost on tardis.

Re: Building Orxonox on Tardis - HS2013

Posted: Wed Sep 11, 2013 11:39 am
by beni
I just tested it on my machine at work (not running though, just compiling) and it compiled without a problem. My work computer should be part of the Tardis system of ISG.

So yeah.. no problems at all. I didn't see a recent change that would be a fix, so I assume this is still a problem? Maybe we should compare configurations or settings?

Re: Building Orxonox on Tardis - HS2013

Posted: Wed Sep 18, 2013 4:09 pm
by The Jo
Sandro suceeded where I failed. See http://www.orxonox.net/changeset/9672

The work is not yet done, but we are on our way.

Re: Building Orxonox on Tardis - HS2013

Posted: Wed Sep 25, 2013 8:57 pm
by x3n
I moved Sandros fix into the Tardis-specific cmake file. I hope the combination of new gcc + old boost happens only on Tardis. Normal distributions should have more balanced packages... at least I hope they do.

Anyway, the compiler flag may cause trouble with different combinations of GCC and Boost (and especially when using GCC on Windows which doesn't know anything about pthreads).

Re: Building Orxonox on Tardis - HS2013

Posted: Wed Sep 25, 2013 9:11 pm
by beni
Wouldn't it also make sense to ask ISG:EE to update the boost libraries?

Re: Building Orxonox on Tardis - HS2013

Posted: Wed Sep 25, 2013 9:46 pm
by x3n
Maybe they already did. The library paths for tardis are hardcoded. As long as those old libraries exist, we will always use them. But maybe there are already newer ones.

Re: Building Orxonox on Tardis - HS2013

Posted: Wed Sep 25, 2013 10:20 pm
by beni
I checked out SEPP and according to the website you can try and replace 1.42.0 with 1.47.0. I don't know if that's new enough, since boost is already at version 1.54 or something.

Give it a try, it should be a quick test.