Skip to content

syscall: EBADFD not defined for the wasip1 target #60998

@flavio

Description

@flavio

What version of Go are you using (go version)?

go version go1.21rc2 linux/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env

What did you do?

I tried to compile some code using the spf13/afero library to the wasip1 target

A simple reproducer can be found here:

https://go.dev/play/p/3KyfMD2DTUd

What did you expect to see?

I expected the compilation to be successful

What did you see instead?

The compilation failed with this error:

GOOS=wasip1 GOARCH=wasm go build -o main.wasm
# github.com/spf13/afero
../go/pkg/mod/github.com/spf13/afero@v1.9.5/const_win_unix.go:22:23: undefined: syscall.EBADFD

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixPendingIssues that have a fix which has not yet been reviewed or submitted.NeedsFixThe path to resolution is known, but the work has not been done.arch-wasmWebAssembly issuescompiler/runtimeIssues related to the Go compiler and/or runtime.help wanted

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions