Fortran compiler for tablets?

Does a Fortran compiler exist for tablets? If there is one, please inform. Paddy.

Based on my knowledge, no, but I’m not a Fortran expert. If you have an ARM-based Linux machine, you can attempt to compile your Fortran code on it and then transfer the file to your Android tablet. However, this process can be challenging due to the security features of the Android system.

Supposing it is an Android tablet, I have found:

https://apkpure.com/pydroid-3-ide-for-python-3/ru.iiec.pydroid3

  • Full-featured Terminal Emulator, with a readline support (available in pip).
  • Built-in C, C++ and even Fortran compiler designed specially for Pydroid 3. It lets Pydroid 3 build any library from pip, even if it is using native code. You can also build & install dependencies from a command line.

I have Debian running in Termux on my Android phone and just confirmed I can apt install gfortran and compile and run a program with it.

1 Like

It seems that my knowledge is outdated. :face_with_open_eyes_and_hand_over_mouth: Nonetheless, all of this functions in an emulated ecosystem.

Is it emulated? I thought that termux is just a terminal emulator and letting us run what we install on the device CPU. I’m not sure, it’s just what I thought. Everything that gets installed is the arm64 versions.

There is no gfortran release for Android. Instead, you can install Debian via Termux in an isolated environment. I experimented with Termux but encountered difficulties accessing my actual storage. Well, perhaps I am mistaken. :thinking:

It’s somewhat akin to asking for the availability of a program on Windows and receiving advice on a forum to install Linux in a virtual machine – there’s always a workaround… In the case of Android, it’s simpler because it’s built on the Linux kernel which can be shared. However, to my outdated knowledge, there are no Fortran compilers specifically designed for Android. The workaround involves installing a Linux distribution, such as Debian, in an isolated environment and then installing gfortran on it. While you can certainly compile programs, the question remains: can a program compiled inside Termux access and process files, such as pictures, stored on your device outside of the Termux environment?

GNU Fortran is available for Android. Android apps like Termux provide terminal emulator, package manager, and access to many Linux/Unix command-line utilities, including GCC.

Edit: Haven’t seen that @vmagnin posted a link already.

1 Like

“Thank you” to those who responded to my query whether there is a Fortran compiler that runs on Android. I, meanwhile, have come to understand that it is possible to run a C-compiler on Android. So that would seem to be the way forward. Paddy.

Where? It isn’t listed: GFortranDistros - GCC Wiki
I only found this: GitHub - buffer51/android-gfortran: Android NDK toolchains with Fortran support

Through Termux, tested it a couple of years ago on my last phone.

Certainly, Termux, not Android. It’s not an Android package but a Debian package. The program you compile in your isolated Termux environment might be limited in utility as it won’t have access to the storage of your Android device; instead, it operates within a fictional catalog structure.

Piotr, thank you for your recent information. I think I will have a go at working in C on a tablet. (Both C and Fortran are my current languages.) I shall first need to sort out which tablet, cost / benefit wise, would be the best to go for. Paddy.

It’s a terminal emulator. To access the outer world of your Android system, it has to be rooted, of course, but that’s an Android limitation.

(Re Intercosmos) Thank you: every bit of information is gratefully received, since it will save me from wasting my time searching around for the bits and pieces. Paddy

I have written satisfactory programs in both C and Fortran, but I keep on the surface of it all, so what do you mean by that it has to be routed? Could you please explain a little? Paddy

The security concept of Android doesn’t allow it for apps like Termux to access the whole file system, or to make specific system calls. You have to “root” your device first to circumvent these security features (see Wikipedia).

1 Like

We offer a web-based Fortran compiler solution that is specifically designed to support tablets. It does require a network connection and it is a paid service, though. The compiler is hosted on a server, but everything else is local.

I apologize for the shameless plug.

1 Like

According to Termux Github page it either does not work or works with serious issues on Android >= 10, so it is probably not an option for newer devices. I tried to install it on my Android 13 tablet (to get remote X11 apps displayed via termux-x11 extension), to no success.

Edit: Haven’t seen that @vmagnin posted a link already.
[/quote]

@vmagnin’s link does not seem to work (Server not found)

1 Like