View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0001846 | Spring engine | Linux | public | 2010-02-19 21:02 | 2017-05-08 23:24 | ||||
Reporter | jandd | ||||||||
Assigned To | Kloot | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | 0.81.1.3 | ||||||||
Target Version | Fixed in Version | 103.0 +git | |||||||
Summary | 0001846: build on non x86 architectures impossible | ||||||||
Description | The Debian project supports several architectures that are not x86 based (i.e. alpha, mips, powerpc). While I know that spring is mostly interesting to PC users it would be nice if non x86 architectures could be supported to. The x86 specific assembly code is located in rts/lib/streflop/FPUSettings.h. The block already has a promising comment at the beginning: 133 // plan for portability 134 #if defined(_MSC_VER) 135 #define STREFLOP_FSTCW(cw) do { short tmp; __asm { fstcw tmp }; (cw) = tmp; } while (0) 136 #define STREFLOP_FLDCW(cw) do { short tmp = (cw); __asm { fclex }; __asm { fldcw tmp }; } while (0) 137 #define STREFLOP_STMXCSR(cw) do { int tmp; __asm { stmxcsr tmp }; (cw) = tmp; } while (0) 138 #define STREFLOP_LDMXCSR(cw) do { int tmp = (cw); __asm { ldmxcsr tmp }; } while (0) 139 #else // defined(_MSC_VER) 140 #define STREFLOP_FSTCW(cw) do { asm volatile ("fstcw %0" : "=m" (cw) : ); } while (0) 141 #define STREFLOP_FLDCW(cw) do { asm volatile ("fclex \n fldcw %0" : : "m" (cw)); } while (0) 142 #define STREFLOP_STMXCSR(cw) do { asm volatile ("stmxcsr %0" : "=m" (cw) : ); } while (0) 143 #define STREFLOP_LDMXCSR(cw) do { asm volatile ("ldmxcsr %0" : : "m" (cw) ); } while (0) 144 #endif // defined(_MSC_VER) For now I asked the Debian buildd admins to mark the spring [1] and springlobby [2] packages as x86 only, but it would be nice to change this in the future. [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=570534 [2] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=570537 | ||||||||
Additional Information | Build log for alpha architecture: [ 2%] Building CXX object rts/lib/streflop/CMakeFiles/streflop.dir/streflopC.cpp.o cd /build/buildd-spring_0.80.5.2-2-alpha-yij0rt/spring-0.80.5.2/obj-alpha-linux-gnu/rts/lib/streflop && /usr/bin/c++ -DSYNCCHECK -DNO_AVI -DSPRING_DATADIR=\"/usr/share/games/spring:/usr/lib/spring:/usr/lib/spring\" -DSTREFLOP_SSE -g -O2 -fsingle-precision-constant -frounding-math -pipe -fno-strict-aliasing -fvisibility=hidden -fvisibility-inlines-hidden -pthread -O2 -DNDEBUG -g -I/build/buildd-spring_0.80.5.2-2-alpha-yij0rt/spring-0.80.5.2/rts/System -I/build/buildd-spring_0.80.5.2-2-alpha-yij0rt/spring-0.80.5.2/rts/lib/lua/include -I/build/buildd-spring_0.80.5.2-2-alpha-yij0rt/spring-0.80.5.2/rts/lib/streflop -I/usr/include/SDL -I/build/buildd-spring_0.80.5.2-2-alpha-yij0rt/spring-0.80.5.2/rts -I/usr/include/AL -I/usr/include/freetype2 -fpic -o CMakeFiles/streflop.dir/streflopC.cpp.o -c /build/buildd-spring_0.80.5.2-2-alpha-yij0rt/spring-0.80.5.2/rts/lib/streflop/streflopC.cpp {standard input}: Assembler messages: {standard input}:34: Error: unknown opcode `fstcw' {standard input}:50: Error: unknown opcode `fclex' {standard input}:51: Error: unknown opcode `fldcw' {standard input}:55: Error: unknown opcode `stmxcsr' {standard input}:69: Error: unknown opcode `ldmxcsr' {standard input}:98: Error: unknown opcode `fstcw' {standard input}:116: Error: unknown opcode `fclex' {standard input}:117: Error: unknown opcode `fldcw' {standard input}:121: Error: unknown opcode `stmxcsr' {standard input}:135: Error: unknown opcode `ldmxcsr' make[4]: *** [rts/lib/streflop/CMakeFiles/streflop.dir/streflopC.cpp.o] Error 1 make[4]: Leaving directory `/build/buildd-spring_0.80.5.2-2-alpha-yij0rt/spring-0.80.5.2/obj-alpha-linux-gnu' make[3]: *** [rts/lib/streflop/CMakeFiles/streflop.dir/all] Error 2 make[3]: Leaving directory `/build/buildd-spring_0.80.5.2-2-alpha-yij0rt/spring-0.80.5.2/obj-alpha-linux-gnu' make[2]: *** [all] Error 2 dh_auto_build: make -j1 returned exit code 2 make[1]: *** [override_dh_auto_build] Error 2 make: *** [build] Error 2 dpkg-buildpackage: error: debian/rules build gave error exit status 2 make[2]: Leaving directory `/build/buildd-spring_0.80.5.2-2-alpha-yij0rt/spring-0.80.5.2/obj-alpha-linux-gnu' make[1]: Leaving directory `/build/buildd-spring_0.80.5.2-2-alpha-yij0rt/spring-0.80.5.2' | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
|
jandd (reporter) 2010-02-19 21:06 |
This is not a duplicate of http://springrts.com/mantis/view.php?id=1788 because it is not related to compiler flags. |
jandd (reporter) 2010-02-19 21:37 |
The corresponding Debian bug report is http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=563686 |
imbaczek (reporter) 2010-02-20 12:45 |
making spring cross-architecture isn't easy - the fact that it compiles doesn't make it work in multiplayer. there's also a problem of having access to hardware - afaik none of the developers don't have anything other than x86/amd64. |
Kloot (developer) 2017-05-08 23:24 |
this should be more or less possible now (ENABLE_STREFLOP=FALSE), at the cost of sacrificing sync. |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2010-02-19 21:02 | jandd | New Issue | |
2010-02-19 21:06 | jandd | Note Added: 0004672 | |
2010-02-19 21:37 | jandd | Note Added: 0004673 | |
2010-02-20 12:45 | imbaczek | Note Added: 0004674 | |
2010-02-20 12:46 | imbaczek | Status | new => confirmed |
2017-05-08 23:24 | Kloot | Assigned To | => Kloot |
2017-05-08 23:24 | Kloot | Status | confirmed => resolved |
2017-05-08 23:24 | Kloot | Resolution | open => fixed |
2017-05-08 23:24 | Kloot | Fixed in Version | => 103.0 +git |
2017-05-08 23:24 | Kloot | Note Added: 0017575 |