Build From Source on openSuse 11.3

Build From Source on openSuse 11.3

Discuss everything related to running Spring on your chosen distribution of Linux.

Moderator: Moderators

Post Reply
quasar
Posts: 12
Joined: 06 Aug 2011, 14:41

Build From Source on openSuse 11.3

Post by quasar »

Hi,
i had some problems to install springRTS with zypper, there is no spring-lobby client? I have add some repositorys but after install i have no AI avaiable?

Now I will install from source on openSuse 11.3 32Bit.
i have extract the tar.gz archive and change into the directory. But with cmake I become an error message:

Code: Select all

tux@iglu:~/Downloads/spring_0.82.7.1> cmake .
-- The CXX compiler identification is unknown
CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found.   Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
CMake Warning at rts/build/cmake/TestCXXFlags.cmake:37 (message):
  SSE support missing, online play is highly discouraged with this build
Call Stack (most recent call first):
  CMakeLists.txt:124 (INCLUDE)


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


-- Building Spring for 32bit environment
-- Found AI Wrapper: LegacyCpp-AIWrapper
-- Found AI Wrapper: LegacyCpp-Creg-AIWrapper
-- Found AI Wrapper: CUtils (sources only wrapper)
-- Found AI Wrapper: Cpp-AIWrapper
-- Found AI Interface: Python-AIInterface 0.1
-- Found Skirmish AI: NullPythonAI 0.1
-- Found AI Interface: C-AIInterface 0.1
-- Could NOT find JNI  (missing:  JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
warning: No Java includes found!
warning: Java AI Interface will not be built!
-- Found Skirmish AI: CppTestAI 0.1
warning: HughAI Skirmish AI will not be built!
-- Found Skirmish AI: RAI 0.601
-- Found Skirmish AI: AAI 0.9
-- Found Skirmish AI: KAIK 0.13
-- Found Skirmish AI: E323AI 3.25.0
-- Found Skirmish AI: NullAI 0.1
warning: NullJavaAI Skirmish AI will not be built!
warning: NullOOJavaAI Skirmish AI will not be built!
-- Could NOT find DocBook  (missing:  DOCBOOK_XSL)
-- MAN pages will not be generated/installed; missing utilit(y|ies): asciidoc docbook-xsl
-- Found OpenAL: /usr/lib/libopenal.so
-- Found Freetype: -lfreetype -lz
-- Found Freetype: -lfreetype -lz
-- Configuring incomplete, errors occurred!
anybody an idea and can help me with this problem?

thanks

quasar
Last edited by quasar on 06 Aug 2011, 21:28, edited 1 time in total.
dansan
Server Owner & Developer
Posts: 1203
Joined: 29 May 2010, 23:40

Re: Build From Source on openSuse 11.3

Post by dansan »

quasar wrote:

Code: Select all

tux@iglu:~/Downloads/spring_0.82.7.1> cmake .
-- The CXX compiler identification is unknown
CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found.   Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
Did you install gcc? If you did, please post the output of

Code: Select all

gcc -v
Also: you do not seem to have a java dev kit (JDK) installed. I don't know which you have available, but for me on gentoo it compiles with "IcedTea6-bin 1.10.1" and will probably also work with "Sun JDK 1.6.x.x".
quasar
Posts: 12
Joined: 06 Aug 2011, 14:41

Re: Build From Source on openSuse 11.3

Post by quasar »

Hi dansan,

thx for the answer :)

I have gcc installed.

Code: Select all

tux@iglu:~/.spring> gcc -v                                                                                                              
Using built-in specs.                                                                                                                       
COLLECT_GCC=gcc                                                                                                                             
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i586-suse-linux/4.5/lto-wrapper                                                                            
Target: i586-suse-linux                                                                                                                     
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib --libexecdir=/usr/lib --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.5 --enable-ssp --disable-libssp --disable-plugin --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap --with-slibdir=/lib --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --program-suffix=-4.5 --enable-linux-futex --without-system-libunwind --enable-gold --with-plugin-ld=/usr/bin/gold --with-arch-32=i586 --with-tune=generic --build=i586-suse-linux                                                                                          
Thread model: posix                                                                                                                         
gcc version 4.5.0 20100604 [gcc-4_5-branch revision 160292] (SUSE Linux)
on my system are the following jdks available:

