spacemeshos / go-spacemesh

Go Implementation of the Spacemesh protocol full node. 💾⏰💪
https://spacemesh.io
MIT License
748 stars 211 forks source link

Windows Binary Build Not Working #2626

Closed narayanprusty closed 1 year ago

narayanprusty commented 3 years ago

Description

Unable to build go-spacemesh binary on windows. make build gives error.

Steps To Reproduce

  1. Go to 'Command Prompt'
  2. Run 'make build'
  3. You will get error

I have also tried using msys2(https://www.msys2.org/) but still getting different set of errors.

Expected Behavior

Should be able to build go-spacemesh binary on Windows

Additional Resources

I get this error on command prompt:

"OS: Windows_NT, HOST_OS: windows, GOOS: windows, GOARCH: , BIN_DIR: C:/Users/narayan/Desktop/go-spacemesh/build/, platform: windows"
mkdir -p C:/Users/narayan/Desktop/go-spacemesh/build/
The syntax of the command is incorrect.
make: *** [Makefile.Inc:56: C:/Users/narayan/Desktop/go-spacemesh/build/gpu-setup.dll] Error 1

And this when using msys

"OS: Windows_NT, HOST_OS: windows, GOOS: windows, GOARCH: , BIN_DIR: /home/narayan/go-spacemesh/build/, platform: windows"
mkdir -p /home/narayan/go-spacemesh/build/
unzip -o /home/narayan/go-spacemesh/libgpu-setup-windows-0.1.21.zip -d /home/narayan/go-spacemesh/build/ gpu-setup.dll
Archive:  /home/narayan/go-spacemesh/libgpu-setup-windows-0.1.21.zip
  inflating: /home/narayan/go-spacemesh/build/gpu-setup.dll
touch /home/narayan/go-spacemesh/build/gpu-setup.dll
/bin/sh: line 1: type: version.txt: not found
go build -o /home/narayan/go-spacemesh/build/go-spacemesh.exe -ldflags "-X main.version= -X main.commit=68e5ab74a7c429fa933ce0e9437ea6ff2879f596 -X main.branch=develop"  .
# internal/unsafeheader
compile: version "go1.15.4" does not match go tool version "go1.16"
# runtime/internal/sys
compile: version "go1.15.4" does not match go tool version "go1.16"
# math/bits
compile: version "go1.15.4" does not match go tool version "go1.16"
# unicode/utf8
compile: version "go1.15.4" does not match go tool version "go1.16"
# runtime/internal/atomic
flag provided but not defined: -compiling-runtime
usage: asm [options] file.s ...
Flags:
  -D value
        predefined symbol with optional simple value -D=identifier=value; can be set multiple times
  -I value
        include directory; can be set multiple times
  -S    print assembly and machine code
  -V    print version and exit
  -debug
        dump instructions as they are parsed
  -dynlink
        support references to Go symbols defined in other shared libraries
  -e    no limit on number of errors reported
  -gensymabis
        write symbol ABI information to output file, don't assemble
  -go115newobj
        use new object file format (default true)
  -o string
        output file; default foo.o for /a/b/c/foo.s as first argument
  -p string
        set expected package import to path
  -shared
        generate code that can be linked into a shared library
  -spectre list
        enable spectre mitigations in list (all, ret)
  -trimpath string
        remove prefix from recorded source file paths
# internal/race
compile: version "go1.15.4" does not match go tool version "go1.16"
# internal/cpu
compile: version "go1.15.4" does not match go tool version "go1.16"
# unicode
compile: version "go1.15.4" does not match go tool version "go1.16"
# internal/syscall/windows/sysdll
compile: version "go1.15.4" does not match go tool version "go1.16"
# unicode/utf16
compile: version "go1.15.4" does not match go tool version "go1.16"
# encoding
compile: version "go1.15.4" does not match go tool version "go1.16"
# sync/atomic
compile: version "go1.15.4" does not match go tool version "go1.16"
# container/list
compile: version "go1.15.4" does not match go tool version "go1.16"
# golang.org/x/sys/internal/unsafeheader
compile: version "go1.15.4" does not match go tool version "go1.16"
# internal/nettrace
compile: version "go1.15.4" does not match go tool version "go1.16"
# crypto/internal/subtle
compile: version "go1.15.4" does not match go tool version "go1.16"
# crypto/subtle
compile: version "go1.15.4" does not match go tool version "go1.16"
# vendor/golang.org/x/crypto/cryptobyte/asn1
compile: version "go1.15.4" does not match go tool version "go1.16"
# vendor/golang.org/x/crypto/internal/subtle
compile: version "go1.15.4" does not match go tool version "go1.16"
# golang.org/x/crypto/internal/subtle
compile: version "go1.15.4" does not match go tool version "go1.16"
# github.com/seehuhn/mt19937
compile: version "go1.15.4" does not match go tool version "go1.16"
# google.golang.org/protobuf/internal/flags
compile: version "go1.15.4" does not match go tool version "go1.16"
# google.golang.org/grpc/serviceconfig
compile: version "go1.15.4" does not match go tool version "go1.16"
# golang.org/x/crypto/salsa20/salsa
compile: version "go1.15.4" does not match go tool version "go1.16"
# github.com/spacemeshos/go-spacemesh/hare/eligibility/config
compile: version "go1.15.4" does not match go tool version "go1.16"
# github.com/spacemeshos/go-spacemesh/hare/config
compile: version "go1.15.4" does not match go tool version "go1.16"
# github.com/pyroscope-io/pyroscope/pkg/agent/debugspy
compile: version "go1.15.4" does not match go tool version "go1.16"
# github.com/pyroscope-io/pyroscope/pkg/agent/rbspy
compile: version "go1.15.4" does not match go tool version "go1.16"
# github.com/pyroscope-io/pyroscope/pkg/agent/pyspy
compile: version "go1.15.4" does not match go tool version "go1.16"
# github.com/pyroscope-io/pyroscope/pkg/agent/ebpfspy
compile: version "go1.15.4" does not match go tool version "go1.16"
# golang.org/x/text/encoding/internal/identifier
compile: version "go1.15.4" does not match go tool version "go1.16"
# github.com/pyroscope-io/pyroscope/pkg/util/slices
compile: version "go1.15.4" does not match go tool version "go1.16"
# golang.org/x/net/html/atom
compile: version "go1.15.4" does not match go tool version "go1.16"
# golang.org/x/text/internal/utf8internal
compile: version "go1.15.4" does not match go tool version "go1.16"
# runtime/cgo
compile: version "go1.15.4" does not match go tool version "go1.16"
make: *** [Makefile:99: go-spacemesh] Error 2
moshababo commented 2 years ago

@narayanprusty still relevant?