tinygo-org / tinygo

Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.
https://tinygo.org
Other
15.33k stars 905 forks source link

Packaging #522

Closed niaow closed 4 years ago

niaow commented 5 years ago

Currently, installing and updating tinygo can be confusing for beginners and those not using common platforms. This is an umbrella issue for discussing ways to simplify the process of getting tinygo and its dependencies.

MatrixMike commented 5 years ago

I am sure we will get organised here. So a point would be: check that the Raspberry Pi go installation is the latest stable version. Currently, the apt-get install process produces version 1.7 but the minimum recommended version for tinygo is 1.11 .

prologic commented 5 years ago

Since tiny-go is written inGo itself can't we just also go get -u the latest version?

MatrixMike commented 5 years ago

I have just tried that on a Pi and also on my Linux desktop and receive the message package /home/mikeh: unrecognized import path "/home/mikeh" (import path does not begin with hostname) So I will investigate...

niaow commented 5 years ago

Even if this were go-gettable, you would still need to manually install all of the direct and indirect dependencies which are not go (LLVM, flashing tools, clang, etc.).

aykevl commented 5 years ago

Do you have specific things you'd like to see improved? We already have binary releases that are mostly a matter of extracting and running, and we have deb and homebrew installable versions of TinyGo. I think that gets us most of the way, although there are definitely ways to improve. For example, see #88.

Since tiny-go is written inGo itself can't we just also go get -u the latest version?

If you are running Debian/Ubuntu and have LLVM 8 installed, then yes, go get should work. Other than that, the LLVM dependency is pretty big and really has to be built separately (taking 60-90 minutes on many systems). We should use prebuilt binaries installed in the OS if they are available, but not all have them. Also, the Go 1.11 requirement is not likely to go away soon (unless there is a good reason) - you're better off just upgrading to the next Raspbian version.

deadprogram commented 5 years ago

Just wondering if there is something specific that is actionable here, or if individual GH issues with specific items might be better?

The latest release does have whatever pre-built binaries we can for TinyGo itself. As @aykevl said, LLVM does not have pre-built binaries for all platforms, and I think we are already using the one we are able to.

QuLogic commented 5 years ago

FWIW, tinygo is available on Fedora and can be installed as easily as any other package (sudo dnf install tinygo). It is not available on all arches, but perhaps soon.

The only thing missing is STM32 support, because the svd files are weirdly licensed. If anyone knows someone to ping to get that to better, I'd really like to enable it.

aykevl commented 5 years ago

No idea who to ping for stm32, except of course the people who originally added it to the cmsis-svd repository. Also, I don't know enough about licenses to say much substantial about it.

Is AVR support enabled in Fedora? Because LLVM has it disabled by default.

QuLogic commented 5 years ago

Is AVR support enabled in Fedora? Because LLVM has it disabled by default.

Not yet, but I did ask some time ago and it will be enabled when LLVM9 comes out, which should be soon-ish. Also RISC-V too (but that'll be enabled by LLVM9 itself).

deadprogram commented 4 years ago

Closing as the LLVM requirement for normal TinyGo use has been removed. Thank you everyone for the comments!