Build woes on opensuse11 x86_64

Build woes on opensuse11 x86_64

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

Moderator: Moderators

Post Reply
charon
Posts: 4
Joined: 16 Aug 2008, 21:54

Build woes on opensuse11 x86_64

Post by charon »

I tried to build svn r6252 (current as of this writing) under opensuse11 x86_64. Some generic system info is at the bottom.

First problem was that the SCons build is simply broken. It starts out with a bit of recursive humour:

Code: Select all

$ scons -h
scons: Reading SConscript files ...
Not configured or configure script updated.  Run `scons configure' first.
Use `scons --help' to show available configure options to `scons configure'.
and goes on with (full log attached)

Code: Select all

$ scons configure
[...first part ok...]
Checking for C++ header file boost/regex.hpp... yes
Checking for C library boost_regex-gcc-mt... no
Checking for C library boost_regex-mt... no
Checking for C library boost_regex-gcc... no
Checking for C library boost_regex... no
Considering that I do have /usr/lib64/libboost_regex-mt.so, that raises some eyebrows. And indeed, according to the config.log (attached) it never tries to launch gcc again after the first linking failure, which means it detects _no_ libraries whatsoever.


So I figured, there's still cmake. No luck; springlobby (which by itself seems quite fine!) failed to load it with the message

Code: Select all

Error: /home/thomas/.local/spring/libunitsync.so: undefined symbol: forkpty
At first I was stumped, because 'ldd' claimed all libraries referenced in libunitsync.so were ok, but it turns out 'ldd -r' is the option to use for this. 'forkpty' is (according to the manpage) hiding out in -lutil, so let's add that:

Code: Select all

diff --git a/tools/unitsync/CMakeLists.txt b/tools/unitsync/CMakeLists.txt
index 5c0a444..0fffc2c 100644
--- a/tools/unitsync/CMakeLists.txt
+++ b/tools/unitsync/CMakeLists.txt
@@ -16,7 +16,7 @@ ELSE (MINGW)
                message ("No python libraries found, python bindings disabled")
        endif (PYTHONLIBS_FOUND)

-       set (unitsync_libs ${GLEW_LIBRARIES} IL openal GL GLU)
+       set (unitsync_libs ${GLEW_LIBRARIES} IL openal GL GLU util)
 ENDIF (MINGW)

 ADD_DEFINITIONS( -D_SZ_ONE_DIRECTORY -DNO_AVI -DSYNCCHECK -DUNITSYNC -DBITMAP_NO_OPENGL)
(Also attached to prevent whitespace damage.)

This fixed the cmake build for me, but spring still wouldn't start with the following message:

Code: Select all

spring: /home/thomas/nobackup/spring/repo/rts/System/myMath.cpp:41: CMyMath::CMyMath(): Assertion `checksum == 0x617a9968' failed.
I am somewhat surprised that spring has to check my processor is trustworthy. The friendly people on #taspring suggested I look in the build flags. Indeed the GCC manpages say that for x86_64, -mfpmath=sse is the default; so I set the following with the help of ccmake:

Code: Select all

CMAKE_BUILD_TYPE=Release
CMAKE_CXX_FLAGS_RELEASE="-O3 -DNDEBUG -mfpmath=sse"
 CMAKE_C_FLAGS_RELEASE="-O3 -DNDEBUG -mfpmath=sse"

And that fixes the FPU error, too. However one problem remains: it---and I'm assuming this is libunitsync's business---does not discover any of the AIs. I've only built the stock AIs, so I cannot see what I could have done wrong in the process, and it gives me no error messages at all.

I'm somewhat tired of stabbing at the dark, and don't know what to look for. I have attached an strace taken while I clicked the "Add Bot..." button, which triggers "GetAIList ( )" on the console and the "No AI Bots found..." error. Maybe it of some use. Of course, if anyone can tell me what debugging output to collect, I'll gladly do that.

Code: Select all

$ uname -a
Linux thomas 2.6.25.11-0.1-default #1 SMP 2008-07-13 20:48:28 +0200 x86_64 x86_64 x86_64 GNU/Linux
$ gcc --version
gcc (SUSE Linux) 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision 135036]
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ scons --version
SCons by Steven Knight et al.:
        script: v0.98.3.r2928, 2008/04/29 22:44:09, by knight on bangkok
        engine: v0.98.3.r2928, 2008/04/29 22:44:09, by knight on bangkok
Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation
$ cmake --version
cmake version 2.6-patch 1
$ ld --version
GNU ld (GNU Binutils; openSUSE 11.0) 2.18.50.20080409-11.1
Copyright 2007 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
$ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 15
model name      : Intel(R) Core(TM)2 Duo CPU     T7500  @ 2.20GHz
stepping        : 11
cpu MHz         : 800.000
cache size      : 4096 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr lahf_lm ida
bogomips        : 4395.61
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:
[dual core; other core snipped]
Attachments
scons_configure.log
Output of 'scons configure'
(4.38 KiB) Downloaded 16 times
spring_use_libutil.diff.log
Adds -lutil to the libunitsync.so build.
(531 Bytes) Downloaded 60 times
config.log
config.log from 'scons configure'
(21.95 KiB) Downloaded 113 times
Last edited by charon on 16 Aug 2008, 22:42, edited 1 time in total.
charon
Posts: 4
Joined: 16 Aug 2008, 21:54

Re: Build woes on opensuse11 x86_64

Post by charon »

... and the missing attachment.

Do not get me started about the forums software.
Attachments
lobby.strace.gz
strace of clicking "Add Bot..." in Springlobby, which results in not finding any bots.
(14.56 KiB) Downloaded 19 times
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Build woes on opensuse11 x86_64

Post by imbaczek »

I'm not sure how it works on Linux, but AFAIR it doesn't even bother checking the cwd for AIs (and possibly other stuff.) Try putting the bot .so's in ~/.spring/AI/Bot-libs. Your strace actually points to this dir:

Code: Select all

open("/home/thomas/.spring/AI/Bot-libs/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|0x80000) = -1 ENOENT (No such file or directory)
maybe unitsync.log would, too.

also, scons can also build unitsync - just do

Code: Select all

$ scons unitsync
charon
Posts: 4
Joined: 16 Aug 2008, 21:54

Re: Build woes on opensuse11 x86_64

Post by charon »

imbaczek wrote:I'm not sure how it works on Linux, but AFAIR it doesn't even bother checking the cwd for AIs (and possibly other stuff.) Try putting the bot .so's in ~/.spring/AI/Bot-libs.
Thanks, that appears to fix the issue---I don't have time to play right now, but the bots do show up in the lobby list. Has this been changed recently? IIRC it would usually find the bots where 'make install' (with custom prefix) put them.
also, scons can also build unitsync
As mentioned at the top of my post, scons fails to find any libraries during 'scons configure', and thus fails to compile anything. No idea why that happens.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Build woes on opensuse11 x86_64

Post by imbaczek »

directory scanning seen some changes, yes.

scons probably needs LIBDIR override or something like that... not sure.
Post Reply

Return to “Linux”