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

cmd/go: internal/mmap/mmap.go:30:9: undefined: mmapFile on js-wasm #54219

Closed
p-kraszewski opened this issue Aug 3, 2022 · 8 comments
Closed
Assignees
Labels
arch-wasm WebAssembly issues GoCommand cmd/go help wanted NeedsFix The path to resolution is known, but the work has not been done. OS-JS
Milestone

Comments

@p-kraszewski
Copy link

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

$ go version
go version go1.18.4 freebsd/amd64

Does this issue reproduce with the latest release?

Yes, on 2 different operating systems

  • FreeBSD 13.1 with Go 1.18.4 from packages
  • Arch Linux with Go 1.19 from packages - the error messages are exactly the same, didn't copy output twice.

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="freebsd"
GOINSECURE=""
GOMODCACHE="/root/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="freebsd"
GOPATH="/root/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go118"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go118/pkg/tool/freebsd_amd64"
GOVCS=""
GOVERSION="go1.18.4"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="cc"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3287959224=/tmp/go-build -gno-record-gcc-switches"

What did you do?

> git describe --tags --long --all
tags/go1.19-0-g43456202a1

> ./buildall.bash '(freebsd|linux|js)-(amd64|arm64|wasm)'

What did you expect to see?

Building Go cmd/dist using /usr/local/go118. (go1.18.4 freebsd/amd64)
Building Go toolchain1 using /usr/local/go118.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
Building Go toolchain2 using go_bootstrap and Go toolchain1.
Building Go toolchain3 using go_bootstrap and Go toolchain2.
Building packages and commands for freebsd/amd64.
---
Installed Go for freebsd/amd64 in /home/pawel/.go
Installed commands in /home/pawel/.go/bin

### Building linux-amd64

### Building linux-arm64

### Building freebsd-amd64

### Building freebsd-arm64

### Building js-wasm

What did you see instead?

Building Go cmd/dist using /usr/local/go118. (go1.18.4 freebsd/amd64)
Building Go toolchain1 using /usr/local/go118.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
Building Go toolchain2 using go_bootstrap and Go toolchain1.
Building Go toolchain3 using go_bootstrap and Go toolchain2.
Building packages and commands for freebsd/amd64.
---
Installed Go for freebsd/amd64 in /home/pawel/.go
Installed commands in /home/pawel/.go/bin

### Building linux-amd64

### Building linux-arm64

### Building freebsd-amd64

### Building freebsd-arm64

### Building js-wasm
# cmd/go/internal/mmap
cmd/go/internal/mmap/mmap.go:30:9: undefined: mmapFile

Build(s) failed.
@seankhliao
Copy link
Member

please try this with the upstream source tree.

@seankhliao seankhliao added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Aug 3, 2022
@p-kraszewski
Copy link
Author

Checked. All the details are in my other bug report.

I resolved the other problem by un-hiding goroot directory (from .goroot). It has no influence on the issue reported here.

@seankhliao seankhliao changed the title ./buildall.bash : "cmd/go/internal/mmap/mmap.go:30:9: undefined: mmapFile" when compiling with js-wasm support. cmd/go: internal/mmap/mmap.go:30:9: undefined: mmapFile on js-wasm Aug 5, 2022
@seankhliao seankhliao added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. GoCommand cmd/go OS-JS and removed WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Aug 5, 2022
@seankhliao
Copy link
Member

cc @bcmills @matloob not sure if js is a supported target for cmd/go?

@seankhliao seankhliao added this to the Unplanned milestone Aug 20, 2022
@bcmills bcmills added help wanted NeedsFix The path to resolution is known, but the work has not been done. labels Aug 23, 2022
@gopherbot gopherbot removed the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Aug 23, 2022
@bcmills
Copy link
Member

bcmills commented Aug 23, 2022

not sure if js is a supported target for cmd/go?

It looks like the js/wasm builder has been configured to skip cmd/go since CL 121938, although it's not clear to me why that's useful. (Shouldn't the js/wasm builder be trivial to shard more widely?)

However, there isn't much point in building cmd/go for js/wasm, given that it relies on executing subprocesses.

As long as the fixes are small, I think it would be fine to tweak the cmd/go source to once again build and pass (or skip) tests on js/wasm, and then re-enable its tests on the builder.

@gopherbot
Copy link

Change https://go.dev/cl/433480 mentions this issue: cmd/go/internal/mmap: fix build for js/wasm

@gopherbot
Copy link

Change https://go.dev/cl/434235 mentions this issue: dashboard: re-enable cmd/go build test on js/wasm

@dmitshur dmitshur modified the milestones: Unplanned, Go1.20 Sep 26, 2022
@dmitshur dmitshur added the arch-wasm WebAssembly issues label Sep 26, 2022
@gopherbot
Copy link

Change https://go.dev/cl/435237 mentions this issue: cmd/dist: test cmd module on js/wasm

gopherbot pushed a commit that referenced this issue Sep 28, 2022
Most tests will be skipped anyway because 'go build' is not available,
but this ensures cmd will be build tested by TryBots for js/wasm.

For #25911
For #35220
For #54219

Change-Id: I09c75905c36311810eb1ae75eeee2fa6102c1c0d
Reviewed-on: https://go-review.googlesource.com/c/go/+/435237
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
gopherbot pushed a commit to golang/build that referenced this issue Sep 28, 2022
Most tests will be skipped anyway because 'go build' is not available.
But this at least ensures cmd/go will build for js/wasm after
https://go.dev/cl/433480 is submitted.

For golang/go#54219

Change-Id: I5f9b647973e7ee9a5849e1ce2818986794edc2c4
Reviewed-on: https://go-review.googlesource.com/c/build/+/434235
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
@gopherbot
Copy link

Change https://go.dev/cl/436816 mentions this issue: cmd: add skips as needed to get tests to pass on js/wasm

gopherbot pushed a commit that referenced this issue Sep 29, 2022
For #54219.

Change-Id: I9767f46a5b44beeee62a3d53c4de4f6acb6b6e73
Reviewed-on: https://go-review.googlesource.com/c/go/+/436816
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
@tklauser tklauser self-assigned this Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-wasm WebAssembly issues GoCommand cmd/go help wanted NeedsFix The path to resolution is known, but the work has not been done. OS-JS
Projects
None yet
Development

No branches or pull requests

6 participants