Re: Has anyone tried compiling vile in termux?

2021-07-29 Thread Thomas Dickey
On Thu, Jul 29, 2021 at 04:17:43PM +0100, Chris Green wrote:
> On Thu, Jul 29, 2021 at 04:04:38PM +0100, Chris Green wrote:
> > u0_a166@bison$ ./vile
> > Bad system call
> > 
> OK, a quick web search has found a solution, it runs OK in a chroot
> environment:-
> 
> u0_a166@bison$ termux-chroot ./vile
> 
> I think I now need to rearrange things a bit so I always run termux in
> a termux-root[ed] enviroment.
> 
> But anyway that was actually remarkably painless, not a single missing
> library and the fixes needed were fairly trivial.  I'm now even more
> impressed with both termux and vile! :-)

sounds good. I recall some older discussion which said that Android
only provided some Java emulation of the command-line - either that
was mistaken, or termux is newer.

just as a sanity-check, searching on "termux ncurses" shows that the
latter works - which means that vile ought to (since it uses similar
system features).

-- 
Thomas E. Dickey 
https://invisible-island.net
ftp://ftp.invisible-island.net


signature.asc
Description: PGP signature


Re: Has anyone tried compiling vile in termux?

2021-07-29 Thread Chris Green
On Thu, Jul 29, 2021 at 01:56:45PM -0400, Paul Fox wrote:
> chris wrote:
>  > I run termux on my phone so I can access my home Linux system's
>  > command line to read E-Mail, Usenet etc.  My home system runs as an
>  > always on server and gets mail delivered to a traditional mail spool
>  > by Postfix and also runs 'leafnode' a small NNTP server.  Thus I am
>  > totally independent of gmail or anything like that.
>  > 
>  > I normally use my laptop to ssh to my home system to read E-Mail and
>  > Usenet, Termux on Android just gives me a smaller, lighter way to do
>  > the same if I don't have my laptop with me.
> 
> How is that experience different than, say, using an ssh client (I use
> JuiceSSH) to connect to your home system?  (And I connect using mosh,
> so the connection tends to stay up for days, if not weeks.)
> 
It's just a much more complete 'Linux like' system to run from, I can
run the same .profile, .bashrc etc. so it just feels very familiar.
It even runs syncthng so I can synchronise files between my home
system, the laptop and my Android phone.  I have my address
database synchronised across the systems and I can find addresses from
the command line on the 'phone.  Also I have a little collection of
encrypted files which are synchronised so I can access them locally.


> (I think I was expecting you to describe using termux to navigate
> the android filesystem, so you could use vile to edit config files and
> ImageMagick to manipulate your photos.)
> 
You can do very little like this, the phone isn't rooted and so Termux
is in a pretty tight sandbox like other Android apps.

-- 
Chris Green



Re: Has anyone tried compiling vile in termux?

2021-07-29 Thread Paul Fox
chris wrote:
 > I run termux on my phone so I can access my home Linux system's
 > command line to read E-Mail, Usenet etc.  My home system runs as an
 > always on server and gets mail delivered to a traditional mail spool
 > by Postfix and also runs 'leafnode' a small NNTP server.  Thus I am
 > totally independent of gmail or anything like that.
 > 
 > I normally use my laptop to ssh to my home system to read E-Mail and
 > Usenet, Termux on Android just gives me a smaller, lighter way to do
 > the same if I don't have my laptop with me.

How is that experience different than, say, using an ssh client (I use
JuiceSSH) to connect to your home system?  (And I connect using mosh,
so the connection tends to stay up for days, if not weeks.)

(I think I was expecting you to describe using termux to navigate
the android filesystem, so you could use vile to edit config files and
ImageMagick to manipulate your photos.)

paul
=--
paul fox, p...@foxharp.boston.ma.us (arlington, ma, where it's 68.2 degrees)




Re: Has anyone tried compiling vile in termux?

2021-07-29 Thread Chris Green
On Thu, Jul 29, 2021 at 11:21:15AM -0400, Paul Fox wrote:
> chris wrote:
>  > On Thu, Jul 29, 2021 at 04:04:38PM +0100, Chris Green wrote:
>  > > u0_a166@bison$ ./vile
>  > > Bad system call
>  > > 
>  > OK, a quick web search has found a solution, it runs OK in a chroot
>  > environment:-
>  > 
>  > u0_a166@bison$ termux-chroot ./vile
>  > 
>  > I think I now need to rearrange things a bit so I always run termux in
>  > a termux-root[ed] enviroment.
>  > 
>  > But anyway that was actually remarkably painless, not a single missing
>  > library and the fixes needed were fairly trivial.  I'm now even more
>  > impressed with both termux and vile! :-)
>  > 
>  > 
>  > Sorry for all the noise!
> 
> Don't apologize!  Just about anything vile related is nice to
> hear about.  :-)  Especially if it means it's running in some new
> oddball environment.  I hadn't heard of termux before, so your
> monologue was worth it for that, even if for nothing else!  ;-)
> 
> (I'm not quite sure what I'd _use_ termux for, but perhaps I'm not
> being imaginative enough.)
> 
Thanks for the kind words. :-)

I run termux on my phone so I can access my home Linux system's
command line to read E-Mail, Usenet etc.  My home system runs as an
always on server and gets mail delivered to a traditional mail spool
by Postfix and also runs 'leafnode' a small NNTP server.  Thus I am
totally independent of gmail or anything like that.

I normally use my laptop to ssh to my home system to read E-Mail and
Usenet, Termux on Android just gives me a smaller, lighter way to do
the same if I don't have my laptop with me.

-- 
Chris Green



Re: Has anyone tried compiling vile in termux?

2021-07-29 Thread Paul Fox
chris wrote:
 > On Thu, Jul 29, 2021 at 04:04:38PM +0100, Chris Green wrote:
 > > u0_a166@bison$ ./vile
 > > Bad system call
 > > 
 > OK, a quick web search has found a solution, it runs OK in a chroot
 > environment:-
 > 
 > u0_a166@bison$ termux-chroot ./vile
 > 
 > I think I now need to rearrange things a bit so I always run termux in
 > a termux-root[ed] enviroment.
 > 
 > But anyway that was actually remarkably painless, not a single missing
 > library and the fixes needed were fairly trivial.  I'm now even more
 > impressed with both termux and vile! :-)
 > 
 > 
 > Sorry for all the noise!

Don't apologize!  Just about anything vile related is nice to
hear about.  :-)  Especially if it means it's running in some new
oddball environment.  I hadn't heard of termux before, so your
monologue was worth it for that, even if for nothing else!  ;-)

(I'm not quite sure what I'd _use_ termux for, but perhaps I'm not
being imaginative enough.)

paul
=--
paul fox, p...@foxharp.boston.ma.us (arlington, ma, where it's 67.6 degrees)




Re: Has anyone tried compiling vile in termux?

2021-07-29 Thread Chris Green
On Thu, Jul 29, 2021 at 04:04:38PM +0100, Chris Green wrote:
> u0_a166@bison$ ./vile
> Bad system call
> 
OK, a quick web search has found a solution, it runs OK in a chroot
environment:-

u0_a166@bison$ termux-chroot ./vile

I think I now need to rearrange things a bit so I always run termux in
a termux-root[ed] enviroment.

But anyway that was actually remarkably painless, not a single missing
library and the fixes needed were fairly trivial.  I'm now even more
impressed with both termux and vile! :-)


Sorry for all the noise!

-- 
Chris Green



Re: Has anyone tried compiling vile in termux?

2021-07-29 Thread Chris Green
On Thu, Jul 29, 2021 at 03:41:42PM +0100, Chris Green wrote:
[snip my ramblings]
> 
> So what is my 'build type'?
> 
> Aha, a bit of searching suggests that:-
> 
> ./configure --build=aarch64-unknown-linux-gnu
> 
> should work, it seems to be so far!
> 
It all apparently works, the .configure as above completes with no
errors and 'make prefix=~/local install' completes with only the
expected errors - as follows:-

