From 480e2e1eed9ba70ea4e1be2c4a0995a5924527a2 Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Tue, 8 Oct 2024 15:17:24 -0500 Subject: [PATCH 1/2] debugging --- .../01-setup/01-system-setup.md | 10 ++- .../01-setup/02-install-spawn.md | 3 + .../version-v0.50.x/01-setup/03-debugging.md | 66 +++++++++++++++++++ 3 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 docs/versioned_docs/version-v0.50.x/01-setup/03-debugging.md diff --git a/docs/versioned_docs/version-v0.50.x/01-setup/01-system-setup.md b/docs/versioned_docs/version-v0.50.x/01-setup/01-system-setup.md index e49419f4..c8523896 100644 --- a/docs/versioned_docs/version-v0.50.x/01-setup/01-system-setup.md +++ b/docs/versioned_docs/version-v0.50.x/01-setup/01-system-setup.md @@ -39,9 +39,11 @@ wsl sudo apt update && sudo apt install snapd # Install Go (Snap) -sudo snap info go sudo snap install go --channel=1.23/stable --classic +# Clean module cache +go clean -modcache + # Install Base sudo apt install make gcc git jq wget @@ -78,6 +80,9 @@ gh auth login # Golang brew install go +# Clean module cache +go clean -modcache + # Docker brew install --cask docker open -a Docker # start docker desktop @@ -105,6 +110,9 @@ GO_VERSION=1.23.0 wget https://go.dev/dl/go$GO_VERSION.linux-amd64.tar.gz sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go$GO_VERSION.linux-amd64.tar.gz +# Clean module cache +go clean -modcache + # Docker sudo apt -y install docker.io diff --git a/docs/versioned_docs/version-v0.50.x/01-setup/02-install-spawn.md b/docs/versioned_docs/version-v0.50.x/01-setup/02-install-spawn.md index 2362451c..4ffeaadf 100644 --- a/docs/versioned_docs/version-v0.50.x/01-setup/02-install-spawn.md +++ b/docs/versioned_docs/version-v0.50.x/01-setup/02-install-spawn.md @@ -24,6 +24,9 @@ git clone https://github.com/rollchains/spawn.git --depth 1 --branch v0.50.8 # Change to this directory cd spawn +# Clear Go modules cache for a fresh install +go clean -modcache + # Install Spawn make install diff --git a/docs/versioned_docs/version-v0.50.x/01-setup/03-debugging.md b/docs/versioned_docs/version-v0.50.x/01-setup/03-debugging.md new file mode 100644 index 00000000..59a8c811 --- /dev/null +++ b/docs/versioned_docs/version-v0.50.x/01-setup/03-debugging.md @@ -0,0 +1,66 @@ +--- +title: Debugging +sidebar_label: Debugging +sidebar_position: 3 +slug: /install/debugging +--- + +This section will contain common setup problems and how to resolve them. + +## Golang + +### /bin/sh: 1: go: not found + +Just add the following lines to `~/.bashrc` (or `~/.zshrc` if MacOs) and this will persist. [Source](https://stackoverflow.com/a/21012349) +If you run the above in your terminal, it will apply to the current session but not on new terminal sessions. + +```bash +export GOPATH=$HOME/go +export PATH=$PATH:$GOROOT/bin:$GOPATH/bin +``` + +Then apply it with `source ~/.bashrc` or `source ~/.zshrc` + +### build constraints excluded all Go files in /usr/local/go/ ... + +Your Go install is not properly setup. Follow the install instructions above or install directly from source with [go.dev](https://go.dev/doc/install). + +### make: heighliner: Permission denied + +```bash +make get-heighliner +chmod +x $(which heighliner) +``` + +If the above does not work, your user or directory permissions may not be setup. Or your `ls -la $(go env GOPATH)/bin` path is to a bad. + +If using WSL, try https://superuser.com/questions/1352207/windows-wsl-ubuntu-sees-wrong-permissions-on-files-in-mounted-disk. + +## Windows / WSL + +### make: /mnt/c/Program: No such file or directory + +Delete your GOMODCACHE directory: `rm -rf $(go env GOMODCACHE)` or run the direct command `go clean -modcache`. + +## Docker + +### Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?. + +Start the docker daemon. Run [docker engine](https://docs.docker.com/engine/) or `systemctl start docker && systemctl enable docker` for Linux. + +### docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock + +You don't have permissions to interact with the Docker daemon. Run the following command to fix this. + +1) Install properly with https://docs.docker.com/get-started/get-docker/ + +2) +```bash +sudo groupadd docker +sudo usermod -aG docker $USER +newgrp docker + +reboot # if you still get the error +``` + +Technically you can also `sudo chmod 666 /var/run/docker.sock` but this is NOT advised. --> From e8fc50648932206b6a937b9b3254213900aab69d Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Tue, 8 Oct 2024 15:20:28 -0500 Subject: [PATCH 2/2] fix: burnt link --- docs/versioned_docs/version-v0.50.x/00-meet-spawn.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/versioned_docs/version-v0.50.x/00-meet-spawn.md b/docs/versioned_docs/version-v0.50.x/00-meet-spawn.md index 18bd29de..18d773d8 100644 --- a/docs/versioned_docs/version-v0.50.x/00-meet-spawn.md +++ b/docs/versioned_docs/version-v0.50.x/00-meet-spawn.md @@ -20,7 +20,7 @@ Spawn is the easiest way to build, maintain and scale a Cosmos SDK blockchain. S ## Testimonials -> "Spawn is a marked transformation in CosmosSDK protocol development, allowing scaffolding and upgrading from 0.47 to 0.50 to be achievable and understandable. Without the tool, this would have been a dedicated multi-month effort" - Ash, [Burnt.com](https://burnt.com/) +> "Spawn is a marked transformation in CosmosSDK protocol development, allowing scaffolding and upgrading from 0.47 to 0.50 to be achievable and understandable. Without the tool, this would have been a dedicated multi-month effort" - Ash, [Burnt.com](https://twitter.com/burnt_xion) > "Spawn has truly streamlined the developer onboarding process into the Cosmos ecosystem, seamless and efficient." - [Anil](https://x.com/anilcse_/status/1840444855576846355) [VitWit](https://www.vitwit.com/)