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

Open
p-kraszewski opened this issue Aug 3, 2022 · 3 comments
Open
Labels
GoCommand NeedsInvestigation OS-JS

Comments

@p-kraszewski
Copy link

@p-kraszewski p-kraszewski commented Aug 3, 2022

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

@seankhliao seankhliao commented Aug 3, 2022

please try this with the upstream source tree.

@seankhliao seankhliao added the WaitingForInfo label Aug 3, 2022
@p-kraszewski
Copy link
Author

@p-kraszewski p-kraszewski commented Aug 4, 2022

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 GoCommand OS-JS and removed WaitingForInfo labels Aug 5, 2022
@seankhliao
Copy link
Member

@seankhliao seankhliao commented Aug 5, 2022

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

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

No branches or pull requests

2 participants