View Issue Details

IDProjectCategoryView StatusLast Update
0002342Spring engineMac OS Xpublic2011-06-15 16:49
Reporterabma Assigned To 
PrioritynormalSeveritycrashReproducibilityhave not tried
Status closedResolutionfixed 
Product Version0.82.7.1 
Summary0002342: spring desyncs when playing against macosx
Descriptionwhen playing linux vs macosx, we got desyncs...
TagsNo tags attached.
Attached Files
linux-20110208_022606_Sherwood-V1_0.82.7.sdf (Attachment missing)
linux-infolog.txt (Attachment missing)
20110208_022607_Sherwood-V1_0.82.7.sdf (Attachment missing)
macosx-infolog.txt (Attachment missing)
compile_errors.txt (Attachment missing)
Checked infolog.txt for Errors

Activities

phas

2011-02-08 17:23

reporter   ~0006367

Sync errors appears also when playing macosx vs windows

jK

2011-02-08 18:21

developer   ~0006368

why the exclamation point?
It was expactable to happen,.
First it's likely that it needs gcc flag adjustments.
Also a lot of external library calls reset the FPU/SSE state registers and they behave differently depending on the OS in that case (known from boost), so these calls need to be identified.
At the end it is still a long way of debugging (ask Tobi about the linux<->windows syncing ;)).

So first our buildbot builds need to work and then we either need (limited) access to a OSX client (it just needs to start spring instances to check their syncing) or an ambitious tester.

abma

2011-02-08 19:04

administrator   ~0006369

Last edited: 2011-02-08 19:05

i was happy! :) (i removed it, to avoid future confusions)

phas said, he could help with it... but spring master currently doesn't compile because of this compile error: http://pastie.org/1539156 (as already seen on the buildbot, too)

abma

2011-02-08 20:36

administrator   ~0006370

Last edited: 2011-02-08 21:13

looks like kloot fixed that... with https://github.com/spring/spring/commit/e4295bd8e988a9824299489f7b752ebf4944834d

phas, can you please retest to compile master?

phas

2011-02-09 12:13

reporter   ~0006371

well, trying to compile master now i get errors in these files

[ 17%] Building CXX object rts/builds/default/CMakeFiles/engine-default.dir/__/__/Game/UI/HwMouseCursor.cpp.o
In file included from /Users/phas/spring/rts/Rendering/Textures/nv_dds.h:22,
                 from /Users/phas/spring/rts/Rendering/Textures/Bitmap.h:8,
                 from /Users/phas/spring/rts/Game/UI/HwMouseCursor.cpp:5:

i'll upload a file with the errors because there are several thousands of lines.

abma

2011-02-09 12:22

administrator   ~0006372

hm.. can you remove the "//" in
spring/rts/Rendering/Textures/nv_dds.h on line 21?

and try to recompile?

phas

2011-02-09 15:01

reporter   ~0006373

new errors http://pastie.org/1544909

abma

2011-02-10 14:14

administrator   ~0006374

Last edited: 2011-02-10 14:14

phas now get this warning:

In file included from /Users/phas/spring/rts/lib/streflop/streflop.h:90,
                 from /Users/phas/spring/rts/lib/streflop/streflop_cond.h:13,
                 from /Users/phas/spring/rts/System/FPUCheck.h:14,
                 from /Users/phas/spring/rts/System/OffscreenGLContext.cpp:7:
/Users/phas/spring/rts/lib/streflop/FPUSettings.h:61:2: warning: #warning STREFLOP: FE_XXX flags were already defined and will be redefined! Check you do not use the system libm.

phas

2011-02-10 15:03

reporter   ~0006375

i didn't notice that the part of the error that i gave to abma was just a a warning. the full error trace is this.


[ 51%] Building CXX object rts/builds/default/CMakeFiles/engine-default.dir/__/__/System/OffscreenGLContext.cpp.o
In file included from /Users/phas/spring/rts/lib/streflop/streflop.h:90,
                 from /Users/phas/spring/rts/lib/streflop/streflop_cond.h:13,
                 from /Users/phas/spring/rts/System/FPUCheck.h:14,
                 from /Users/phas/spring/rts/System/OffscreenGLContext.cpp:7:
