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/compile: unexpected NUL in input #26888

Closed
sjuliper7 opened this issue Aug 9, 2018 · 6 comments
Closed

cmd/compile: unexpected NUL in input #26888

sjuliper7 opened this issue Aug 9, 2018 · 6 comments
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@sjuliper7
Copy link

Please answer these questions before submitting your issue. Thanks!

What did you do?

i have golang program like this code
package main

import "fmt"

func main() {
fmt.println("hello world")
}

but when i'm run.. "go run main.go"

C:\Go\src\fmt\print.go:10:2: read C:\Go\src\os\exec.go: unexpected NUL in input

What did you expect to see?

What did you see instead?

Does this issue reproduce with the latest release (go1.10.3)?

System details

go version go1.8.3 windows/amd64
GOARCH="amd64"
GOBIN=""
GOEXE=".exe"
GOHOSTARCH="amd64"
GOHOSTOS="windows"
GOOS="windows"
GOPATH="D:\Internship\Golang\Go\"
GORACE=""
GOROOT="C:\Go"
GOTOOLDIR="C:\Go\pkg\tool\windows_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-m64 -mthreads -fmessage-length=0 -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
GOROOT/bin/go version: go version go1.8.3 windows/amd64
GOROOT/bin/go tool compile -V: compile version go1.8.3 X:framepointer
gdb --version: GNU gdb 5.2.1
@mikioh mikioh changed the title unexpected NUL in input cmd/compile: unexpected NUL in input Aug 9, 2018
@mikioh
Copy link
Contributor

mikioh commented Aug 9, 2018

Just tried the snippet on play.golang.org and got the following:

prog.go:6:1: cannot refer to unexported name fmt.println
prog.go:6:1: undefined: fmt.println

Is this what you want instead of "unexpected NUL in input"?

@cznic
Copy link
Contributor

cznic commented Aug 9, 2018

C:\Go\src\fmt\print.go:10:2: read C:\Go\src\os\exec.go: unexpected NUL in input

Note that the code in the OP has only 7 lines but the error is reported for line 10. Perhaps there's something more to the source. Can you please paste the output of hexdump -C your-file.go or from any other equivalent program?

@agnivade
Copy link
Contributor

agnivade commented Aug 9, 2018

The error is reported from line 10 of fmt/print.go I believe. In any case, this does sound like the source file is messed up somehow.

@mvdan
Copy link
Member

mvdan commented Aug 9, 2018

@sjuliper7 are you positive that your Go installation isn't broken? It seems like the standard library source files cannot be read for some reason.

@mvdan mvdan added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Aug 9, 2018
@cznic
Copy link
Contributor

cznic commented Aug 9, 2018

@agnivade You're right, and I'm sorry.

@gopherbot
Copy link

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@golang golang locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

6 participants