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

Unable to run go run main.go at all #44656

Closed
Ashwin117 opened this issue Feb 27, 2021 · 2 comments
Closed

Unable to run go run main.go at all #44656

Ashwin117 opened this issue Feb 27, 2021 · 2 comments
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@Ashwin117
Copy link

Ashwin117 commented Feb 27, 2021

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

$ go version
go version go1.16 darwin/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
GO111MODULE="on"
GOARCH="amd64"
GOBIN="/Users/asundar/dev/Snapchat/go/bin"
GOCACHE="/Users/asundar/Library/Caches/go-build"
GOENV="/Users/asundar/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/asundar/dev/Snapchat/go/pkg/mod"
GONOPROXY="*.sc-corp.net"
GONOSUMDB="*.sc-corp.net"
GOOS="darwin"
GOPATH="/Users/asundar/dev/Snapchat/go"
GOPRIVATE="*.sc-corp.net"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.16/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.16/libexec/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.16"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/asundar/dev/Snapchat/go/src/github.sc-corp.net/Snapchat/leo-portal/leo-workflow/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/md/5rr3tg051y73ths2krn_s58m0000gp/T/go-build2278006185=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

When I run go run -x main.go, I see that it always "hangs" here:

...
packagefile google.golang.org/grpc/credentials/alts/internal/authinfo=/Users/asundar/Library/Caches/go-build/86/8699736b0c6cd72efac76418611f34c95574c94a3b057cecfef6fb03d6eb7b68-d
packagefile google.golang.org/grpc/credentials/alts/internal/conn=/Users/asundar/Library/Caches/go-build/b5/b572ef4f801218bbc671218a14e979fd60be7c3675b6c9e0f404755cd0f4d711-d
EOF
mkdir -p $WORK/b001/exe/
cd .
/usr/local/Cellar/go/1.16/libexec/pkg/tool/darwin_amd64/link -o $WORK/b001/exe/main -importcfg $WORK/b001/importcfg.link -s -w -buildmode=exe -buildid=stXfpT1fuiUZA12eBKS6/S7iWKdBPUQQT0mqfkaUK/2Be0__5Cu1_lUleL2U43/stXfpT1fuiUZA12eBKS6 -extld=clang /Users/asundar/Library/Caches/go-build/48/480593020d2323e87b7c551b2d14df0dfbfe59a3d0d6d45f09e230c5c60a96a8-d
$WORK/b001/exe/main

What did you expect to see?

I would expect my main.go code to run and start listening on port 8080 for traffic

What did you see instead?

The program hangs. I've tried re-installing go, re-installing my package. Everything. The weird part is that this works perfectly fine for my co-workers.

@AlexRouSg
Copy link
Contributor

AlexRouSg commented Feb 27, 2021

Do you happen to have a antivirus on the mac?
The last line is $WORK/b001/exe/main which means the go tool did it's job and is trying to run your program.
So other than a issue with your code, it looks like it could be antivirus related.

@seankhliao seankhliao added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Feb 27, 2021
@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 Mar 27, 2022
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

4 participants