4tH on Android 5.0.2

58 views
Skip to first unread message

David Meyer

unread,
Jun 26, 2019, 6:41:19 PM6/26/19
to 4tH-compiler
I wanted to set up 4tH on my old Android 5.0.2 tablet (NEC Lavie Tab E TE508) (unrooted), but the binary files in the 4tH 3.62.5 Android package wouldn't run, giving the error, 

     error: only position independent executables (PIE) are supported.

The same problem occurred with both Android Terminal Emulator (now renamed Terminal Emulator for Android) and my preferred Termux.

However, building the binaries with clang in Termux was fairly straightforward (man page installation failed, but I haven't installed man in Termux anyway), so now I have 4tH up and running!

thebeez

unread,
Jun 30, 2019, 7:15:29 AM6/30/19
to 4th-co...@googlegroups.com
Well, I've always though that due to the speed of developments in
Android, this would at best be a temporary solution. I've also used a
quite dated X-compiler, so that may have contributed to the end of the
fun. Strange though, that even stuff from the Playstore (ATE) isn't
working anymore..

Anyways, thank you for solving this problem, David! May I call upon you
when a new release is due?

BTW, if you develop anything interesting, note we're always looking for
user contributions!

Nice work and thank you! I'm terribly sorry for responding this late,
but I've spend some time lately on v3.63.0 ;-) That's my only excuse!

Hans Bezemer

David Meyer

unread,
Jun 30, 2019, 10:19:53 AM6/30/19
to 4tH-compiler
I have not done any Android app development, but it seems like a constantly moving target.

Would the executables I built be useful to anyone else?

Feel free to contact me if you want someone to test the new release on Android.


Ron K. Jeffries

unread,
Jun 30, 2019, 11:49:44 AM6/30/19
to 4th-co...@googlegroups.com
Android 5 is pretty old. Any chance we might look forward to 4Th running on current (MUCH improved) Android?

Semi-unrelated: the new Raspberry Pi 4 is a really impressive machine, only $55 for a 4 GB ram with a great complement of i/o ports. Raspian is well supported LInux based in Debian.

Will it be a supported 4Th platform? It sells in the multiple millions of units.😎

Ron K Jeffries

--
You received this message because you are subscribed to the Google Groups "4tH-compiler" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 4th-compiler...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/4th-compiler/10db67c4-18ef-413b-a55a-6bb040361648%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Meyer

unread,
Jun 30, 2019, 6:25:50 PM6/30/19
to 4tH-compiler
I just checked that I can also build 4tH from 4th-3.62.5-unix.tar.gz on my Android 7.0 smartphone.

1. Install and run the terminal emulator app Termux.
2. Install the Termux packages lynx (or something else for downloading the source tar ball), clang, and make.
3. Customize variables LIBRARIES, INCLUDES, BINARIES (should be a directory in your PATH) in sources/Makefile for your installation. I replaced /usr and /usr/local with ${HOME} (won't work without the brackets) (You don't need to customize MANDIR and DOCDIR because we're not going to install documentation).
4. In the sources directory, run  `make mostlyinstall`.

You should be able to run `4th` and continue set-up as described in the 4tH Manual.

thebeez

unread,
Jul 1, 2019, 3:24:30 AM7/1/19
to 4th-co...@googlegroups.com
Hi David!

This is a GREAT tip! I've always got problems to install cross-compilers
for all these environments (they're called "cross" compiler for a
reason, because that's what they make people) and then still I got to
have some kind of (emulated) environment to test the bunch. So each time
I can do a compile native, it's a win for me.

Yes, there is a relentless stream of "can you have a version for .." and
yes, I'm willing but I can't buy all these devices just for a simple
compile. I'd love to have more user-provided ports - but then again,
there have to be people who provide them.

Or provide great tips like this allowing me to make these ports
possible. ;-)

BTW, I'm not surprised you can get a viable port with generic source.
The tricky stuff is BSD, MS stuff, etc. These require conditional
compilation. From a developer point of view Android is just another
Linux.

Hans Bezemer

thebeez

unread,
Jul 1, 2019, 3:26:19 AM7/1/19
to 4th-co...@googlegroups.com
On 2019-06-30 17:49, Ron K. Jeffries wrote:
> Android 5 is pretty old. Any chance we might look forward to 4Th
> running on
> current (MUCH improved) Android?
>
> Semi-unrelated: the new Raspberry Pi 4 is a really impressive machine,
> only
> $55 for a 4 GB ram with a great complement of i/o ports. Raspian is
> well
> supported LInux based in Debian.
>
> Will it be a supported 4Th platform? It sells in the multiple millions
> of
> units.😎
>
> Ron K Jeffries
Hi Ron,

I've never seen a Linux that didn't compile 4tH, so yes, in that way it
will be supported. If someone makes a binary, I'm willing to distribute
it.

Hans Bezemer
Reply all
Reply to author
Forward
0 new messages