Feasibility of Compiling ArbLib for Android

38 views
Skip to first unread message

Stephen Crowley

unread,
Nov 6, 2023, 3:39:24 PM11/6/23
to flint-devel

Dear Flint Development Community,

I am exploring the possibility of compiling ArbLib for the Android platform and would greatly appreciate insights from community members.

ArbLib relies on several dependencies, including GMP, MPFR, and FLINT itself. Through my research, I have found a GitHub repository containing a prebuilt GMP module compiled with the Android NDK r21 for API level 24 (Rupan/gmp). This seems to imply that GMP can be successfully compiled and used within an Android environment, albeit with some considerations for higher API levels due to dependencies on functions like localeconv().

However, while I found a file header from the Android source indicating MPFR might be used within some Android toolchains, specific instructions or a prebuilt MPFR library for Android were not located. As for MPIR, although there is no direct information about Android compilation, its close relation to GMP suggests that it might also be adapted for Android using similar methods.

FLINT's build process typically requires GMP or MPIR and MPFR, and it supports building with GNU Make and GNU Autotools or CMake. The latter is particularly promising since CMake is supported by the Android NDK, which could potentially facilitate cross-compiling for Android.

With the above in mind, I am reaching out to ask:

  1. Has anyone in the community attempted or successfully compiled ArbLib, or its dependencies, for Android?
  2. Are there known challenges or limitations that I should be aware of, based on your experience?
  3. Any guidance or recommendations for proceeding with such an endeavor would be highly valuable.

Thanks in advance.

Best regards,

Stephen

Oscar Benjamin

unread,
Nov 6, 2023, 4:34:53 PM11/6/23
to flint...@googlegroups.com
Hi Stephen,

I don't have any experience building any of this for Android but
Android is basically Linux on ARM so I would have thought that it
should all be possible. I don't have much helpful to say about that
but what I can say is that Arb is now part of Flint as of recently
released Flint 3. Also I would use GMP rather than MPIR (MPIR is
almost unmaintained now).

So the libraries you need to build are GMP, MPFR and Flint.

Oscar
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "flint-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to flint-devel...@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/flint-devel/97d94b5d-837b-4e4b-bc1b-f1338b7b9f38n%40googlegroups.com.

Jeffrey Sarnoff

unread,
Nov 6, 2023, 4:51:08 PM11/6/23
to flint...@googlegroups.com
The whole is not tiny: arb, flint, antic, calcium are subparts of the newly released v3.
That said, let me know how much memory the Android device should have free.

Stephen Crowley

unread,
Nov 6, 2023, 4:53:05 PM11/6/23
to flint...@googlegroups.com

are antic and calcium able to be disabled?

Not sure what the second question  means, but surely not the obvious reading. The android device should have free the total minus the allocated...


--Stephen

You received this message because you are subscribed to a topic in the Google Groups "flint-devel" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/flint-devel/JtoVUeiljGQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to flint-devel...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/flint-devel/CAM96OoKh2DM9aUmrGC6R%2B3Bmmb2AMhMzcmZsKzDkMQN-3QpsjQ%40mail.gmail.com.

Jeffrey Sarnoff

unread,
Nov 6, 2023, 5:42:35 PM11/6/23
to flint...@googlegroups.com
I was wondering about the memory imprint of Flint 3, and the runtime expectations that Arb would want when running programs that use ball arithmetic, and complex higher functions at say 1k..2k bits of precision.

Stephen Crowley

unread,
Nov 6, 2023, 5:48:45 PM11/6/23
to flint...@googlegroups.com
I can't imagine that it'll be a problem. I mean.. possibly for some of the massive unit test but I doubt it. It is expected that Android devices  have at least 8 GB now

Stephen Crowley

unread,
Nov 6, 2023, 5:51:21 PM11/6/23
to flint...@googlegroups.com
Arb does not have expectations since it is a library and not even close to a particular anthropomorphization of a sufficiently advanced system that could be said to have expectations in some appropriate anthropomorphic sense.

And compiling Flint for Android is really completely independent of any particular programs that one would want to run on an Android system that would depend upon Flint so their memory requirements are a moot point with regards to this


Reply all
Reply to author
Forward
0 new messages