/Users/phas/spring/rts/lib/streflop/FPUSettings.h:61:2: warning: #warning STREFLOP: FE_XXX flags were already defined and will be redefined! Check you do not use the system libm.
In file included from /Users/phas/spring/rts/lib/streflop/streflop.h:90,
                 from /Users/phas/spring/rts/lib/streflop/streflop_cond.h:13,
                 from /Users/phas/spring/rts/System/FPUCheck.h:14,
                 from /Users/phas/spring/rts/System/OffscreenGLContext.cpp:7:
/Users/phas/spring/rts/lib/streflop/FPUSettings.h: In function ÔÇÿint streflop::fegetenv(streflop::fpenv_t*)ÔÇÖ:
/Users/phas/spring/rts/lib/streflop/FPUSettings.h:327: error: lvalue required in asm statement
/Users/phas/spring/rts/lib/streflop/FPUSettings.h:332: error: lvalue required in asm statement
/Users/phas/spring/rts/lib/streflop/FPUSettings.h:327: error: invalid lvalue in asm output 0
/Users/phas/spring/rts/lib/streflop/FPUSettings.h:332: error: invalid lvalue in asm output 0
/Users/phas/spring/rts/lib/streflop/FPUSettings.h: In function ÔÇÿint streflop::fesetenv(const streflop::fpenv_t*)ÔÇÖ:
/Users/phas/spring/rts/lib/streflop/FPUSettings.h:341: error: lvalue required in asm statement
/Users/phas/spring/rts/lib/streflop/FPUSettings.h:346: error: lvalue required in asm statement
/Users/phas/spring/rts/lib/streflop/FPUSettings.h:341: error: invalid lvalue in asm output 0
/Users/phas/spring/rts/lib/streflop/FPUSettings.h:346: error: invalid lvalue in asm output 0
make[3]: *** [rts/builds/default/CMakeFiles/engine-default.dir/__/__/System/OffscreenGLContext.cpp.o] Error 1
make[2]: *** [rts/builds/default/CMakeFiles/engine-default.dir/all] Error 2
make[1]: *** [rts/builds/default/CMakeFiles/spring.dir/rule] Error 2
make: *** [spring] Error 2

Kloot

2011-02-10 16:07

developer   ~0006376

It just means that on OSX parts of libm (like fenv.h) are indirectly being dragged in through headers #included by Spring. Seems agl.h is responsible.

abma

2011-02-13 23:16

administrator   ~0006383

Last edited: 2011-02-13 23:33

current master: http://pastebin.com/pFMyV2gT (this is on a different host, imo phas does 64bit compile, this is 32bit)

adding -msse2 fixes the compile-error, can this flag be added safely?

@kloot: can you fix that too, please?
/Users/admin/spring/rts/Rendering/Icon.h:8: error: redefinition of 'class CIcon' (or say how i should name it)

Kloot

2011-02-14 17:41

developer   ~0006384

SSE2 support is less widespread among older CPU's, so enabling that would rule out some (very small, P4/Athlon64 era) part of Spring's playerbase. AFAIK it is sync-safe though, but not with SSE1 clients.

jK

2011-02-14 17:46

developer   ~0006385

Last edited: 2011-02-14 17:46

koders.com couldn't find the header file (not in that revision),
so check if the header file got a flag to disable SSE in it (for syncing it is redundant if carbon uses it or not).

phas

2011-02-16 12:11

reporter   ~0006393

Last edited: 2011-02-17 13:29

the new error is


[ 14%] Building CXX object rts/builds/default/CMakeFiles/engine-default.dir/__/__/System/SpringApp.cpp.o
In file included from /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/DriverServices.h:32,
                 from /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:125,
                 from /System/Library/Frameworks/CoreServices.framework/Frameworks/AE.framework/Headers/AE.h:20,
                 from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:21,
                 from /System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:20,
                 from /System/Library/Frameworks/AGL.framework/Headers/agl.h:22,
                 from /Users/phas/spring/rts/System/OffscreenGLContext.h:12,
                 from /Users/phas/spring/rts/Game/LoadScreen.h:13,
                 from /Users/phas/spring/rts/System/SpringApp.cpp:26:
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/MachineExceptions.h:319: error: declaration does not declare anything
make[3]: *** [rts/builds/default/CMakeFiles/engine-default.dir/__/__/System/SpringApp.cpp.o] Error 1
make[2]: *** [rts/builds/default/CMakeFiles/engine-default.dir/all] Error 2
make[1]: *** [rts/builds/default/CMakeFiles/spring.dir/rule] Error 2

abma

2011-02-16 14:39

administrator   ~0006394

Last edited: 2011-02-16 14:42

found that:
http://forum.vampier.net/viewtopic.php?p=471&sid=a9484b7df3ae8279ef77c961184f3a42#p471

hmm... as jk sayed to me, enabling sse2 isn't a solution (compiling with CMAKE_CXX_FLAGS=-msse2 works) :-(

jK

2011-02-17 00:36

developer   ~0006397

Last edited: 2011-02-17 00:37

possible solution
http://comments.gmane.org/gmane.comp.gcc.devel/117994
-> soft_emmintrin.h (emulated SSE2 header)

abma

2011-06-07 12:31

administrator   ~0006709

MachineExceptions.h: http://www.pastebin.ca/2076014

abma

2011-06-07 21:35

administrator   ~0006710

current error is maybe fixable with "sdl-config --cflags --libs":

http://stackoverflow.com/questions/4019892/compiling-sdl-on-a-mac

abma

2011-06-15 16:49

administrator   ~0006747

spring-master should compile now:

https://github.com/spring/spring/commit/775bd752f3940212b74ffe1d023aa37031509c91

(i close this report, because its really unreadable + a bit off-topic...)

please start a new one for macosx problems

Issue History

Date Modified Username Field Change
2011-02-08 02:33 abma New Issue
2011-02-08 02:34 abma File Added: linux-20110208_022606_Sherwood-V1_0.82.7.sdf
2011-02-08 02:36 abma File Added: linux-infolog.txt
2011-02-08 02:37 phas File Added: 20110208_022607_Sherwood-V1_0.82.7.sdf
2011-02-08 02:37 phas File Added: macosx-infolog.txt
2011-02-08 03:00 abma Category General => Mac OS X
2011-02-08 17:23 phas Note Added: 0006367
2011-02-08 18:21 jK Note Added: 0006368
2011-02-08 19:00 abma Summary spring desyncs when playing against macosx (yes!) => spring desyncs when playing against macosx
2011-02-08 19:04 abma Note Added: 0006369
2011-02-08 19:05 abma Note Edited: 0006369
2011-02-08 19:05 abma Note Edited: 0006369
2011-02-08 20:36 abma Note Added: 0006370
2011-02-08 21:13 abma Note Edited: 0006370
2011-02-09 12:13 phas Note Added: 0006371
2011-02-09 12:13 phas File Added: compile_errors.txt
2011-02-09 12:22 abma Note Added: 0006372
2011-02-09 15:01 phas Note Added: 0006373
2011-02-10 14:14 abma Note Added: 0006374
2011-02-10 14:14 abma Note Edited: 0006374
2011-02-10 15:03 phas Note Added: 0006375
2011-02-10 16:07 Kloot Note Added: 0006376
2011-02-13 23:16 abma Note Added: 0006383
2011-02-13 23:17 abma Note Edited: 0006383
2011-02-13 23:32 abma Note Edited: 0006383
2011-02-13 23:33 abma Note Edited: 0006383
2011-02-14 17:41 Kloot Note Added: 0006384
2011-02-14 17:46 jK Note Added: 0006385
2011-02-14 17:46 jK Note Edited: 0006385
2011-02-16 12:11 phas Note Added: 0006393
2011-02-16 14:39 abma Note Added: 0006394
2011-02-16 14:42 abma Note Edited: 0006394
2011-02-17 00:36 jK Note Added: 0006397
2011-02-17 00:37 jK Note Edited: 0006397
2011-02-17 13:29 phas Note Edited: 0006393
2011-06-07 12:31 abma Note Added: 0006709
2011-06-07 21:35 abma Note Added: 0006710
2011-06-15 16:49 abma Note Added: 0006747
2011-06-15 16:49 abma Status new => closed
2011-06-15 16:49 abma Resolution open => fixed