Could cctools-port be used to cross-compile R for iOS? #128

Open
opened 2022-12-21 12:45:08 -06:00 by SugarRayLua · 8 comments
SugarRayLua commented 2022-12-21 12:45:08 -06:00 (Migrated from github.com)

Hello.

I am a novice linux user/programmer who would like to run the R statistical language natively on my iPad. As far as I can tell, no one has successfully cross-compiled R for iOS (one developer on the App Store has tried: "R Analyst" but the app is unable to perform many R functions). Yet, R successfully compiles on Mac OSX. I came across the cctool-port on github and was wondering if it might be able to help me cross-compile R for iOS. If so, I'm willing to learn/try cross-compiling to iOS on Linux (or via terminal on my MacOS) and would appreciate any additional tips beyond the instructions provided in the README.

Thanks and Happy Holidays!

Hello. I am a novice linux user/programmer who would like to run the R statistical language natively on my iPad. As far as I can tell, no one has successfully cross-compiled R for iOS (one developer on the App Store has tried: "R Analyst" but the app is unable to perform many R functions). Yet, R successfully compiles on Mac OSX. I came across the cctool-port on github and was wondering if it might be able to help me cross-compile R for iOS. If so, I'm willing to learn/try cross-compiling to iOS on Linux (or via terminal on my MacOS) and would appreciate any additional tips beyond the instructions provided in the README. Thanks and Happy Holidays!
shepherdjerred commented 2023-02-13 19:12:17 -06:00 (Migrated from github.com)

Hello! I think you would be more interested in the osxcross project. It is likely possible to compile R for iOS, but I doubt that it'll be easy unless you have a solid understanding of the compilation process and linux compilation tools.

I would suggest looking into something like GitHub Codespaces or similar. It would be a lot less work and yield a similar result.

Hello! I think you would be more interested in the [osxcross project](https://github.com/tpoechtrager/osxcross). It is likely possible to compile R for iOS, but I doubt that it'll be easy unless you have a solid understanding of the compilation process and linux compilation tools. I would suggest looking into something like GitHub Codespaces or similar. It would be a lot less work and yield a similar result.
SugarRayLua commented 2023-02-13 20:48:14 -06:00 (Migrated from github.com)

Thank you very much, @shepherdjerred, I'll check out those suggestions!

Have a good week :-)

Thank you very much, @shepherdjerred, I'll check out those suggestions! Have a good week :-)
barracuda156 commented 2025-09-09 05:21:03 -05:00 (Migrated from github.com)

@SugarRayLua Notice, that to have a proper R environment, you may need much more than just R itself (and its dependency tree). Quite a number of R packages either require external libraries or need to be able to build bundled copies. Say, RcppParallel uses external OneTBB (which needs CMake) or a bundled older TBB. Do either of these build for iOS in some way?

@SugarRayLua Notice, that to have a proper R environment, you may need much more than just R itself (and its dependency tree). Quite a number of R packages either require external libraries or need to be able to build bundled copies. Say, RcppParallel uses external OneTBB (which needs CMake) or a bundled older TBB. Do either of these build for iOS in some way?
SugarRayLua commented 2025-09-09 23:32:35 -05:00 (Migrated from github.com)

Thank you, @barracuda156, for your follow-up input!
Unfortunately, I have now moved on from iOS (gave iOS devices to relatives) as found iOS too limiting for my R needs and now daily use a more powerful touchscreen laptop with approximately the same footprint as the iPad (GPD Windows Max 2) which I flashed with Linux and can run R natively as well as virtual machines.
In the meantime, Posit has supported the "WebR" wasm build which I had found works quite well on browsers (including iOS tablets) that seemed to mitigate the need to build R natively on an iOS device:

https://webr.sh/

Fyi,
Have a good night :-)

Thank you, @barracuda156, for your follow-up input! Unfortunately, I have now moved on from iOS (gave iOS devices to relatives) as found iOS too limiting for my R needs and now daily use a more powerful touchscreen laptop with approximately the same footprint as the iPad (GPD Windows Max 2) which I flashed with Linux and can run R natively as well as virtual machines. In the meantime, Posit has supported the "WebR" wasm build which I had found works quite well on browsers (including iOS tablets) that seemed to mitigate the need to build R natively on an iOS device: ``` https://webr.sh/ ``` Fyi, Have a good night :-)
barracuda156 commented 2025-09-10 00:02:59 -05:00 (Migrated from github.com)

@SugarRayLua Just in case, you could run Linux on iOS via https://github.com/ish-app/ish

@SugarRayLua Just in case, you could run Linux on iOS via https://github.com/ish-app/ish
SugarRayLua commented 2025-09-10 01:57:30 -05:00 (Migrated from github.com)

Thanks, @barracuda156., for the tip. I actually did use R on iSH years ago until something broke with iSH and R, and it wouldn't run correctly anymore:

https://github.com/ish-app/ish/issues/1780

That was a couple of years ago though so maybe it is working now. iSH also unfortunately ran much slower than a regular Linux installation.

Thanks, @barracuda156., for the tip. I actually did use R on iSH years ago until something broke with iSH and R, and it wouldn't run correctly anymore: ``` https://github.com/ish-app/ish/issues/1780 ``` That was a couple of years ago though so maybe it is working now. iSH also unfortunately ran much slower than a regular Linux installation.
barracuda156 commented 2025-09-10 02:20:06 -05:00 (Migrated from github.com)

The only remaining idea is to run R remotely via gsocket session, using iSH on iOS as a client, you will have normal speed, but that obviously requires something else to run R LOL

The only remaining idea is to run R remotely via `gsocket` session, using iSH on iOS as a client, you will have normal speed, but that obviously requires something else to run R LOL
SugarRayLua commented 2025-09-10 22:55:55 -05:00 (Migrated from github.com)

Thanks for all the feedback and suggestions, @barracuda156.

Thanks for all the feedback and suggestions, @barracuda156.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
miles/cctools-port#128
No description provided.