burrowers / garble

Obfuscate Go builds
BSD 3-Clause "New" or "Revised" License
3.93k stars 248 forks source link

has anyone had this issue befoe compiling error after days of it working fine #722

Closed jimmywhite999 closed 1 year ago

jimmywhite999 commented 1 year ago

What version of Garble and Go are you using?

$ garble version 0.93

$ go version 1.20.3

What environment are you running Garble on?

go env Output
$ go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\Administrator\AppData\Local\go-build
set GOENV=C:\Users\Administrator\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\Administrator\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\Administrator\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.20.3
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=C:\Users\Administrator\GolandProjects\band\go.mod
set GOWORK=
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=C:\Users\ADMINI~1\AppData\Local\Temp\2\go-build3457684027=/tmp/go-build -gno-record-gcc-switches

What did you do?

yesterday it was working fine which i find odd cause nothing has been changed but when i run fmt.Println("Modified Go code") fmt.Println("Starting to compile")

cmd := exec.Command("garble", "-literals", "-tiny", "build", "-o", "filename.exe", "-ldflags=-w -s", "main.go")
cmd.Stdout = os.Stdout

What did you expect to see?

i expected to have a compiled go code sent from my server

What did you see instead?

instead i get compiling error "# command-line-arguments cannot load garble export file for archive/zip: open C:\Users\Administrator\AppData\Local\go-build\6a\6aba447d3eb3298bff8808875d738996c55dc085e9a2d9b9598da83f8d0f66be-garble-mA2ltNympy5bYmTb-QkE-d: The system cannot find the file specified. exit status 1"

mvdan commented 1 year ago

Yes; see https://github.com/burrowers/garble/issues/708.

jimmywhite999 commented 1 year ago

thank you