# Julia on iOS and Android

**URL:** <https://discourse.julialang.org/t/julia-on-ios-and-android/7346>\
**Category:** Internals & Design\
**Tags:** android\
**Created:** [November 28, 2017, 3:23am UTC](https://discourse.julialang.org/t/julia-on-ios-and-android/7346 "2017-11-28T03:23:29Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![NaOH](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/naoh/32/5632_2.png) [@NaOH](https://discourse.julialang.org/u/NaOH)\
**Post date:** [May 3, 2018, 7:13am UTC](https://discourse.julialang.org/t/julia-on-ios-and-android/7346/21 "2018-05-03T07:13:17Z")

</div>

Why can’t it read missing x lib, instead of error #2? 😛 It’s about to finish now!

I’ll try to run the tests individually, you mention you have added some tests, is there any other command to run those or will they run with `make tests`?

---

<div class="post-metadata">

**Author:** ![NaOH](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/naoh/32/5632_2.png) [@NaOH](https://discourse.julialang.org/u/NaOH)\
**Post date:** [May 4, 2018, 7:23pm UTC](https://discourse.julialang.org/t/julia-on-ios-and-android/7346/22 "2018-05-04T19:23:33Z")

</div>

I built yosterday succesfully and was able to use julia, then I melled up my PATH and I am starting again, because I had to reset Termux.

Installing with:

```
apt install julia-devprev

```

And then running Julia I get:

```
CANNOT LINK EKECUTABLE "julia": library "libopenblas.so" not found Aborted

```

If I do next:

```
apt install openblas

```

Then I get:

```
Illegal instruction

```

@its-pointless should I open an issue at your repo to track this?

---

<div class="post-metadata">

**Author:** ![its-pointless](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/its-pointless/32/3934_2.png) [@its-pointless](https://discourse.julialang.org/u/its-pointless)\
**Post date:** [May 4, 2018, 10:12pm UTC](https://discourse.julialang.org/t/julia-on-ios-and-android/7346/23 "2018-05-04T22:12:06Z")

</div>

Yes its probably best handled there since its likely purely a non-julia issue since you could build it yourself and its very likely an arch specific issue with how i compiled julia. Also its probably worth pointing out that there is a failsafe method to start termux that just loads busybox so you don’t have to reinstall termux if something like that happens to a bad path etc.

---

<div class="post-metadata">

**Author:** ![NaOH](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/naoh/32/5632_2.png) [@NaOH](https://discourse.julialang.org/u/NaOH)\
**Post date:** [May 4, 2018, 10:59pm UTC](https://discourse.julialang.org/t/julia-on-ios-and-android/7346/24 "2018-05-04T22:59:32Z")

</div>

Thanks! Could you please enable github issues in the repo of your julia fork?

Now I am getting this error, I don’t know what am I missing, this didn’t happen yesterday, I’ll continue to try and build it deterministically.

 ![image](https://global.discourse-cdn.com/julialang/original/3X/b/a/bae45611efb2b75385295810d3472ef2a49def6a.jpeg)

---

<div class="post-metadata">

**Author:** ![its-pointless](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/its-pointless/32/3934_2.png) [@its-pointless](https://discourse.julialang.org/u/its-pointless)\
**Post date:** [May 4, 2018, 11:19pm UTC](https://discourse.julialang.org/t/julia-on-ios-and-android/7346/25 "2018-05-04T23:19:25Z")

</div>

could be corrupted image?  
make clean will fix?  
could be if you have julia installed from my repo it messes with it since at some point its loading the wrong libraries?  
what ever is occuring i will be updating the branch so it installs and adding documentation explaining how the android linker, LD\_LIBRARY\_PATH etc can mangle things because android linker does not behave like a normal linker does. Which requires workarounds particularly if you doing something weird like compiling julia on it…

But first i have to finish testing gcc-8 so it doesn’t break anything if you install it.

---

<div class="post-metadata">

**Author:** ![its-pointless](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/its-pointless/32/3934_2.png) [@its-pointless](https://discourse.julialang.org/u/its-pointless)\
**Post date:** [May 6, 2018, 9:29pm UTC](https://discourse.julialang.org/t/julia-on-ios-and-android/7346/26 "2018-05-06T21:29:50Z")

</div>

okay time fill in some infomation with regards to complinig on device. Arm is the hard one so lets go through the issues.  
First the ram requirements for compiling is higher than it is for running it. Android also has a habit of killing processes that use lots of cpu and slowly require more and more ram… the device i was using to compile it died and tried 3 other devices and they fail. It needs ram.

secondly last time i checked arm still required libunwind so if you are getting bus errors during compile it could be its not installed or maybe libuv needs it can’t recall.

the android linker is deliberately designed to be stupid so you have to tell it the order to search libraries via LD\_LIBRARY\_PATH. To use a compiled in place version you have to add the julia libs LD\_LIBRARY\_PATH before system LD\_LIBRARY\_PATH. this means you can’t use dynamically linked lib version of libuv that julia uses at the same time as the termux libuv.so since you need to have the LD\_LIBRARY\_PATH first pick up julia libs then termux system libs. Solution was to simply use statically linked julia libuv.

---

<div class="post-metadata">

**Author:** ![erwtei](https://avatars.discourse-cdn.com/v4/letter/e/6a8cbe/32.png) [@erwtei](https://discourse.julialang.org/u/erwtei)\
**Post date:** [January 11, 2019, 9:43pm UTC](https://discourse.julialang.org/t/julia-on-ios-and-android/7346/27 "2019-01-11T21:43:17Z")

</div>

[juliabox.com](http://juliabox.com) runs on iOS, i reccomend iPhone but have used it on iPhone aswell. You can run code, install packages and it is cloud based, so all your code can be downloaded on another device.

---

<div class="post-metadata">

**Author:** ![jpsamaroo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jpsamaroo/32/46804_2.png) [@jpsamaroo](https://discourse.julialang.org/u/jpsamaroo)\
**Post date:** [January 11, 2019, 10:55pm UTC](https://discourse.julialang.org/t/julia-on-ios-and-android/7346/28 "2019-01-11T22:55:07Z")

</div>

JuliaBox does not run on iOS; JuliaBox is hosted on, I’d imagine, Linux servers (or maybe a \*BSD?). However, JuliaBox is **accessible** from iOS, since JuliaBox’s interface is through a web browser. That is a key distinction; you can’t write code that works in a cross-platform manner that works the same on iOS as it would work on a desktop system. That is to say, things like filesystem operations, device access (cameras via VideoIO, Vulkan-accelerated graphics if any exist, etc.) would not work on JuliaBox accessed from iOS, while these things would work on a regular desktop running native Julia.

---

<div class="post-metadata">

**Author:** ![oschulz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oschulz/32/2998_2.png) [@oschulz](https://discourse.julialang.org/u/oschulz)\
**Post date:** [August 31, 2019, 7:37pm UTC](https://discourse.julialang.org/t/julia-on-ios-and-android/7346/29 "2019-08-31T19:37:01Z")

</div>

Just saw this:

[https://developer.apple.com/documentation/bundleresources/entitlements/com\_apple\_security\_cs\_allow-jit](https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_cs_allow-jit)

From what I understand, you can request permission now for your app to use writable executable memory (if Apple grants this specific entitlement to your app). Would that mean that Julia on iOS would be possible, at least potentially?

I don’t think many people would try using Julia on iOS for serious tasks - still, having Julia in your pocket is kinda cool. Recently, during a presentation where I was advocating for Julia and was pointing out that it can pretty much run anywhere (demonstrating live on a Jetson Nano), someone asked “well, does it run on your phone?”. The fact that I could pull my phone out and show a Julia console on it (thanks, @its-pointless!), silly as it seems, definitely made an impact. So it’s actually not so pointless at all (pardon the pun). 😉

Disclaimer: I’m not a frequent iOS user, and certainly not an iOS developer, so I may be reading this completely wrong.

---

<div class="post-metadata">

**Author:** ![NHDaly](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nhdaly/32/1413_2.png) [@NHDaly](https://discourse.julialang.org/u/NHDaly)\
**Post date:** [September 10, 2019, 8:25pm UTC](https://discourse.julialang.org/t/julia-on-ios-and-android/7346/30 "2019-09-10T20:25:57Z")

</div>

Unfortunately it looks like these permissions are for building _mac_ apps that run on the MacOS App Store (such as [Building -- and releasing -- a fully self-contained Application written in julia - #10 by NHDaly](https://discourse.julialang.org/t/building-and-releasing-a-fully-self-contained-application-written-in-julia/10418/10)).

Unfortunately I’ve since let my Developer account lapse, so Paddle Battle is no longer on the app store… I’ve tried putting it back, but had problems getting everything to work. 😢

> Would that mean that Julia on iOS would be possible, at least potentially?

But so no, I don’t think this means anything for iOS compatibility. 😢

---

<div class="post-metadata">

**Author:** ![oschulz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oschulz/32/2998_2.png) [@oschulz](https://discourse.julialang.org/u/oschulz)\
**Post date:** [September 10, 2019, 10:11pm UTC](https://discourse.julialang.org/t/julia-on-ios-and-android/7346/31 "2019-09-10T22:11:55Z")

</div>

> [@NHDaly](#):
>
> Unfortunately it looks like these permissions are for building _mac_ apps that run on the MacOS App Store

Ah, darn! ☹

---

<div class="post-metadata">

**Author:** ![ihnorton](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ihnorton/32/26_2.png) [@ihnorton](https://discourse.julialang.org/u/ihnorton)\
**Post date:** [September 11, 2019, 2:25am UTC](https://discourse.julialang.org/t/julia-on-ios-and-android/7346/32 "2019-09-11T02:25:10Z")

</div>

> [@NHDaly](#):
>
> Would that mean that Julia on iOS would be possible, at least potentially?

In case anyone finds the following helpful/inspiring, here’s a short description of how Swift playgrounds work on iOS w/out a JIT:

[https://twitter.com/jckarter/status/1169378736648572928](https://twitter.com/jckarter/status/1169378736648572928)

Julia might be able to do something similar, at least for functions/call-trees marked as “expensive” in some fashion (doing this for every function would probably be prohibitive). I suspect they have linker customizations and other special sauce to make it work well.

---

<div class="post-metadata">

**Author:** ![Alec\_Loudenback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alec_loudenback/32/278_2.png) [@Alec\_Loudenback](https://discourse.julialang.org/u/Alec_Loudenback)\
**Post date:** [September 27, 2019, 2:45am UTC](https://discourse.julialang.org/t/julia-on-ios-and-android/7346/33 "2019-09-27T02:45:42Z")

</div>

It seems that running Julia on Android may now just be as simple as installing Termux and running `apt-get install julia`?

 ![Screenshot_20190926-214141](https://global.discourse-cdn.com/julialang/original/3X/6/a/6ac1f4a709c0f7932f04d268d0f92767d5b08336.png)

I did try and start down the path of building from source and followed the [directions here](https://android.stackexchange.com/a/186223), but I think that may not have been necessary…

---

<div class="post-metadata">

**Author:** ![Alec\_Loudenback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alec_loudenback/32/278_2.png) [@Alec\_Loudenback](https://discourse.julialang.org/u/Alec_Loudenback)\
**Post date:** [September 27, 2019, 2:57am UTC](https://discourse.julialang.org/t/julia-on-ios-and-android/7346/34 "2019-09-27T02:57:51Z")

</div>

Looks like maybe I spoke too soon. The result of trying to `add Distributions`:

 ![Screenshot_20190926-215631](https://global.discourse-cdn.com/julialang/original/3X/a/2/a217977d00e2e986664f730cd9bcd324bb4616f1.png)

---

<div class="post-metadata">

**Author:** ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Post date:** [September 27, 2019, 5:38am UTC](https://discourse.julialang.org/t/julia-on-ios-and-android/7346/35 "2019-09-27T05:38:55Z")

</div>

It says unable to locate package julia for me

---

<div class="post-metadata">

**Author:** ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)\
**Post date:** [September 27, 2019, 6:31am UTC](https://discourse.julialang.org/t/julia-on-ios-and-android/7346/36 "2019-09-27T06:31:27Z")

</div>

[https://github.com/termux/termux-packages/issues/58#issuecomment-529036798](https://github.com/termux/termux-packages/issues/58#issuecomment-529036798)

---

<div class="post-metadata">

**Author:** ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Post date:** [September 27, 2019, 7:57am UTC](https://discourse.julialang.org/t/julia-on-ios-and-android/7346/37 "2019-09-27T07:57:34Z")

</div>

Figure it out!

 ![termux](https://global.discourse-cdn.com/julialang/original/3X/f/1/f1bbda2eb1f7107598a947efd2c9623db2534ae2.jpeg)

---

<div class="post-metadata">

**Author:** ![NHDaly](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nhdaly/32/1413_2.png) [@NHDaly](https://discourse.julialang.org/u/NHDaly)\
**Post date:** [September 30, 2019, 5:05am UTC](https://discourse.julialang.org/t/julia-on-ios-and-android/7346/38 "2019-09-30T05:05:34Z")

</div>

Haha thanks! That’s awesome! I got it installed via those same instructions as well. 🙂 Neat fun!

```julia
$ pkg install wget
$ wget https://its-pointless.github.io/setup-pointless-repo.sh
$ bash setup-pointless-repo.sh
$ pkg install julia # julia 1.2.0 fork

```

> <https://github.com/termux/termux-packages/issues/58#issuecomment-529036798>
>
> http://julialang.org/

 ![Screenshot_20190930-140727](https://global.discourse-cdn.com/julialang/original/3X/8/4/843d568ff2c8b0bdc2f2f009a29262c6e4b01380.png)

---

<div class="post-metadata">

**Author:** ![ert](https://avatars.discourse-cdn.com/v4/letter/e/b5ac83/32.png) [@ert](https://discourse.julialang.org/u/ert)\
**Post date:** [January 31, 2020, 7:09am UTC](https://discourse.julialang.org/t/julia-on-ios-and-android/7346/39 "2020-01-31T07:09:17Z")

</div>

I’m just compiling Julia inside [iSH](https://ish.app/) for iOS which provides a virtualized x86 Linux environment. Will let you know how it goes (binary download of Julia was not working, see [Julia won't start · Issue #259 · ish-app/ish · GitHub](https://github.com/tbodt/ish/issues/259) ).

By the way, if it is possible to create something like full x86 emulation iSH (it uses a kind of JIT written in assembly) there must be some similar way to get Julia JIT to run natively with iOS restrictions. Anyone mad enough to dive into this ? 😉

---

<div class="post-metadata">

**Author:** ![Alphons\_Jaimon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alphons_jaimon/32/12623_2.png) [@Alphons\_Jaimon](https://discourse.julialang.org/u/Alphons_Jaimon)\
**Post date:** [February 4, 2020, 5:12am UTC](https://discourse.julialang.org/t/julia-on-ios-and-android/7346/40 "2020-02-04T05:12:36Z")

</div>

How do we do that! Can you please elaborate on how to run Julia on termux!

[Previous page](https://discourse.julialang.org/t/julia-on-ios-and-android/7346.md?page=1)

[Next page](https://discourse.julialang.org/t/julia-on-ios-and-android/7346.md?page=3)
