termux-packages icon indicating copy to clipboard operation
termux-packages copied to clipboard

[Package]: tinygo

Open j0hnd3v opened this issue 2 years ago • 6 comments

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

Additional information

No response

j0hnd3v avatar Jan 29 '22 20:01 j0hnd3v

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.

wasmasmr avatar Jun 24 '22 22:06 wasmasmr

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.

wasmasmr avatar Jul 11 '22 14:07 wasmasmr

Perhaps ELF section .note.go.buildid was stripped in your binary.

sylirre avatar Jul 11 '22 15:07 sylirre

Thanks for your response, but that wasn't the issue because filecould 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.

wasmasmr avatar Jul 11 '22 17:07 wasmasmr

Is there no progress yet?

sohaha avatar Feb 12 '23 18:02 sohaha

I will give a try now that https://github.com/tinygo-org/tinygo/pull/3064 is merged

truboxl avatar Feb 15 '23 22:02 truboxl