Page 1 of 1

Linux Mint 64bit compilation stuff

Posted: 05 Sep 2013, 09:40
by gajop
Hey guys, I've just setup Linux Mint 15 64bit (Cinnamon) in VirtualBox, and I want to use that to compile spring.
Linux Mint is quite similar to Ubuntu when it comes to installing packages.
This is a fresh install so most dev things still aren't installed or setup.
I've followed the guide on the wiki, but it doesn't compile.

The first problem was reported as missing BOOST_FILESYSTEM and BOOST_CHRONO (sorry, don't know the exact names), and that was remedied by installing libboost-filesystem-dev and libboost-chrono-dev, maybe those two should be added to the depenedencies list on the wiki?

The second problem were some compilation errros. I haven't fixed them yet.FIXED, config was corrupt, cleaned the cache and it worked again
I setup cmake with:

Code: Select all

cmake -DCMAKE_INSTALL_PREFIX=~/spring-projects/installs/spring-dev-teams -G Ninja .
Output is:

Code: Select all

-- Found ld.gold, compressing debugsymbols
-- Boost version: 1.49.0
-- Found the following Boost libraries:
--   thread
--   regex
--   program_options
--   system
--   chrono
--   signals
--   filesystem
-- Could NOT find Boost
-- Could NOT find Threads (missing:  Threads_FOUND) 
compiler doesn't support: -fvisibility=hidden
compiler doesn't support: -fvisibility-inlines-hidden
CMake Warning at rts/build/cmake/TestCXXFlags.cmake:69 (Message):
  SSE1 support is missing, online play is highly discouraged with this build
Call Stack (most recent call first):
  CMakeLists.txt:296 (INCLUDE)


CMake Warning at rts/build/cmake/TestCXXFlags.cmake:85 (Message):
  IEEE-FP support is missing, online play is highly discouraged with this
  build
Call Stack (most recent call first):
  CMakeLists.txt:296 (INCLUDE)


compiler doesn't support: -std=gnu++11
compiler doesn't support: -std=gnu++0x
compiler doesn't support: -std=c++11
compiler doesn't support: -std=c++0x
CMake Warning at rts/build/cmake/TestCXXFlags.cmake:113 (Message):
  C++11 support missing
Call Stack (most recent call first):
  CMakeLists.txt:296 (INCLUDE)


-- Building Spring for 64bit environment
-- Compiling with C++11
-- using mtune=generic (unsure if it will sync in online gaming)
-- Building Assimp with flags              -mtune=generic -DDEDICATED_NOSSE -frounding-math  -pipe -fno-strict-aliasing   -pthread
-- Could NOT find Threads (missing:  Threads_FOUND) 
-- Found AI Wrapper: CUtils (sources only wrapper)
-- Found AI Interface: C-AIInterface 0.1
-- Could NOT find Java (missing:  Java_JAR_EXECUTABLE Java_JAVAC_EXECUTABLE Java_JAVAH_EXECUTABLE Java_JAVADOC_EXECUTABLE) (found version "1.7.0.25")
-- Could NOT find Java (missing:  JAVA_COMPILE JAVA_ARCHIVE) 
-- Could NOT find JNI (missing:  JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) 
CMake Warning at AI/Interfaces/Java/CMakeLists.txt:337 (Message):
  No Java includes found!


warning: Java AI Interface will not be built!
-- Found AI Wrapper: LegacyCpp-AIWrapper
-- Found AI Wrapper: LegacyCpp-Creg-AIWrapper
warning: Java OO AI Wrapper will not be built!
-- Found AI Wrapper: Cpp-AIWrapper
-- Found Skirmish AI: RAI 0.601
-- Found Skirmish AI: AAI 0.9
-- Found Skirmish AI: CppTestAI 0.1
-- Found Skirmish AI: NullAI 0.1
-- Found Skirmish AI: Shard dev
warning: NullJavaAI Skirmish AI will not be built!
warning: NullOOJavaAI Skirmish AI will not be built!
-- Found Skirmish AI: E323AI 3.25.0
-- Version 0.7-94-ge00b430
-- Could NOT find MINIZIP (missing:  MINIZIP_LIBRARY MINIZIP_INCLUDE_DIR) 
-- Boost version: 1.49.0
-- Found the following Boost libraries:
--   unit_test_framework
-- MAN pages will be installed to {INSTALL_PREFIX}/share/man/man6
-- Could NOT find Threads (missing:  Threads_FOUND) 
-- Could NOT find Threads (missing:  Threads_FOUND) 
-- Using legacy as default engine
-- Boost version: 1.49.0
-- Found the following Boost libraries:
--   unit_test_framework
-- Could NOT find Threads (missing:  Threads_FOUND) 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/gajop/spring-projects/spring
I start compiling with:

Code: Select all

ninja spring
Errors are:

Code: Select all

[3/679] Running utility command for generateVersionFiles
Spring engine version: 94.1.1-1101-gdf35ec2 develop ()
[4/679] Building CXX object rts/lib/lua/CMakeFiles/lua.dir/include/LuaUser.cpp.o
FAILED: /usr/bin/c++   -DBOOST_NO_FENV_H -DSPRING_DATADIR=\"/home/gajop/spring-projects/installs/spring-dev-teams/share/games/spring\" -DSTREFLOP_SSE -DSYNCCHECK -DTHREADPOOL -DUSE_LIBSQUISH -D_GLIBCXX_USE_NANOSLEEP -D_RANDOM_TCC -mtune=generic -DDEDICATED_NOSSE -fsingle-precision-constant -frounding-math  -pipe -fno-strict-aliasing   -pthread  -O2      -Wno-unknown-pragmas -DNDEBUG -g -Irts/lib/lua/include -Irts/lib/lua/../streflop -Irts -Iinclude    -DLUA_USE_MKSTEMP -fpic -MMD -MT rts/lib/lua/CMakeFiles/lua.dir/include/LuaUser.cpp.o -MF "rts/lib/lua/CMakeFiles/lua.dir/include/LuaUser.cpp.o.d" -o rts/lib/lua/CMakeFiles/lua.dir/include/LuaUser.cpp.o -c rts/lib/lua/include/LuaUser.cpp
In file included from rts/System/EventClient.h:6:0,
                 from rts/Lua/LuaHandle.h:7,
                 from rts/lib/lua/include/LuaUser.cpp:8:
rts/System/float3.h:37:9: error: ‘constexpr’ does not name a type
rts/System/float3.h:37:9: note: C++11 ‘constexpr’ only available with -std=c++11 or -std=gnu++11
rts/System/float3.h:38:9: error: ‘constexpr’ does not name a type
rts/System/float3.h:38:9: note: C++11 ‘constexpr’ only available with -std=c++11 or -std=gnu++11
rts/System/float3.h:338:58: error: ‘CMP_EPS’ was not declared in this scope
rts/System/float3.h:338:67: error: ‘CMP_EPS’ was not declared in this scope
rts/System/float3.h:338:76: error: ‘CMP_EPS’ was not declared in this scope
rts/System/float3.h: In member function ‘bool float3::operator==(const float3&) const’:
rts/System/float3.h:296:19: error: call to ‘bool float3::equals(const float3&, const float3&) const’ uses the default argument for parameter 2, which is not yet defined
rts/System/float3.h: In member function ‘bool float3::operator!=(const float3&) const’:
rts/System/float3.h:308:20: error: call to ‘bool float3::equals(const float3&, const float3&) const’ uses the default argument for parameter 2, which is not yet defined
rts/System/float3.h: In member function ‘float float3::LengthNormalize()’:
rts/System/float3.h:450:7: error: ‘NORMALIZE_EPS’ was not declared in this scope
rts/System/float3.h: In member function ‘float float3::LengthNormalize2D()’:
rts/System/float3.h:458:7: error: ‘NORMALIZE_EPS’ was not declared in this scope
rts/System/float3.h: In member function ‘float3& float3::SafeNormalize()’:
rts/System/float3.h:515:7: error: ‘NORMALIZE_EPS’ was not declared in this scope
rts/System/float3.h: In member function ‘float3& float3::SafeANormalize()’:
rts/System/float3.h:579:7: error: ‘NORMALIZE_EPS’ was not declared in this scope
In file included from rts/System/Matrix44f.h:7:0,
                 from rts/Sim/Objects/SolidObject.h:7,
                 from rts/Sim/Units/Unit.h:18,
                 from rts/Lua/LuaEventBatch.h:9,
                 from rts/Lua/LuaCallInCheck.h:6,
                 from rts/Lua/LuaHandle.h:9,
                 from rts/lib/lua/include/LuaUser.cpp:8:
rts/System/float4.h: In member function ‘bool float4::operator==(const float4&) const’:
rts/System/float4.h:54:44: error: ‘CMP_EPS’ is not a member of ‘float3’
rts/System/float4.h:55:41: error: ‘CMP_EPS’ is not a member of ‘float3’
rts/System/float4.h:56:41: error: ‘CMP_EPS’ is not a member of ‘float3’
rts/System/float4.h:57:41: error: ‘CMP_EPS’ is not a member of ‘float3’
In file included from rts/Sim/Objects/SolidObject.h:10:0,
                 from rts/Sim/Units/Unit.h:18,
                 from rts/Lua/LuaEventBatch.h:9,
                 from rts/Lua/LuaCallInCheck.h:6,
                 from rts/Lua/LuaHandle.h:9,
                 from rts/lib/lua/include/LuaUser.cpp:8:
rts/System/Sync/SyncedFloat3.h: At global scope:
rts/System/Sync/SyncedFloat3.h:335:58: error: ‘CMP_EPS’ is not a member of ‘float3’
rts/System/Sync/SyncedFloat3.h:335:75: error: ‘CMP_EPS’ is not a member of ‘float3’
rts/System/Sync/SyncedFloat3.h:335:92: error: ‘CMP_EPS’ is not a member of ‘float3’
rts/System/Sync/SyncedFloat3.h: In member function ‘bool SyncedFloat3::operator==(const float3&) const’:
rts/System/Sync/SyncedFloat3.h:293:19: error: call to ‘bool SyncedFloat3::equals(const float3&, const float3&) const’ uses the default argument for parameter 2, which is not yet defined
rts/System/Sync/SyncedFloat3.h: In member function ‘bool SyncedFloat3::operator!=(const float3&) const’:
rts/System/Sync/SyncedFloat3.h:305:20: error: call to ‘bool SyncedFloat3::equals(const float3&, const float3&) const’ uses the default argument for parameter 2, which is not yet defined
rts/System/Sync/SyncedFloat3.h: In member function ‘SyncedFloat3& SyncedFloat3::SafeNormalize()’:
rts/System/Sync/SyncedFloat3.h:471:7: error: ‘NORMALIZE_EPS’ is not a member of ‘float3’
rts/System/Sync/SyncedFloat3.h: In member function ‘SyncedFloat3& SyncedFloat3::SafeANormalize()’:
rts/System/Sync/SyncedFloat3.h:522:7: error: ‘NORMALIZE_EPS’ is not a member of ‘float3’
In file included from rts/Lua/LuaCallInCheck.h:7:0,
                 from rts/Lua/LuaHandle.h:9,
                 from rts/lib/lua/include/LuaUser.cpp:8:
rts/System/TimeProfiler.h: At global scope:
rts/System/TimeProfiler.h:114:58: error: ‘>>’ should be ‘> >’ within a nested template argument list
[4/679] Building CXX object rts/lib/assimp/code/CMakeFiles/assimp.dir/Importer.cpp.o
ninja: build stopped: subcommand failed.

Re: Linux Mint 64bit compilation stuff

Posted: 08 Sep 2013, 00:10
by gajop
It seems that the problem 1) was due to poorly done ./configure, clearing the cache and doing it again cleared the issue it would seem.

