Hello together,
does anybody compiled Erlang OTP 26 or higher for Android which is compatible for the new page size 16KB - like mentioned in Support 16 KB page sizes | Compatibility | Android Developers
and any hints on that to compile it?
Hello together,
does anybody compiled Erlang OTP 26 or higher for Android which is compatible for the new page size 16KB - like mentioned in Support 16 KB page sizes | Compatibility | Android Developers
and any hints on that to compile it?
I don’t know if Android changes this (hacked up kernel and different libc), but all recent OTP versions (at least from 23 up to 27) build and work out of the box on my M1 running Fedora 41, and that one has a 16KB page size.
Okay thanks. I got it compiled on my Ubuntu System, but I added some LDFLAGS to the compiler.
export LDFLAGS=“-Wl,-z,max-page-size=16384”
this is also mentioned in the Android Developer - NDK 27 .
After that the ELF check says its aligned to be 16 kb page size compatible.
only e.g crypto.so is aligned for 16 kb page size but not for the files beam.smp for erlang. Any hints?
Hello michi,
I’m quite late to answer your question but it may still be useful for other people looking to support recent Android requirements.
I’ve updated my project providing pre-built releases of Erlang/OTP, using version 28.3.1, and it seems compatible with the recent 16KB page size support. Here is the link to the project:
The build instructions are described, I didn’t have to pass or edit specific compiler flags, I’ve simply used a quite recent version of the Android NDK toolchain, r29 in this case.
I’ve tested and updated this sample project integrating Erlang/OTP within an Android application:
and it is working fine with the 16KB variant of the Android emulator images.
Let me know if you have any questions!
Cheers,
Jérôme