...
...
mv vile ovile
mv: cannot stat 'vile': No such file or directory
make: [makefile:341: vile] Error 1 (ignored)
gcc -g -O2  -g -O2   -o vile tcap.o main.o basic.o bind.o blist.o buffer.o 
csrch.o display.o dumbterm.o eval.o exec.o externs.o fences.o file.o filec.o 
fileio.o finderr.o glob.o globals.o input.o insert.o itbuff.o lckfiles.o line.o 
map.o modes.o msgs.o nullterm.o oneliner.o opers.o path.o random.o regexp.o 
region.o search.o tags.o tbuff.o termio.o undo.o version.o vl_ctype.o watch.o 
window.o word.o wordmov.o  api.o btree.o history.o isearch.o select.o 
statevar.o ucrypt.o xterm.o npopen.o spawn.o charsets.o eightbit.o wcwidth.o   
-liconv  -lcrypt -lcurses
** installing vile
/data/data/com.termux/files/usr/bin/install -c vile 
/data/data/com.termux/files/home/local/bin/`echo vile|sed 's,x,x,'`
/bin/sh -c "if test NONE != NONE ; then \
cd /data/data/com.termux/files/home/local/bin ; \
rm -f NONE ; \
ln -s `echo vile|sed 's,x,x,'` NONE ; \
echo '... created symbolic link:' ; \
ls -l `echo vile|sed 's,x,x,'` NONE ; \
fi"
** installing vile-pager
sed -e 's/=vile$/='`echo vile|sed 's,x,x,'`'/' ./macros/vile-pager 
>/data/data/com.termux/files/home/local/bin/`echo vile|sed 's,x,x,'`-pager
chmod 755 /data/data/com.termux/files/home/local/bin/`echo vile|sed 
's,x,x,'`-pager
/bin/sh -c "if test NONE != NONE ; then \
cd /data/data/com.termux/files/home/local/bin; \
rm -f NONE-pager ; \
ln -s `echo vile|sed 's,x,x,'`-pager NONE-pager ; \
echo '... created symbolic link:' ; \
ls -l `echo vile|sed 's,x,x,'`-pager NONE-pager ; \
fi"
Completed install of program.
/data/data/com.termux/files/usr/bin/install -c -m 644   ./vile.1 
/data/data/com.termux/files/home/local/man/man1/vile.1
u0_a166@bison$ cd local
/data/data/com.termux/files/home/local
u0_a166@bison$ ls
bin  lib  man  share
u0_a166@bison$ cd bin
/data/data/com.termux/files/home/local/bin
u0_a166@bison$ ls
vile  vile-pager
u0_a166@bison$ ./vile
Bad system call


Unfortunately, as you can see, it doesn't run.  It just says "Bad system call". 
Does anyone
have any suggestions as to what might be wrong?

It's compiled the right sort of executable:-

u0_a166@bison$ cd /data/data/com.termux/files/usr/bin
/data/data/com.termux/files/usr/bin
u0_a166@bison$ file ls
ls: symbolic link to coreutils
u0_a166@bison$ file coreutils
coreutils: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), 
dynamically linked, interpreter /system/bin/linker64, stripped
u0_a166@bison$ cd local/bin
/data/data/com.termux/files/home/local/bin
u0_a166@bison$ file vile
vile: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), 
dynamically linked, interpreter /system/bin/linker64, with debug_info, not 
stripped


Does it just mean that there's a missing dependency that ./configure and make 
haven't
noticed?

-- 
Chris Green



Re: Has anyone tried compiling vile in termux?

2021-07-29 Thread Chris Green
On Thu, Jul 29, 2021 at 03:26:06PM +0100, Chris Green wrote:
> Has anyone tried building vile under termux?  It has a cc, make, etc. :-
> 
> u0_a166@bison$ which cc
> /data/data/com.termux/files/usr/bin/cc
> u0_a166@bison$ cc --version
> clang version 12.0.0
> Target: aarch64-unknown-linux-android24
> Thread model: posix
> InstalledDir: /data/data/com.termux/files/usr/bin
> u0_a166@bison$ which make
> /data/data/com.termux/files/usr/bin/make
> u0_a166@bison$ make --version
> GNU Make 4.3
> Built for aarch64-unknown-linux-android
> Copyright (C) 1988-2020 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> 
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
> 
> A web search hasn't revealed anything, maybe I'll try myself (it's a
> *long* time since I built vile!).
> 
OK, first hurdle failure:-

u0_a166@bison$ ./configure
checking build system type... ./config.guess: unable to guess system type

This script, last modified 2009-12-30, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from

  
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
and
  
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD

If the version you run (./config.guess) is already up to date, please
send the following data and any information you think might be
pertinent to  in order to provide the needed
information to handle your system.

config.guess timestamp = 2009-12-30

uname -m = aarch64
uname -r = 4.14.186
uname -s = Linux
uname -v = #1 SMP PREEMPT Mon Jun 21 19:56:08 CST 2021

/usr/bin/uname -p = unknown
/bin/uname -X = 

hostinfo   = 
/bin/universe  = 
/usr/bin/arch -k   = 
/bin/arch  = 
/usr/bin/oslevel   = 
/usr/convex/getsysinfo = 

UNAME_MACHINE = aarch64
UNAME_RELEASE = 4.14.186
UNAME_SYSTEM  = Linux
UNAME_VERSION = #1 SMP PREEMPT Mon Jun 21 19:56:08 CST 2021
configure: error: cannot guess build type; you must specify one
u0_a166@bison$ 

So what is my 'build type'?

Aha, a bit of searching suggests that:-

./configure --build=aarch64-unknown-linux-gnu

should work, it seems to be so far!


-- 
Chris Green