Code: Select all

zypper se jdk
Loading repository data...                                                                                                                  
Reading installed packages...                                                                                                               
                                                                                                                                            
S | Name                       | Summary                                                   | Type                                           
--+----------------------------+-----------------------------------------------------------+-----------
i | java-1_6_0-openjdk         | Java runtime environment based on OpenJDK 6 and IcedTea 6 | package   
  | java-1_6_0-openjdk         | Java runtime environment based on OpenJDK 6 and IcedTea 6 | srcpackage
i | java-1_6_0-openjdk         | java-1_6_0-openjdk: security update                       | patch     
  | java-1_6_0-openjdk-demo    | Sources for building demo applications with OpenJDK 6     | package   
i | java-1_6_0-openjdk-devel   | Java SDK based on OpenJDK 6 and IcedTea 6                 | package   
  | java-1_6_0-openjdk-javadoc | Documentation of the Java API of OpenJDK 6                | package   
  | java-1_6_0-openjdk-plugin  | Java web browser plugin based on OpenJDK 6 and IcedTea 6  | package   
  | java-1_6_0-openjdk-src     | OpenJDK 6 Java class sources for developers               | package   
  | ldapjdk                    | The Mozilla LDAP Java SDK                                 | package   
  | ldapjdk-javadoc            | Javadoc for ldapjdk                                       | package   
  | mockobjects-alt-jdk1_4     | Mockable API for JDK 1.4                                  | package   
  | mockobjects-jdk1_4         | MockObjects for 1.4 JDK                                   | package   
  | mockobjects-jdk1_4-j2ee1_4 | Mockable J2EE API for JDK 1.4 and J2EE 1.4                | package
dansan
Server Owner & Developer
Posts: 1203
Joined: 29 May 2010, 23:40

Re: Build From Source on openSuse 11.3

Post by dansan »

I think you have just the gcc frontend installed, but no language backend. For springrts you need C++, that is some package like 'gcc-g++'.

Whan I run "g++ -v" I get an absolut path for "COLLECT_GCC"... dont know if that is relevant.

Try to C&P the following into a shell:

Code: Select all

echo '#include <iostream>
using namespace std;

int main ()
{
  cout << "Hello World!" << endl;
  return 0;
}' > /tmp/c++test.c

g++ /tmp/c++test.c -o /tmp/c++test

/tmp/c++test

quasar
Posts: 12
Joined: 06 Aug 2011, 14:41

Re: Build From Source on openSuse 11.3

Post by quasar »

Hi dansan perfect, it works for the first step.

I have install the missing gcc-c++ package:

Code: Select all

zypper in gcc-c++
the test-file is okey:
tux@iglu:~> /tmp/c++test
Hello World!


And now the cmake command do his job

Code: Select all

tux@iglu:~/Downloads/spring_0.82.7.1> cmake .
-- The CXX compiler identification is unknown
-- 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
....
....
....
-- Configuring done
-- Generating done
-- Build files have been written to: /home/tux/Downloads/spring_0.82.7.1
tux@iglu:~/Downloads/spring_0.82.7.1> echo $?
0
But i have problems on the second step:

Code: Select all

tux@iglu:~/Downloads/spring_0.82.7.1> make spring
[  0%] Building CXX object rts/System/Sound/CMakeFiles/sound.dir/IEffectChannel.cpp.o
In file included from /home/tux/Downloads/spring_0.82.7.1/rts/System/FastMath.h:7:0,                                                    
                 from /home/tux/Downloads/spring_0.82.7.1/rts/System/float3.h:12,
                 from /home/tux/Downloads/spring_0.82.7.1/rts/System/Sound/IEffectChannel.h:8,
                 from /home/tux/Downloads/spring_0.82.7.1/rts/System/Sound/IEffectChannel.cpp:3:
