which had the solution to this particular issue! Yay \o/! Needed to call
unset LD_PRELOAD
I'm noticing that the arm builds are missing now (current 403s, autobuild 404s), but maybe that's intentional for now? Either way, I have gotten past the bad system call issue with runshell, but now when I try to run git annex webapp I get...
fatal: 'annex' appears to be a git command, but we were not able to execute it. Maybe you need to 'pkg install perl'?
I ran pkg install perl, but I get the same message :(. Either way, I'm glad this seems to be moving forward, and very excited that I might finally be able to put git-annex back on my phone after all these years!
We now have a workaround that seems to work, pkg install proot and use
proot to run git-annex. Tomorrrow's daily build of the git-annex standalone
bundle will do that automatically.
Are the instructions complete/correct? I get an error when following them and trying to execute runshell. Seems to be looking in the wrong place for /bin/sh.
$ git-annex.linux/runshell
proot-error: execve("/data/data/com.termux/files/home/git-annex.linux/bin/sh"): No such file or directory
@CandyAngel git-annex.linux/bin/sh is included in the bundle.
If proot cannot run it, it seems likely that you have downloaded a build of
git-annex that does not match the CPU architecure of your Android device.
While most Android devices are arm, some use intel or mips..
I'm experiencing the same issue as CandyAngel on an arm64 tablet (which should be able to execute regular arm code).
Tracing down from the error message:
$ ./git-annex.linux/runshell
proot error: execve("/data/data/com.termux/files/home/git-annex.linux/bin/sh"): No such file or directory
[...]
$ head -n1 /data/data/com.termux/files/home/git-annex.linux/bin/sh
#!/bin/sh
$ which sh
/data/data/com.termux/files/usr/bin/sh
So it might just be that the different environments disagree which sh is now executable. For contrast, trying a bash (which is not in /bin/):
$ ./git-annex.linux/runshell bash
bash-4.4$ git-annex
bash: /data/data/com.termux/files/home/git-annex.linux/bin/git-annex: /bin/sh: bad interpreter: No such file or directory
At first glance this does sound like "Mh, we can't execute 32bit binaries her", but look:
bash-4.4$ ./git-annex.linux/lib/ld-linux.so.3 # that's what exe/sh is symliked to
Segmentation fault
$ exit # now we're out of the runshell again
$ /git-annex.linux/lib/ld-linux.so.3
Usage: ld.so [OPTION]... EXECUTABLE-FILE [...]
Something in the environment is breaking things. My current stage of drilling is that I can run the variables-expanded version of tar
successfully from the outside but not from within runshell. Will update when I've found more.
Setting all the environment variables from inside still did not break the tar execution; last resort was disabling proot in runshell. I still had to keep the termux-fix-shebang workaround.
$ ./git-annex.linux/runshell
$ mkdir test; cd test
$ git init
$ git annex init
From a first glance, things appear to be working now. I had to run termux-fix-shebang on the .git/hooks/* and set TMPDIR=something-that-actually-exists, but short of that, local adding and committing as well as moving data around.
Joey, you mentioned ghc runtime issues when introducing proot. Anything particular I should test?
Probably should have given some platform details to my findings that proot is counter-productive on my device: I'm running LineageOS 14.1-20180206-NIGHTLY-gts210vewifi (LineageOS API level 7, Android 7.1.2, Kernel 3.10.102) on a Samsung SM-T813 (arm64).
I didn't explicitly mention it in my last comment (only in the issue I linked to), but I had already applied the termux-fix-shebang fix. Whilst this helps resolve the other issue, it does not help with the fact that ./git-annex.linux/lib/ld-linux.so.3 is a 32-bit binary which crashes with a segfault (SIG11) when run via runshell.
So this is still broken for me Has anyone else had better luck on aarch64 (ARM v8) ?
Well, I see the signal 11 too, on my arm64 phone running LineageOS Android 8.1.
Some others had earlier reported it worked on arm64, but perhaps newer
versions of Android don't or whatever.
(I also had to run termux-fix-shebang as described above.)
I do not yet have an arm64 autobuilder running, todo for that is
?arm64 autobuilder -- if anyone has an arm64 machine that could run
the autobuilder, that would help!
This line causes termux to say "Bad System Call"
git-annex.linux/runshell
It also first complained about /bin/sh being missing, but stopped after restarting termux.
@hobbes we're working on that issue, which seems likely to involve arm64, here: https://github.com/termux/termux-packages/issues/420
Found this issue thread:
https://github.com/termux/termux-packages/issues/420
which had the solution to this particular issue! Yay \o/! Needed to call
I'm noticing that the arm builds are missing now (current 403s, autobuild 404s), but maybe that's intentional for now? Either way, I have gotten past the bad system call issue with
runshell
, but now when I try to rungit annex webapp
I get...I ran
pkg install perl
, but I get the same message :(. Either way, I'm glad this seems to be moving forward, and very excited that I might finally be able to put git-annex back on my phone after all these years!@hobbes, that error means Android's system call filter has blocked a system call that's needed to run git-annex, unfortunately.
We now have a workaround that seems to work,
pkg install proot
and use proot to run git-annex. Tomorrrow's daily build of the git-annex standalone bundle will do that automatically.Are the instructions complete/correct? I get an error when following them and trying to execute runshell. Seems to be looking in the wrong place for /bin/sh.
@CandyAngel git-annex.linux/bin/sh is included in the bundle. If proot cannot run it, it seems likely that you have downloaded a build of git-annex that does not match the CPU architecure of your Android device. While most Android devices are arm, some use intel or mips..
I'm experiencing the same issue as CandyAngel on an arm64 tablet (which should be able to execute regular arm code).
Tracing down from the error message:
So it might just be that the different environments disagree which sh is now executable. For contrast, trying a bash (which is not in /bin/):
Ok, /bin/sh is obviously bad influence here.
At first glance this does sound like "Mh, we can't execute 32bit binaries her", but look:
Something in the environment is breaking things. My current stage of drilling is that I can run the variables-expanded version of tar
successfully from the outside but not from within runshell. Will update when I've found more.
Setting all the environment variables from inside still did not break the tar execution; last resort was disabling proot in runshell. I still had to keep the termux-fix-shebang workaround.
From a first glance, things appear to be working now. I had to run termux-fix-shebang on the
.git/hooks/*
and set TMPDIR=something-that-actually-exists, but short of that, local adding and committing as well as moving data around.Joey, you mentioned ghc runtime issues when introducing proot. Anything particular I should test?
I followed the instruction to install git-annex on my Lenovo Vibe K4 running Android 6
At first I got the error
/bin/sh/ is missing
, which I worked around with termux-fix-shebang on runshell. Now I am getting this error.proot info: vpid 1: terminated with signal 11
Please advice.
I copied and pasted the instructions, here is my output:
https://pastebin.com/ZVJ7uSeU
Almoços for including my entire session, the relevant error is at the bottom.
I'm fairly certain this device has ARM64 arch.
As I mentioned in Package request: git-annex · Issue #420 · termux/termux-packages just now, I also get:
Some further digging suggests that this is due to the architecture mismatch between my OnePlus 5T which is aarch64, and the linker which is 32-bit:
Running
actually seems to have fixed my installation.
runshell
andwebapp
both execute now, with webapp bringing up the browser.I didn't explicitly mention it in my last comment (only in the issue I linked to), but I had already applied the
termux-fix-shebang
fix. Whilst this helps resolve the other issue, it does not help with the fact that./git-annex.linux/lib/ld-linux.so.3
is a 32-bit binary which crashes with a segfault (SIG11) when run viarunshell
.So this is still broken for me Has anyone else had better luck on aarch64 (ARM v8) ?
@Teyras, I think this would be possible, but you'd have to get gpg and git-remote-gcrypt installed and working in that environment.
Well, I see the signal 11 too, on my arm64 phone running LineageOS Android 8.1. Some others had earlier reported it worked on arm64, but perhaps newer versions of Android don't or whatever.
I made a test arm64 build, and it does work. Get it here: https://tmp.joeyh.name/git-annex-arm64-test-build/
(I also had to run termux-fix-shebang as described above.)
I do not yet have an arm64 autobuilder running, todo for that is ?arm64 autobuilder -- if anyone has an arm64 machine that could run the autobuilder, that would help!
termux-fix-shebang git-annex.linux/bin/*
this new build works!