Error when trying to install StackImpact lib

Hey there, I’m trying to install a profiling tool named StackImpact but I’m getting these errors. Anyone knows how to fix it?

Tnx.

Microsoft Windows [versão 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Todos os direitos reservados.

C:\Users\leonardo>go get github.com/stackimpact/stackimpact-go
# github.com/stackimpact/stackimpact-go/internal
C:\gowork\src\github.com\stackimpact\stackimpact-go\internal\process_reporter.go
:96: undefined: syscall.Getrusage
C:\gowork\src\github.com\stackimpact\stackimpact-go\internal\process_reporter.go
:102: rusage.Utime undefined (type *syscall.Rusage has no field or method Utime)

C:\gowork\src\github.com\stackimpact\stackimpact-go\internal\process_reporter.go
:103: rusage.Utime undefined (type *syscall.Rusage has no field or method Utime)

C:\gowork\src\github.com\stackimpact\stackimpact-go\internal\process_reporter.go
:104: rusage.Stime undefined (type *syscall.Rusage has no field or method Stime)

C:\gowork\src\github.com\stackimpact\stackimpact-go\internal\process_reporter.go
:105: rusage.Stime undefined (type *syscall.Rusage has no field or method Stime)

C:\gowork\src\github.com\stackimpact\stackimpact-go\internal\process_reporter.go
:112: undefined: syscall.Getrusage
C:\gowork\src\github.com\stackimpact\stackimpact-go\internal\process_reporter.go
:117: rusage.Maxrss undefined (type *syscall.Rusage has no field or method Maxrs
s)

C:\Users\leonardo>

According to the README, StackImpact runs on Linux or macOS only.

I guess this is because syscall is an OS-specific package and thus can only provide those methods that the underlying OS supports.

You might want to run go doc syscall in a command prompt and check if you see Getrusage in the API methods listed there. Most likely it is not there.

See also the Overview section in the syscall doc that advises that syscall is locked down because of various problems, and golang.org/x/sys should be used instead.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.