/usr/lib/gcc/i586-suse-linux/4.5/include/xmmintrin.h:32:3: error: #error "SSE instruction set not enabled"
In file included from /home/tux/Downloads/spring_0.82.7.1/rts/System/float3.h:12:0,
                 from /home/tux/Downloads/spring_0.82.7.1/rts/System/Sound/IEffectChannel.h:8,
                 from /home/tux/Downloads/spring_0.82.7.1/rts/System/Sound/IEffectChannel.cpp:3:
/home/tux/Downloads/spring_0.82.7.1/rts/System/FastMath.h: In function ÔÇÿfloat fastmath::isqrt_sse(float)ÔÇÖ:
/home/tux/Downloads/spring_0.82.7.1/rts/System/FastMath.h:41:3: error: ÔÇÿ__m128ÔÇÖ was not declared in this scope
/home/tux/Downloads/spring_0.82.7.1/rts/System/FastMath.h:41:10: error: expected ÔÇÿ;ÔÇÖ before ÔÇÿvecÔÇÖ
/home/tux/Downloads/spring_0.82.7.1/rts/System/FastMath.h:42:3: error: ÔÇÿvecÔÇÖ was not declared in this scope
/home/tux/Downloads/spring_0.82.7.1/rts/System/FastMath.h:42:25: error: ÔÇÿ_mm_rsqrt_ssÔÇÖ was not declared in this scope
/home/tux/Downloads/spring_0.82.7.1/rts/System/FastMath.h:43:23: error: ÔÇÿ_mm_store_ssÔÇÖ was not declared in this scope
/home/tux/Downloads/spring_0.82.7.1/rts/System/FastMath.h: In function ÔÇÿfloat fastmath::sqrt_sse(float)ÔÇÖ:
/home/tux/Downloads/spring_0.82.7.1/rts/System/FastMath.h:60:3: error: ÔÇÿ__m128ÔÇÖ was not declared in this scope
/home/tux/Downloads/spring_0.82.7.1/rts/System/FastMath.h:60:10: error: expected ÔÇÿ;ÔÇÖ before ÔÇÿvecÔÇÖ
/home/tux/Downloads/spring_0.82.7.1/rts/System/FastMath.h:61:3: error: ÔÇÿvecÔÇÖ was not declared in this scope
/home/tux/Downloads/spring_0.82.7.1/rts/System/FastMath.h:61:24: error: ÔÇÿ_mm_sqrt_ssÔÇÖ was not declared in this scope
/home/tux/Downloads/spring_0.82.7.1/rts/System/FastMath.h:62:23: error: ÔÇÿ_mm_store_ssÔÇÖ was not declared in this scope
make[3]: *** [rts/System/Sound/CMakeFiles/sound.dir/IEffectChannel.cpp.o] Fehler 1
make[2]: *** [rts/System/Sound/CMakeFiles/sound.dir/all] Fehler 2
make[1]: *** [rts/builds/default/CMakeFiles/spring.dir/rule] Fehler 2
make: *** [spring] Fehler 2
Do you have the solution ?

many thx
dansan
Server Owner & Developer
Posts: 1203
Joined: 29 May 2010, 23:40

Re: Build From Source on openSuse 11.3

Post by dansan »

I guess you either do not have a SSE capable PC, or your CFLAGS are "to low".

Please run:

Code: Select all

$ grep sse /proc/cpuinfo
to see if you have a SSE capable CPU.

Assuming you do, I guess your CFLAGS are "to low":

Code: Select all

--with-arch-32=i586 --with-tune=generic --build=i586-suse-linux
That could mean default CFLAGS for i586: no SSE.

Try to export perfect CFLAGS for your exact machine:

Code: Select all

export CFLAGS="-march=native -O2 -pipe"
export CXXFLAGS="${CFLAGS}"
If it compiles now, and you get desyncs, then you have to try more conservative C[XX]FLAGS like "-march=i686 -msse -msse2 -O2 -pipe" or the like.

You may have to "reset" the cmake configuration cache, if it does not use your new C[XX]FLAGS... I don't know how to do that. But maybe it won't be a prob :)
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Build From Source on openSuse 11.3

Post by hoijui »

you can't choose these flags freely when compiling spring.
march has to be "i686" on 32bit, and "" on 64bit (though here there is a small possibility that there are other values that would work, but officially not so). you have to compile with SSE1, not more, not less.
if you use other flags, it is very likely that you will not be able to play spring online against others, as you would desync.
dansan
Server Owner & Developer
Posts: 1203
Joined: 29 May 2010, 23:40

Re: Build From Source on openSuse 11.3

Post by dansan »

quasar: please ignore this post - hoijuis advise is correct.

@hoijui: Your software is more stable than you imagine: I compile it in gentoo with custom cflags: "-march=native -msse4.1 -O2 -pipe", which results in "-march=core2 -mcx16 -msahf -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -mtune=core2", and have no issues... uhm.. maybe 1/40 games I desync... :)
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Build From Source on openSuse 11.3

Post by hoijui »

ahh nice! :-)
well... as long as it works good enough for you, and you know what you are doing, and don't send us reports about bugs resulting out of the custom flags, it is fine of course. and this seems to be the case with you. :-)
quasar
Posts: 12
Joined: 06 Aug 2011, 14:41

Re: Build From Source on openSuse 11.3

Post by quasar »

okey okey ...not so easy, i have never before use cmake and i think at the moment i know nothing :cry:

my brain is empty

what i've done...

my cpu support sse:

Code: Select all

tux@iglu:~> grep sse /proc/cpuinfo
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow up
the CFLAG and CXXFLAG I have set with ccmake in the advanced mode:

Code: Select all

CMAKE_C_FLAGS                    -march=i686 -msse -O2 -pipe
CMAKE_CXX_FLAGS                  -march=i686 -msse -O2 -pipe
and i set AI_TYPES to AAI because i have errors with other AI┬┤s? I don┬┤t know?

Code: Select all

AI_TYPES                             AAI
MARCH_FLAG                       i686

then i have generate the makefile

after that i send the following command:

Code: Select all

make spring
with no error ...i think

and after that:

Code: Select all

make install
after a damn long time ... I think 10-15 minutes ;) it end with:

Code: Select all

...
...
...
[100%] Building CXX object rts/builds/HL/CMakeFiles/engine-headless.dir/__/__/ExternalAI/AIInterfaceLibrary.cpp.o        
[100%] Building CXX object rts/builds/HL/CMakeFiles/engine-headless.dir/__/__/ExternalAI/SkirmishAILibraryInfo.cpp.o     
[100%] Building CXX object rts/builds/HL/CMakeFiles/engine-headless.dir/__/__/ExternalAI/SkirmishAIData.cpp.o            
[100%] Building CXX object rts/builds/HL/CMakeFiles/engine-headless.dir/__/__/ExternalAI/AICheats.cpp.o                  
In file included from /usr/include/c++/4.5/algorithm:63:0,                                                               
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:41,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /home/tux/Downloads/spring_0.82.7.1/rts/System/creg/creg.h:10,
                 from /home/tux/Downloads/spring_0.82.7.1/rts/System/creg/creg_cond.h:14,
                 from /home/tux/Downloads/spring_0.82.7.1/rts/System/float3.h:10,
                 from /home/tux/Downloads/spring_0.82.7.1/rts/ExternalAI/AILegacySupport.h:6,
                 from /home/tux/Downloads/spring_0.82.7.1/rts/ExternalAI/AICheats.h:6,
                 from /home/tux/Downloads/spring_0.82.7.1/rts/ExternalAI/AICheats.cpp:3:
