Closed gbraad closed 1 month ago
Cross-compile issues:
$ GOOS=android GOARCH=arm64 CGO_ENABLED=1 CC=/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android30-clang ./tool/go install tailscale.com/cmd/tailscaled
# runtime/cgo
gcc_android.c:6:10: fatal error: android/log.h: No such file or directory
6 | #include <android/log.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
Seems someone had already attempted this:
@Asutorufa I hope you can give some pointers on how you compiled this. So far I have tried a cross-compile, but ended up with errors
It need android ndk, you can see:
You can also get it from my android apk, just decompress it, github actions https://github.com/Asutorufa/tailscaled-socks5-android/actions/runs/10776956015
Thanks! Seems we have similar 'interests'. I'll have a look as for some reason my NDK did not function as expected; android/log.h
missing... but in disk under sysroot.
What base platform did you use?
Ubuntu, as I tried. Will check this tomorrow in more detail.
My pc linux system is archlinux, it also no problem.
@Asutorufa compiling your https://github.com/Asutorufa/tailscale/commit/787d121bfab06133dcc0452098405dc2fdfb9198 worked as expected with make buildlinuxarm
for use with VScode/deVStudio and Userland. 👍
This is related to https://github.com/Dev-Environments/VScode/issues/63; for my Android 12 (Samsung Tab S6) tablet it is not possible to run
tailscaled
from the ubuntu-based userspace provided by VScode for Android. It does however work on Termux (download from f-droid). The issue seems to be related to howproc/net
is queried to get interface information.Might be possible to use: https://github.com/wlynxg/anet