I have a new error though, and since thread is appropriate here it is:

Code: Select all

[169/759] Building CXX object rts/builds/legacy/CMakeFiles/engine-legacy.dir/__/__/System/creg/creg_runtime_tests.cpp.o
../rts/System/creg/creg_runtime_tests.cpp: In function ‘bool TestCregClasses2()’:
../rts/System/creg/creg_runtime_tests.cpp:114:1: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 5 has type ‘size_t {aka long unsigned int}’ [-Wformat]
../rts/System/creg/creg_runtime_tests.cpp:114:1: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 6 has type ‘size_t {aka long unsigned int}’ [-Wformat]
[170/759] Building CXX object rts/builds/legacy/CMakeFiles/engine-legacy.dir/__/__/System/ThreadPool.cpp.o
FAILED: /usr/bin/c++   -DBOOST_NO_FENV_H -DSPRING_DATADIR=\"/usr/local/share/games/spring\" -DSTREFLOP_SSE -DSYNCCHECK -DTHREADPOOL -DUSE_LIBSQUISH -D_GLIBCXX_USE_NANOSLEEP -D_RANDOM_TCC -std=gnu++11 -mtune=generic -msse -mfpmath=sse -mno-sse2 -mno-sse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -mno-sse4 -mno-sse4a -mno-avx -mno-fma -mno-fma4 -mno-xop -mno-lwp -mno-avx2 -fsingle-precision-constant -frounding-math -mieee-fp -pipe -fno-strict-aliasing  -fvisibility=hidden  -fvisibility-inlines-hidden -pthread  -O2      -Wno-unknown-pragmas -DNDEBUG -g -I../rts/lib/lua/include -I../include/AL -I../rts/lib -I../rts -Isrc-generated/engine -I/usr/include/SDL -I/usr/include/freetype2 -I/usr/include/AL -MMD -MT rts/builds/legacy/CMakeFiles/engine-legacy.dir/__/__/System/ThreadPool.cpp.o -MF "rts/builds/legacy/CMakeFiles/engine-legacy.dir/__/__/System/ThreadPool.cpp.o.d" -o rts/builds/legacy/CMakeFiles/engine-legacy.dir/__/__/System/ThreadPool.cpp.o -c ../rts/System/ThreadPool.cpp
../rts/System/ThreadPool.cpp: In function ‘void ThreadPool::WorkerLoop(int)’:
../rts/System/ThreadPool.cpp:164:14: error: ‘class boost::condition_variable’ has no member named ‘wait_for’
[170/759] Building CXX object rts/builds/legacy/CMakeFiles/engine-legacy.dir/__/__/System/SpringApp.cpp.o
ninja: build stopped: subcommand failed.
Is this caused by an old boost library perhaps?
Mine is:

