MCMrARM / mcpelauncher-linux

Please note this is a legacy repository, please go to: https://github.com/minecraft-linux/mcpelauncher-manifest/wiki
GNU General Public License v3.0
311 stars 44 forks source link

Build on ARM #20

Open srgkmv opened 9 years ago

srgkmv commented 9 years ago

I really want to run MCPE on raspberry pi or cubieboard under Linux, so I was trying to port this code to arm. I used correct processor architecture of apk, replaced all dependencies in libs directory with correct architecture, commented out subhooks since they don't work on ARM and replaced ANDROID_X86_LINKER with ANDROID_ARM_LINKER in CMakeLists.txt. But I'm getting crashes at line: void* handle = hybris_dlopen((getCWD() + "libs/libminecraftpe.so").c_str(), RTLD_LAZY); Debugger receives SIGSEGV in call_array when calling second constructor in .init_array section of elf. More deep debugging leads to calling std::ios_base::Init::Init(void) if I'm correct. Can anyone give me advice, what am I doing wrong?

ghost commented 9 years ago

***\ I'M NOT 100% SURE I don't think that you need libHybris for loading libminecraftpe.so on a ARM device...

srgkmv commented 9 years ago

libminecraftpe.so is linked against android libs and using /system/bin/linker instead of /lib/ld-linux.so.2 to load itself, as I understand. I'm not sure either, but I think, that's why we need libHybris even on ARM device.

ghost commented 9 years ago

Well, This project use a modified version of libHydris that could be the problem.

MCMrARM commented 8 years ago

You could try compiling the project as ARM by changing the line below: https://github.com/MCMrARM/mcpelauncher-linux/blob/master/CMakeLists.txt#L27 to: target_compile_definitions(mcpelauncher PRIVATE HAVE_ARM_TLS_REGISTER ANDROID_ARM_LINKER _GNU_SOURCE LINKER_TEXT_BASE=0xB0000100 LINKER_AREA_SIZE=0x01000000 LINKER_DEBUG=1)

No guarantees though :P

srgkmv commented 8 years ago

Thank you for response. I tried to compile with changes you suggested, but result was the same. And I didn't found any usage of HAVE_ARM_TLS_REGISTER in code. Maybe I used wrong libs from android-ndk.

NyaomiDEV commented 7 years ago

Did you look on byteandahalf's fork of MCPELauncher? He did it for RPI!

lukeeey commented 6 years ago

It seems weird that this can't be compiled on arm, MrARM.