generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
Building the smithy-dafny-standard-library module package fails when GOOS=windows because smithy-dafny-standard-library/Time_/externs.go is using the syscall.Rusage type and calling syscall.Getrusage which doesn't exist in the syscall package for windows builds (https://cs.opensource.google/go/go/+/master:src/syscall/syscall_windows.go)
Steps to reproduce
Create a test directory
mkdir tests
cd ./tests
go mod init test
go get github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Time_This should produce a go.mod file like this
module test
go 1.25.1
require (
github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library v0.2.2 // indirect
github.com/dafny-lang/DafnyRuntimeGo/v4 v4.10.1 // indirect
)
Then create main.go with the following content
package main
import _ "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Time_"
func main() {}Running GOOS=linux go build . and GOOS=darwin go build . compiles without error
Running GOOS=windows go build . yields the following error
> test GOOS=windows go build .
# github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Time_
../../go/pkg/mod/github.com/aws/aws-cryptographic-material-providers-library/releases/go/[email protected]/Time_/externs.go:42:17: undefined: syscall.Getrusage
../../go/pkg/mod/github.com/aws/aws-cryptographic-material-providers-library/releases/go/[email protected]/Time_/externs.go:42:35: undefined: syscall.RUSAGE_SELF
../../go/pkg/mod/github.com/aws/aws-cryptographic-material-providers-library/releases/go/[email protected]/Time_/externs.go:46:16: usage.Utime undefined (type syscall.Rusage has no field or method Utime)
../../go/pkg/mod/github.com/aws/aws-cryptographic-material-providers-library/releases/go/[email protected]/Time_/externs.go:46:37: usage.Stime undefined (type syscall.Rusage has no field or method Stime)
Metadata
Metadata
Assignees
Labels
No labels