/usr/include/c++/4.5/bits/stl_algo.h:3261:4: error: stray ÔÇÿ`ÔÇÖ in program
make[2]: *** [rts/builds/HL/CMakeFiles/engine-headless.dir/__/__/ExternalAI/AICheats.cpp.o] Fehler 1
make[1]: *** [rts/builds/HL/CMakeFiles/engine-headless.dir/all] Fehler 2
make: *** [all] Fehler 2
Last edited by quasar on 08 Aug 2011, 21:02, edited 1 time in total.
quasar
Posts: 12
Joined: 06 Aug 2011, 14:41

RPM package

Post by quasar »

I think it ist not so easy to build it from source. I will look for a ready to use RPM package

I will test again to add this repo to my app-store (package management)
http://download.opensuse.org/repositori ... nSUSE_11.3

but here I had no AI┬┤s ..I don┬┤t know why?

many thanks and greet
quasar
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Build From Source on openSuse 11.3

Post by abma »

@quasar:

did you try "make install-spring"? that should work, as "make spring" worked...
quasar
Posts: 12
Joined: 06 Aug 2011, 14:41

Re: Build From Source on openSuse 11.3

Post by quasar »

Hi,

still problems

the command make spring worked:

Code: Select all

...
...
.....
[100%] Building CXX object tools/unitsync/CMakeFiles/unitsync.dir/Syncer.cpp.o                                           
[100%] Building CXX object tools/unitsync/CMakeFiles/unitsync.dir/stdafx.cpp.o                                           
Linking CXX shared module ../../libunitsync.so                                                                           
[100%] Built target unitsync                                                                                             
Using build directory: /home/tux/Downloads/spring_0.82.7.1/base/ ...
Creating spring/bitmaps.sdz
Creating springcontent.sdz
Creating maphelper.sdz
Creating cursors.sdz
[100%] Built target gamedata
[100%]   spring-default: Building all dependencies ...
[100%] Built target spring-default                                                                                       
[100%] Built target spring
tux@iglu:~/Downloads/spring_0.82.7.1>
but at this command I get error make install-spring

Code: Select all

tux@iglu:~/Downloads/spring_0.82.7.1> make install-spring
[100%] Built target sound
[100%] Built target 7zip
[100%] Built target oscpack
[100%] Built target minizip
[100%] Built target streflop
[100%] Built target lua
[100%] Built target md5
[100%] Built target lobby
[100%] Built target engine-default
[100%] Built target headlessStubs
[100%] Built target unitsync
Using build directory: /home/tux/Downloads/spring_0.82.7.1/base/ ...
Creating spring/bitmaps.sdz
Creating springcontent.sdz
Creating maphelper.sdz
Creating cursors.sdz
[100%] Built target gamedata
[100%]   spring-default: Building all dependencies ...
[100%] Built target spring-default                                                                                       
[100%]   spring-default: Installing ...
-- Install configuration: "RELWITHDEBINFO"                                                                               
CMake Error at rts/builds/default/cmake_install.cmake:36 (FILE):
  file INSTALL cannot find
  "/home/tux/Downloads/spring_0.82.7.1/rts/builds/default/CMakeFiles/CMakeRelink.dir/spring".


make[3]: *** [rts/builds/default/CMakeFiles/install-spring-default] Fehler 1
make[2]: *** [rts/builds/default/CMakeFiles/install-spring-default.dir/all] Fehler 2
make[1]: *** [rts/builds/default/CMakeFiles/install-spring.dir/rule] Fehler 2
make: *** [install-spring] Fehler 2

Code: Select all

tux@iglu:~/Downloads/spring_0.82.7.1> ls -la /home/tux/Downloads/spring_0.82.7.1/rts/builds/default/CMakeFiles/CMakeRelink.dir/
insgesamt 8
drwxr-xr-x 2 tux users 4096  6. Aug 22:54 ./
drwxr-xr-x 8 tux users 4096 10. Aug 22:54 ../
greeting
quasar
Post Reply

Return to “Linux”