Bug#830748: supertuxkart: FTBFS on arm64, mips/mips64/mipsel, ppc64el, s390x
Hi, It should be fixed in this commit: https://github.com/supertuxkart/stk-code/commit/5e05f1178ce6bc5f3a653b55ab3dc6d016196341 This modification is already applied in upstream angelscript: https://sourceforge.net/p/angelscript/code/2353/ Vincent Cheng confirmed that it works in this comment: https://github.com/supertuxkart/stk-code/issues/2569#issuecomment-250677264 I attached the patch. Regards, Deve >From 5e05f1178ce6bc5f3a653b55ab3dc6d016196341 Mon Sep 17 00:00:00 2001 From: DeveDate: Mon, 3 Oct 2016 23:26:09 +0200 Subject: [PATCH] Fixed compiler error on Linux with non-x86 64bit platforms, e.g. arm64, mips, and s390x architectures This modification is already applied in upstream angelscript repository: https://sourceforge.net/p/angelscript/code/2353/ Thanks to Adrian Bunk and Andreas Jonsson --- lib/angelscript/projects/cmake/CMakeLists.txt | 1 + lib/angelscript/source/as_config.h| 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/angelscript/projects/cmake/CMakeLists.txt b/lib/angelscript/projects/cmake/CMakeLists.txt index e939713..755d837 100644 --- a/lib/angelscript/projects/cmake/CMakeLists.txt +++ b/lib/angelscript/projects/cmake/CMakeLists.txt @@ -67,6 +67,7 @@ set(ANGELSCRIPT_SOURCE ../../source/as_builder.cpp ../../source/as_bytecode.cpp ../../source/as_callfunc.cpp +../../source/as_callfunc_mips.cpp ../../source/as_callfunc_x86.cpp ../../source/as_callfunc_x64_gcc.cpp ../../source/as_callfunc_x64_msvc.cpp diff --git a/lib/angelscript/source/as_config.h b/lib/angelscript/source/as_config.h index cb05bff..5bb5b8e 100644 --- a/lib/angelscript/source/as_config.h +++ b/lib/angelscript/source/as_config.h @@ -844,7 +844,7 @@ #define THISCALL_PASS_OBJECT_POINTER_ON_THE_STACK #define AS_X86 #undef AS_NO_THISCALL_FUNCTOR_METHOD - #elif defined(__LP64__) && !defined(__arm64__) + #elif defined(__x86_64__) #define AS_X64_GCC #undef AS_NO_THISCALL_FUNCTOR_METHOD #define HAS_128_BIT_PRIMITIVES -- 2.7.4
Bug#830748: supertuxkart: FTBFS on arm64, mips/mips64/mipsel, ppc64el, s390x
Hello, I have tried changes that you have suggested, with them, supertuxkart was building successfully on mips, mipsel, mips64el, i386 and amd64. add-as_callfunc_mips-to-CMakeLists.patch - adds as_callfunc_mips.cpp file into CMakeLists.txt fix-non-x86-arches-build.patch - fix angelscript build on non-x86 64-bits arches. The patches that contains mentioned changes are attached.--- supertuxkart-0.9.2.orig/lib/angelscript/source/as_config.h +++ supertuxkart-0.9.2/lib/angelscript/source/as_config.h @@ -844,7 +844,7 @@ #define THISCALL_PASS_OBJECT_POINTER_ON_THE_STACK #define AS_X86 #undef AS_NO_THISCALL_FUNCTOR_METHOD - #elif defined(__LP64__) && !defined(__arm64__) + #elif defined(__x86_64__) #define AS_X64_GCC #undef AS_NO_THISCALL_FUNCTOR_METHOD #define HAS_128_BIT_PRIMITIVES --- supertuxkart-0.9.2.orig/lib/angelscript/projects/cmake/CMakeLists.txt +++ supertuxkart-0.9.2/lib/angelscript/projects/cmake/CMakeLists.txt @@ -95,6 +95,7 @@ set(ANGELSCRIPT_SOURCE ../../source/as_tokenizer.cpp ../../source/as_typeinfo.cpp ../../source/as_variablescope.cpp +../../source/as_callfunc_mips.cpp ) if(MSVC AND CMAKE_CL_64)
Bug#830748: supertuxkart: FTBFS on arm64, mips/mips64/mipsel, ppc64el, s390x
Hello, I have tried changes that you have suggested, with them, supertuxkart was building successfully on mips, mipsel, mips64el, i386 and amd64. add-as_callfunc_mips-to-CMakeLists.patch - adds as_callfunc_mips.cpp file into CMakeLists.txt fix-non-x86-arches-build.patch - fix angelscript build on non-x86 64-bits arches. The patches that contains mentioned changes are attached.--- supertuxkart-0.9.2.orig/lib/angelscript/projects/cmake/CMakeLists.txt +++ supertuxkart-0.9.2/lib/angelscript/projects/cmake/CMakeLists.txt @@ -95,6 +95,7 @@ set(ANGELSCRIPT_SOURCE ../../source/as_tokenizer.cpp ../../source/as_typeinfo.cpp ../../source/as_variablescope.cpp +../../source/as_callfunc_mips.cpp ) if(MSVC AND CMAKE_CL_64) --- supertuxkart-0.9.2.orig/lib/angelscript/source/as_config.h +++ supertuxkart-0.9.2/lib/angelscript/source/as_config.h @@ -844,7 +844,7 @@ #define THISCALL_PASS_OBJECT_POINTER_ON_THE_STACK #define AS_X86 #undef AS_NO_THISCALL_FUNCTOR_METHOD - #elif defined(__LP64__) && !defined(__arm64__) + #elif defined(__x86_64__) #define AS_X64_GCC #undef AS_NO_THISCALL_FUNCTOR_METHOD #define HAS_128_BIT_PRIMITIVES
Bug#830748: supertuxkart: FTBFS on arm64, mips/mips64/mipsel, ppc64el, s390x
Package: supertuxkart Version: 0.9.2-1 Severity: serious Justification: fails to build from source (but built successfully in the past) supertuxkart/0.9.2-1 FTBFS on arm64, mips/mips64/mipsel, ppc64el, and s390x; full build log at [1], and here's the relevant part of the log: [ 9%] Building CXX object lib/irrlicht/CMakeFiles/stkirrlicht.dir/source/Irrlicht/CGUIMeshViewer.cpp.o cd /«PKGBUILDDIR»/obj-aarch64-linux-gnu/lib/irrlicht && /usr/bin/c++ -DGLEW_NO_GLU -DIRRLICHT_EXPORTS=1 -DNDEBUG=1 -DNO_IRR_LINUX_X11_VIDMODE_ -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES -DPNG_THREAD_UNSAFE_OK -D_IRR_LINUX_X11_RANDR_ -I/«PKGBUILDDIR»/lib/bullet/src -I/«PKGBUILDDIR»/lib/glew/include -I/«PKGBUILDDIR»/lib/irrlicht/include -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -pipe -O3 -fno-exceptions -fstrict-aliasing -I/usr/X11R6/include -Wall -pipe -O3 -fno-exceptions -fstrict-aliasing -I/usr/X11R6/include -fexpensive-optimizations -O2 -DNDEBUG -o CMakeFiles/stkirrlicht.dir/source/Irrlicht/CGUIMeshViewer.cpp.o -c /«PKGBUILDDIR»/lib/irrlicht/source/Irrlicht/CGUIMeshViewer.cpp /«PKGBUILDDIR»/lib/angelscript/source/as_callfunc_x64_gcc.cpp: In function 'asQWORD X64_CallFunction(const asQWORD*, int, funcptr_t, asQWORD&, bool)': /«PKGBUILDDIR»/lib/angelscript/source/as_callfunc_x64_gcc.cpp:162:82: error: unknown register name '%rcx' in 'asm' "%rdi", "%rsi", "%rax", "%rdx", "%rcx", "%r8", "%r9", "%r10", "%r11", "%r15"); ^ /«PKGBUILDDIR»/lib/angelscript/source/as_callfunc_x64_gcc.cpp:162:82: error: unknown register name '%rdx' in 'asm' /«PKGBUILDDIR»/lib/angelscript/source/as_callfunc_x64_gcc.cpp:162:82: error: unknown register name '%rax' in 'asm' /«PKGBUILDDIR»/lib/angelscript/source/as_callfunc_x64_gcc.cpp:162:82: error: unknown register name '%rsi' in 'asm' /«PKGBUILDDIR»/lib/angelscript/source/as_callfunc_x64_gcc.cpp:162:82: error: unknown register name '%rdi' in 'asm' /«PKGBUILDDIR»/lib/angelscript/source/as_callfunc_x64_gcc.cpp:162:82: error: unknown register name '%xmm7' in 'asm' /«PKGBUILDDIR»/lib/angelscript/source/as_callfunc_x64_gcc.cpp:162:82: error: unknown register name '%xmm6' in 'asm' /«PKGBUILDDIR»/lib/angelscript/source/as_callfunc_x64_gcc.cpp:162:82: error: unknown register name '%xmm5' in 'asm' /«PKGBUILDDIR»/lib/angelscript/source/as_callfunc_x64_gcc.cpp:162:82: error: unknown register name '%xmm4' in 'asm' /«PKGBUILDDIR»/lib/angelscript/source/as_callfunc_x64_gcc.cpp:162:82: error: unknown register name '%xmm3' in 'asm' /«PKGBUILDDIR»/lib/angelscript/source/as_callfunc_x64_gcc.cpp:162:82: error: unknown register name '%xmm2' in 'asm' /«PKGBUILDDIR»/lib/angelscript/source/as_callfunc_x64_gcc.cpp:162:82: error: unknown register name '%xmm1' in 'asm' /«PKGBUILDDIR»/lib/angelscript/source/as_callfunc_x64_gcc.cpp:162:82: error: unknown register name '%xmm0' in 'asm' It looks like angelscript is misdetecting certain architectures as x86 and hence applying the wrong assembly directives. It's worth checking first to see if there's a fix for this in upstream angelscript before fixing it in supertuxkart. I'll take a look at this when I have time, but help is greatly appreciated if someone has a chance to tackle this before I do. Regards, Vincent [1] https://buildd.debian.org/status/package.php?p=supertuxkart=unstable