termux-packages
termux-packages copied to clipboard
[Package]: tinygo
Package description
Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.
Home page URL
https://tinygo.org/
Source code URL
https://github.com/tinygo-org/tinygo
Packaging policy acknowledgement
- [X] I have read and understand the Packaging Policy.
Additional information
No response
I would also be interested in this. As mentioned here there are dynamically and statically linked build options available. The dynamically linked build currently links against LLVM 13 so either we would need to request it to be packaged for termux or provide a LLVM 14 patch for the tinygo package (the official sources don't support LLVM 14 yet for the dynamically linked build) which is the termux LLVM version.
The static build method should already support LLVM 14 so that would probably be the easiest approach at this time. I tried to build tinygo on my phone with this method but the build process is so heavy that my phone kept freezing up. The build system could handle it but maybe the dynamic method would be preferred after all because of the lower resource usage.
If someone has successfully built tinygo on termux I would be interested in hearing how they managed to pull it off.
Tinygo v0.24.0 supports linking against LLVM 14 so it can be installed in termux with go install
. However when I tried to build a simple test program with the resulting tinygo
executable I got this output: error: could not find build id in %!s(<nil>)
presumably caused by this line. tinygo version
successfully prints out the version.
Perhaps ELF section .note.go.buildid
was stripped in your binary.
Thanks for your response, but that wasn't the issue because file
could still print it. Adding "android"
to this line solved my initial error but gifted me with new never ending ones. I opened an issue here.
Is there no progress yet?
I will give a try now that https://github.com/tinygo-org/tinygo/pull/3064 is merged