Compiling on MIPS - ASM

345 views Asked by At

I'm trying to compile Plex Home Theater on my new Ci20 but I'm coming across some build errors which I believe are ASM related, knowing nothing about ASM I was wondering if anyone were able to provide any assistance.

Build Error

[ 19%] Building CXX object xbmc/CMakeFiles/xbmc.dir/GUIInfoManager.cpp.o
In file included from /home/ci20/plex-home-theater-public/xbmc/linux/PlatformInclude.h:25:0,
             from /home/ci20/plex-home-theater-public/xbmc/system.h:254,
             from /home/ci20/plex-home-theater-public/xbmc/network/Network.h:26,
             from /home/ci20/plex-home-theater-public/xbmc/GUIInfoManager.cpp:21:
/home/ci20/plex-home-theater-public/xbmc/linux/XHandlePublic.h:41:1: warning: ‘__stdcall__’ attribute directive ignored [-Wattributes]
In file included from /home/ci20/plex-home-theater-public/xbmc/linux/PlatformInclude.h:27:0,
             from /home/ci20/plex-home-theater-public/xbmc/system.h:254,
             from /home/ci20/plex-home-theater-public/xbmc/network/Network.h:26,
             from /home/ci20/plex-home-theater-public/xbmc/GUIInfoManager.cpp:21:
/home/ci20/plex-home-theater-public/xbmc/linux/XTimeUtils.h:28:39: warning: ‘__stdcall__’ attribute directive ignored [-Wattributes]
In file included from /home/ci20/plex-home-theater-public/xbmc/GUIInfoManager.cpp:55:0:
/home/ci20/plex-home-theater-public/xbmc/utils/MathUtils.h: In function ‘int MathUtils::round_int(double)’:
/home/ci20/plex-home-theater-public/xbmc/utils/MathUtils.h:150:6: error: unknown register name ‘st’ in ‘asm’
make[2]: *** [xbmc/CMakeFiles/xbmc.dir/GUIInfoManager.cpp.o] Error 1
make[1]: *** [xbmc/CMakeFiles/xbmc.dir/all] Error 2
make: *** [all] Error 2

/xbmc/utils/MathUtils.h

https://github.com/plexinc/plex-home-theater-public/blob/pht-frodo/xbmc/utils/MathUtils.h

Any guidance is greatly appreciated!

1

There are 1 answers

4
Jester On BEST ANSWER

The problem is that DISABLE_MATHUTILS_ASM_ROUND_INT is not set, so, since there is no MIPS version, the compiler is trying to compile the default x86 asm version which obviously won't work.

On closer look, you should probably extend the conditions starting on line 35 to detect your MIPS and disable the asm code. Alternatively as a quick hack you can just stick an unconditional #define DISABLE_MATHUTILS_ASM_ROUND_INT along with #define DISABLE_MATHUTILS_ASM_TRUNCATE_INT on line 50 to get it to compile.

The logic of the code seems flawed, they should specifically only enable the asm code on architectures they have asm code for, not the other way around...