Bug#830748: Causes of the supertuxkart FTBFS

Adrian Bunk bunk at stusta.de
Thu Aug 18 10:17:48 UTC 2016


tags 830748 -help
thanks

There seem to be at least two different bugs causing these FTBFS issues.

Below are (untested) explanations which changes between 0.9.1 and 0.9.2 
caused them, and suggestions how fixes might look like.


The FTBFS on 64bit platforms is caused by the following change in 
lib/angelscript/source/as_config.h:

@@ -835,7 +844,7 @@
                        #define THISCALL_PASS_OBJECT_POINTER_ON_THE_STACK
                        #define AS_X86
                        #undef AS_NO_THISCALL_FUNCTOR_METHOD
-               #elif defined(__x86_64__)
+               #elif defined(__LP64__) && !defined(__arm64__)
                        #define AS_X64_GCC
                        #undef AS_NO_THISCALL_FUNCTOR_METHOD
                        #define HAS_128_BIT_PRIMITIVES

This nicely explains the 64bit build failures.

A second bug here is that the actual define is __aarch64__ and not 
__arm64__ (so even the aarch64 build got broken).
That explains why the aarch64 build also got broken.

This change went from doing the right thing (only use the x86_64 code
on x86_64) to something worse (use the x86_64 code on all 64bit platforms 
except ones explicitely excluded).

I would suggest to simply revert this change, but upstream should be 
asked why this change was done in the first place.


32bit mips build failures are a separate issue, caused by another change 
in lib/angelscript/source/as_config.h:

-                       // Native calling conventions for Linux/Mips do not work yet.
-                       #define AS_MAX_PORTABILITY
+                       #ifdef _ABIO32
+                               #define AS_MIPS
+
+                               // All structures are returned in memory regardless of size or complexity
+                               #define THISCALL_RETURN_SIMPLE_IN_MEMORY
+                               #define THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 0
+                               #define CDECL_RETURN_SIMPLE_IN_MEMORY
+                               #define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 0
+                               #define STDCALL_RETURN_SIMPLE_IN_MEMORY
+                               #define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 0
+                               #undef AS_NO_THISCALL_FUNCTOR_METHOD
+                       #else
+                               // For other ABIs the native calling convention is not available (yet)
+                               #define AS_MAX_PORTABILITY
+                       #endif

No longer defining AS_MAX_PORTABILITY in O32 builds makes 
lib/angelscript/source/as_callfunc.cpp call code from
lib/angelscript/source/as_callfunc_mips.cpp, but this file
is not compiled since it was not added to 
lib/angelscript/projects/cmake/CMakeLists.txt

Adding it to CMakeLists.txt should fix the 32bit mips build.


cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed



More information about the Pkg-games-devel mailing list