ECL build and SHELL variable.

Tigran Aivazian aivazian.tigran at
Tue Sep 27 09:13:43 UTC 2016

UDPATE: I've replaced all occurrences of "/bin/sh" in ECL with
"/data/data/com.termux/files/usr/bin/bash" and recompiled it. Now
plotting works fine in Maxima 5.38.1. So, to summarise, I have a fully
working ECL 16.1.2 + Maxima 5.38.1 on armv7l in Termux running on
Android 5.1.1. I will now try to compile all this stuff on aarch64
architecture on Android 6.0.1 (also inside Termux). This will give us
a text-based ("terminal") version of Maxima on pocket devices like
mobiles and tablets (for those who prefer Linux terminal to GUI :)

On 27 September 2016 at 07:10, Tigran Aivazian
<aivazian.tigran at> wrote:
> Dear Yasuaki,
> I have some good news --- I have successfully compiled ECL 16.1.2 under
> Termux environment and then successfully compiled MAxima 5.38.1 based on it.
> This is Android 5.1.1 running on Nexus 10 tablet, i.e. armv7l architecture.
> I intend to also compile it on Android 6.0.1 on aarch64 architecture. I had
> to make a few changes to ECL which I will have to submit to the maintainer
> at some point.
> Now, everything (except the bits you noticed, like fib() etc which are
> worked around in your init.lisp file) works fine except the system()
> function (and invoking gnuplot which uses the same mechanism).
> I used strace to track it down to the fact that even though Maxima was
> compiled with "--posix-shell=/data/data/com.termux/files/usr/bin/bash",
> still the plot2d() command causes execve() with hardcoded path "/bin/sh". I
> have made sure that there are NO hardcoded instances of "/bin/sh" left in
> Maxima, BUT it still happens.
> This means it is coming from ECL and I see hardcoded "/bin/sh" here:
> $ strings /usr/local/lib/ecl-16.1.2/defsystem.fas | fgrep --color "/bin/sh"
> So I suspect it is coming from defsystem.fas. Now, you must have faced the
> same issue when you compiled ECL 12.12.1 for use by Maxima 5.36.1 on
> Android. But your sources on github don't contain any patches to ECL, so I
> am writing to you to ask how you overcame this issue (because running your
> maxima.pie binary in Termux works fine, but I wanted to have Maxima 5.38.1
> and so I had to recompile everything from sources).
> I will dig into ECL sources today trying to find this hardcoded "/bin/sh"
> (it should really rely on the value of SHELL variable) but if you know the
> answer it would save my time greatly. Thank you.
> Kind regards,
> Tigran

More information about the ecl-devel mailing list