Build the Algorand Node Natively on Windows 10

Build it natively! No more emulators or even WSL, just build it from source using mingw64 on Windows 10 x64. Learn more by following this step-by-step tutorial:

Source code to synced in about 30 minutes! (depending on your build environment, use of Fast Catchup and network speed)

Please let us know how it’s going in the comments below…

2 Likes

Hi,

I’m going through the tutorial but having trouble running the ‘make’ command. I’m seeing the following errors:

I’ve tried running as Administrator but getting the same results. Is there something I’m doing wrong with the install?

Thanks

These seems to be the four components installed by configure_dev-deps.sh.

Did you run it ?

I ran configure_dev-deps.sh separately and got this as output.

Can you send the full output of ./scripts/configure_dev.sh?

Sorry, I’m unable to post it directly in the forum due to the number of links in the output. I’ve uploaded it to PasteBin instead. Output of ./scripts/configure_dev.sh - Pastebin.com
Cheers

Is $GOPATH/bin in your $PATH?
See

@fabrice Thanks for pointing me in the right direction. It looks like during the install a separate ‘go’ folder was created in my windows Users directory and so there were some files in ‘C:\Users\peter\go’ and some in ‘C:\msys64\home\peter\go’. I manually copied the folder contents from Users into Home and then ‘make’ was able to locate the missing dependencies.

Hi @Genma_Saotome we are about to update the tutorial and move full setup of Go language outside script execution.

Please check if applying the changes in this branch, just after cloning the repo, helps.

Kind regards.

@mxmauro I cloned the repo and copied over the three files

  • makefile
  • scripts/build_package.sh
  • scripts/configure_dev-deps.sh

Went through without a hitch running ./scripts/configure_dev.sh with those changes. Everything correctly copied into C:\msys64\home\peter\go\bin rather than my %USERPROFILE% directory.

Excellent @Genma_Saotome. I’ll work this weekend on some changes and update the tutorial.

BTW: Sorry for the late response. I don’t enter the forum frequently :slight_smile:

Hello,

At the last step, it says goal or go isn’t a recognised command. What could be the reason for this? I added it to the system and user Path variable in windows.

also i’m having trouble with the linux go path.

I ran the echo command, and my .bashrc has
“export GOPATH=$HOME/go” at the end of the file.
However, go env still shows
“set GOPATH=C:/msys64/home/User/go”

I’ve tried it many times closing the terminal line ect, it still won’t do anything.

Thanks in advance

Can you check go is installed and in your PATH?
Concretely, what does go version output?

Depends.
In the Msys shell it says

# go version
go version go1.14.4 windows/amd64

in windows cmd it says

'go' is not recognized as an internal or external command,
operable program or batch file.

In the “Path” environment variable in both user and system, i have

C:\msys64\home\User\go

I added a “PATH” variable too, makes no difference

in msys, go env gives this:

set GOPATH=C:/msys64/home/User/go

Are you running all the commands (to install the Algorand software) in the Msys shell?

Thanks for the help, i ended up releasing that because i did the make command too late, not all the binaries were copied to the AlgorandNode folder.

I copied them manually, and even though i don’t have the same number of files and folders as the tutorial, everything seems to work!

1 Like

Hi @DrGroyp , we updated a bit the documentation and also fixed some bugs based on the feedback we get.

Regards,
Mauro.

I’m having a few issues with getting this installed properly and I’d like to do the process so that it doesn’t require copy and pasting of files to repeat. I think some of the paths are wrong and perhaps inconsistent between runs. I’ve had issues where I would run the configure_dev script and not all libraries downloaded. Most of all I’ve had the issue that @Genma_Saotome mentioned above where there are missing dependencies.

I’ve cleaned my workspace and re-ran the installation from the beginning a few times and I’ve boiled down installation to:

**Install and Configure msys2**

* Update package database and base packages: pacman -Syu

* Update the rest of the packages: pacman -Su

* Install base dev packages: pacman -S --needed base-devel 

* install gcc and make: pacman -S --needed mingw-w64-x86_64-toolchain

* install Git: pacman -S --disable-download-timeout --noconfirm git 

* install go: pacman -S --disable-download-timeout --noconfirm mingw-w64-x86_64-go 

* update .bashrc with path to local go install and remap gopath var to local install: 
    * export PATH=$PATH:/c/msys64/mingw64/lib/go/bin
    * export GOPATH=$HOME/go

This is where my first questions is:
Are these paths correct? If I put just the “export GOPATH” line in the bashrc file (like the instructions say), when I run msys it cant find go. When I add the updated path to point to the local go installation, Go is recognized but I’m not sure if that throws off everything else.

My second question is:
In the check_deps.sh file, when creating the path to the go bin, I assume it’s supposed to point to the local msys installation. However when this is run: GO_BIN="$(echo “GOPATH" | cut -d: -f1)/bin" it results in GO_BIN being "C:\bin" which, obviously, doesn't point to where the local go/bin directory is. The current GOPATH variables points to a location that go is not actually installed. Should this be GO_BIN = "(go env GOROOT)”/bin instead? If not, am I doing something wrong in the installation phase of things that is putting the installations in the wrong place?

Hi @jakehova ,

When you install Go with pacman, it should add the path automatically. Take into account MSYS2 installs three consoles, MSYS, MinGW 32-bit and MinGW 64-bit. In order to work, you must use MinGW 64-bit else bashrc scripts are different.

Manual addition of GOPATH is necessary because else Go dependencies are installed on the real user profile instead of the MSYS2 environment. And you must restart the console afterwards.

The second questions seems to be related to the different consoles MSYS2 has. First I recommend to follow steps here.

Regards,
Mauro.

1 Like

Ughh. You’re right. I just wasnt using the right console. As soon as I used the 64 bit version, everything worked perfectly.

Thank you!

1 Like