openspades
openspades copied to clipboard
Compilation fails on armv6l (Raspberry Pi)
Trying to compile on my Raspberry Pi causes make to fail:
../lib/libAngelscript.a(as_callfunc.cpp.o): In function `CallSystemFunction(int, asCContext*, void*)':
as_callfunc.cpp:(.text+0x754): undefined reference to `CallSystemFunctionNative(asCContext*, asCScriptFunction*, void*, unsigned long*, void*, unsigned long long&)'
collect2: error: ld returned 1 exit status
Sources/CMakeFiles/OpenSpades.dir/build.make:5424: recipe for target 'bin/openspades' failed
make[2]: *** [bin/openspades] Error 1
CMakeFiles/Makefile2:168: recipe for target 'Sources/CMakeFiles/OpenSpades.dir/all' failed
make[1]: *** [Sources/CMakeFiles/OpenSpades.dir/all] Error 2
Makefile:137: recipe for target 'all' failed
make: *** [all] Error 2
This git project solves the problem by using a newer version of Angelscript. Any chance this is possible for openspades?
It is true that the version of Angel Script has been updated, however compilation still seems to fail on armv6l.
I know very little about how to use CMake or how compilers work at all, but after reading a bit about the changes that SuperTuxKart made to compile on ARM, I think CMake is the culprit.
Just see the difference between the OpenSpades CMakeLists.txt and the SuperTuxKart CMakeLists.txt
Specially this:
+if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^arm")
+ enable_language(ASM)
+ if(CMAKE_ASM_COMPILER_WORKS)
+ set(ANGELSCRIPT_SOURCE ${ANGELSCRIPT_SOURCE} ../../source/as_callfunc_arm.cpp ../../source/as_callfunc_arm_gcc.S)
+ set_property(SOURCE ../../source/as_callfunc_arm_gcc.S APPEND PROPERTY COMPILE_FLAGS " -Wa,-mimplicit-it=always")
+ else()
+ message(FATAL ERROR "ARM target requires a working assembler")
+ endif()
+ endif()
I made a simple Gist diff here.
Yes, I saw the same thing. I'll try to edit the CMakeLists.txt to get compilation to work, then I might submit a pull request.
@jextrevor Great! It'd be very cool to have OpenSpades running on Raspberry Pi.
jextrevor please explain here what you did and how you got it running because im having this error on pi 3B with armv7 here
@Tapmemer see above message from feikname. I did manage to compile it, but didn't manage to get it running.
@jextrevor could please post the 'SystemMessages.log' and the crash dump, if it exists, of when you tried to run it?
@feikname where might I find the SystemMessages.log?
Here is the output of the program when I try to run it:
terminate called after throwing an instance of 'spades::Exception'
what(): Invalid argument: index
at /home/pi/openspades/Sources/Gui/StartupScreenHelper.cpp:721
void spades::ScriptContextUtils::ExecuteChecked() at ScriptManager.cpp:338
void spades::ScriptContextHandle::ExecuteChecked() at ScriptManager.cpp:277
void spades::gui::StartupScreen::DoInit() at StartupScreen.cpp:224
spades::gui::StartupScreen::StartupScreen(spades::client::IRenderer*, spades::client::IAudioDevice*, spades::gui::StartupScreenHelper*, spades::client::FontManager*) at StartupScreen.cpp:44
void spades::gui::SDLRunner::Run(int, int) at SDLRunner.cpp:403
int main(int, char**) at Main.cpp:312
Aborted
The problem seems to be with the GetReportLineColor function. Somehow this function is being called with an "invalid index". I'm going to see if I can find where this function is being called, and why an invalid index is being passed.
I was able to recompile the project so that it would skip the start screen altogether, however, now I run into this error:
2017/03/06 10:53:16 [Runner.cpp:48] [!] Unhandled exception in SDLRunner:
GL error Invalid Value in virtual void spades::gui::SDLGLDevice::TexImage2D(spades::draw::IGLDevice::Enum, spades::draw::IGLDevice::Integer, spades::draw::IGLDevice::Enum, spades::draw::IGLDevice::Sizei, spades::draw::IGLDevice::Sizei, spades::draw::IGLDevice::Integer, spades::draw::IGLDevice::Enum, spades::draw::IGLDevice::Enum, const void*) at /home/pi/openspades/Sources/Gui/SDLGLDevice.cpp:873
Recompiled yet again to use the software renderer by default. Main screen starts fine, albeit very slowly. All text is a blue-ish color. I'm able to change settings and select a game, but when I try to actually connect, OpenSpades segfaults.
I'm trying with release 0.1.1-c, instead of latest.
@Jextrevor The SystemMessages.log
file in inside the user resource directory, which should be located at $XDG_DATA_HOME/openspades/Resources
If XDG_DATA_HOME is not set (you can see this by looking at the output of echo $XDG_DATA_HOME
), then the file is located at the ~/.local/share/openspades/Resources
folder (If I'm not mistaken)
Software rendering is working great on a Raspberry Pi 3. Still segfaults when placing blocks. I've found 640x480 to work the best (at fullscreen) with no undersampling.
@TapMemer sorry for the late response.
If you're atill interested in running OpenSpades on arm, take a look at the OpenPides fork master
branch.
really why dont we just take the code from openspides clean it up and then add it to openspades so that we do not have to worry about it anymore ?
@TapMemer sorry for the late response.
If you're atill interested in running OpenSpades on arm, take a look at the OpenPides fork
master
branch.