Code: Select all

Package: libboost-thread-dev             
Version: 1.49.0.1

Re: Linux Mint 64bit compilation stuff

Posted: 08 Sep 2013, 00:27
by gajop
(Feels like I'm talking to myself). Seems I'm right about the boost version: I can't find wait_for in the 1.49 docs that are in the 1.53 docs.

Re: Linux Mint 64bit compilation stuff

Posted: 08 Sep 2013, 00:42
by gajop
Wiki is wrong again it seems:
It states that one needs 1.35+ boost but from what i can see that method appears in the wiki from 1.50 at the earliest.
Also the ppa that has the new versions of the boost is quite outdated, this seems newer: https://launchpad.net/~boost-latest/+archive/ppa.

Trying it out right now and will post the results.

Re: Linux Mint 64bit compilation stuff

Posted: 08 Sep 2013, 02:42
by gajop
And to end this monologue 8)
I've managed to set it up by using the 1.53 boost available in the ppa mentioned before. The process was as follows:

1) Add the ppa
sudo add-apt-repository ppa:boost-latest/ppa
#open /etc/apt/sources.list.d/boost-latest-ppa-raring.list
#change raring to quantal on both lines
sudo apt-get update

2) Install the updated boost packages (no idea how to force it to use the 1.53 instead of the 1.49, so you need to put explicit package versions)
sudo apt-get install libboost-thread1.53-dev libboost-regex1.53-dev libboost-system1.53-dev libb-program-options1.53-dev libboost-signals1.53-dev libboost-filesystem1.53-dev libboost-chrono1.53-dev

reconfigure & compile as usual.