docs: make the Go toolchain an explicit prerequisite
Building needs both Go and a C toolchain, but only the C toolchain had install commands — so the macOS path read as though `xcode-select --install` was the whole job. Running it and being told the tools are already present looks like success right up until `make build` fails with `go: command not found`. Splits Prerequisites into two numbered steps with install commands for each, `brew install go` on macOS, and says plainly that both are required. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -48,11 +48,36 @@ the Go toolchain.
|
|||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
**Go 1.24 or newer** — check with `go version`.
|
There are **two** prerequisites — the Go toolchain, and a C toolchain for cgo.
|
||||||
|
Both are needed on every platform, macOS included.
|
||||||
|
|
||||||
Then the C toolchain and system headers Fyne needs:
|
**1. Go 1.24 or newer.** Verify with `go version`; if that says
|
||||||
|
`command not found`, install it:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
# macOS
|
||||||
|
brew install go
|
||||||
|
|
||||||
|
# Debian / Ubuntu
|
||||||
|
sudo apt install golang-go
|
||||||
|
|
||||||
|
# Fedora
|
||||||
|
sudo dnf install golang
|
||||||
|
|
||||||
|
# Arch
|
||||||
|
sudo pacman -S go
|
||||||
|
```
|
||||||
|
|
||||||
|
Or download it from [go.dev/dl](https://go.dev/dl/). If your distro's package
|
||||||
|
is older than 1.24, use the tarball from there instead.
|
||||||
|
|
||||||
|
**2. A C toolchain and the platform's graphics headers**, because Fyne renders
|
||||||
|
through OpenGL:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# macOS — the Xcode command line tools
|
||||||
|
xcode-select --install
|
||||||
|
|
||||||
# Debian / Ubuntu
|
# Debian / Ubuntu
|
||||||
sudo apt install gcc libgl1-mesa-dev xorg-dev
|
sudo apt install gcc libgl1-mesa-dev xorg-dev
|
||||||
|
|
||||||
@@ -62,14 +87,16 @@ sudo dnf install gcc libX11-devel libXcursor-devel libXrandr-devel \
|
|||||||
|
|
||||||
# Arch
|
# Arch
|
||||||
sudo pacman -S gcc libx11 libxcursor libxrandr libxinerama mesa libxi
|
sudo pacman -S gcc libx11 libxcursor libxrandr libxinerama mesa libxi
|
||||||
|
|
||||||
# macOS — the Xcode command line tools
|
|
||||||
xcode-select --install
|
|
||||||
```
|
```
|
||||||
|
|
||||||
On Windows, use a MinGW-w64 toolchain (for example via
|
On Windows, use a MinGW-w64 toolchain (for example via
|
||||||
[MSYS2](https://www.msys2.org/)) so cgo has a C compiler.
|
[MSYS2](https://www.msys2.org/)) so cgo has a C compiler.
|
||||||
|
|
||||||
|
On macOS the command line tools cover the C side entirely — there is no
|
||||||
|
Homebrew formula to add for graphics. That makes it easy to run
|
||||||
|
`xcode-select --install`, see "already installed", and assume you're ready when
|
||||||
|
Go itself is still missing. Both steps are required.
|
||||||
|
|
||||||
### Build it
|
### Build it
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
|||||||
Reference in New Issue
Block a user