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

Comments

@sjuliper7
Copy link

@sjuliper7 sjuliper7 commented Aug 9, 2018

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

This comment has been minimized.

Copy link
Contributor

@mikioh 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

This comment has been minimized.

Copy link
Contributor

@cznic 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

This comment has been minimized.

Copy link
Contributor

@agnivade 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

This comment has been minimized.

Copy link
Member

@mvdan 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 label Aug 9, 2018
@cznic

This comment has been minimized.

Copy link
Contributor

@cznic cznic commented Aug 9, 2018

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

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Sep 9, 2018

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.)

@gopherbot gopherbot closed this Sep 9, 2018
@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.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.