Hacker News new | ask | show | jobs
by hnlmorg 702 days ago
> I cant run cosmolibc on Android, for example.

You can:

https://justine.lol/cosmo3/

> After nearly one year of development, I'm pleased to announce our version 3.0 release of the Cosmopolitan library. [...] we invented a new linker that lets you build fat binaries which can run on these platforms: AMD ... ARM64

https://github.com/jart/cosmopolitan/releases/tag/3.5.3

> This release fixes Android support. You can now run LLMs on your phone using Cosmopolitan software like llamafile. See 78d3b86 for further details. Thank you @aj47 (techfren.net) for bug reports and and testing efforts.

2 comments

Thanks for the link!

My comment was based on cloning master yesterday and trying to build redbean but hitting what looks like https://github.com/jart/cosmopolitan/issues/940

Indeed it lioks like the commit you mentioned should have fixed the issue with the pointer having too many bits for the weird kernel used on android and some raspis. Fingers crossed that release works.

edit:

Testing that release on Termux 118, stock Android 14 on a moto g73 5G (XT2237-2):

    ~/cosmopolitan $ uname -a
    Linux localhost 5.10.205-android12-9-00027-g4d6c07fc6342-ab11525972 #1 SMP PREEMPT Mon Mar 4 18:49:33 UTC 2024 aarch64 Android
    ~/cosmopolitan $ /data/data/com.termux/files/home/cosmopolitan/build/bootstrap/cocmd
    ape error: /data/data/com.termux/files/home/cosmopolitan/build/bootstrap/cocmd: prog mmap failed w/ errno 12
That issue was fixed last month. I've freshened up the cocmd binary for you! https://github.com/jart/cosmopolitan/commit/e18fe1e1127f30db...
Awesome, thanks!
Can you run it on RISCV Android?!
No, but Android on RISC-V isn’t even considered stable. So you’ll be manually compiling a fair chunk of code to get it running. Adding a few extra tools to your build pipeline isn’t going to be a deal breaker.