DNS name resolution fails on android
Context
The arm64 binary of bee can be run on android without any dependencies. However there is an error when starting bee, because it is not able to join to the swap-endpoint by name. The error seems to be that the DNS name resolution fails.
As a workaround we built a javascript proxy and run it on localhost and use the localhost address as a swap-endpoint, but it would be better if swarm would just run natively on android without problems.
can you try to change this in the makefile:
build: CGO_ENABLED=0 to build: CGO_ENABLED=1?
@agazso would be possible to add more information about the hardware and OS? E.g.: was this tested on an emulator or real hardware (if so, what phone), what android version was used, etc...
can you try to change this in the makefile:
build: CGO_ENABLED=0tobuild: CGO_ENABLED=1?
I did not build for myself but I downloaded this binary: https://github.com/ethersphere/bee/releases/download/v1.6.1/bee-linux-arm64
I may try to build it later, but first I guess I will need to update the Go toolchain and it is not so fun on android :)
@agazso would be possible to add more information about the hardware and OS? E.g.: was this tested on an emulator or real hardware (if so, what phone), what android version was used, etc...
It was a real phone, Xiaomi Redmi 4X, running Android 9 and running Bee in Termux.
It seems that this is a known issue, I found this with a quick search: https://github.com/golang/go/issues/8877 Also: https://github.com/klingtnet/golang-android-dns-problem
I guess @acud also found these, because his suggestion is similar to what others suggest in the linked issue (e.g. CGO_ENABLED=1)
I guess @acud also found these
Actually I haven't, but it is known that when compiling with CGO, some other DNS resolver gets dynamically linked :shrug: So it seemed like a possible workaround.
some interesting info here... https://honnef.co/posts/2015/06/statically_compiled_go_programs__always__even_with_cgo__using_musl/
We have no plans to support android in the near future. issue will be kept closed.