Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error building on macOS #2

Open
mwbailey opened this issue Mar 30, 2022 · 0 comments
Open

Error building on macOS #2

mwbailey opened this issue Mar 30, 2022 · 0 comments

Comments

@mwbailey
Copy link

Tried testing the SDK with a simple example program:

package main

import (
	"fmt"
	"github.com/XDCFoundation/XDC3Go/XRC20"
)

func main() {
	CreateAccount1 := XRC20.CreateAccount()
	fmt.Println("CreateAccount Private key :", CreateAccount1)
}

Whether I install with go get github.com/XDCFoundation/XDC3Go or clone the XDC3Go repo, I get the following build errors:

$ go build ./...
# github.com/XDCFoundation/XDC3Go/p2p/netutil
../../go/pkg/mod/github.com/!x!d!c!foundation/!x!d!c3!go@v0.0.0-20210823111048-22e1e423c11f/p2p/netutil/error.go:24:38: undefined: isPacketTooBig
# github.com/XDCFoundation/XDC3Go/metrics
../../go/pkg/mod/github.com/!x!d!c!foundation/!x!d!c3!go@v0.0.0-20210823111048-22e1e423c11f/metrics/cpu_enabled.go:42:21: undefined: getProcessCPUTime

It looks like the problem is build constraints that prevent some files from being compiled on non-Windows systems.

The "toobig_windows.go" file won't be compiled with the package because of the "windows" build tag (and also file suffix), so isPacketTooBig is undefined on macOS.

getProcessCPUTime is undefined because of the "windows" file suffix in "cpu_windows.go".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant