burrowers / garble

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

panic: list lo: not found (aix_ppc64) #672

Closed klauspost closed 1 year ago

klauspost commented 1 year ago

What version of Garble and Go are you using?

$ go install mvdan.cc/garble@v0.9.1

$ go version
1.20.0

What environment are you running Garble on?

Github Actions.

go env Output
$ go env
GO111MODULE=""
  GOARCH="amd64"
  GOBIN=""
  GOCACHE="/home/runner/.cache/go-build"
  GOENV="/home/runner/.config/go/env"
  GOEXE=""
  GOEXPERIMENT=""
  GOFLAGS=""
  GOHOSTARCH="amd64"
  GOHOSTOS="linux"
  GOINSECURE=""
  GOMODCACHE="/home/runner/go/pkg/mod"
  GONOPROXY=""
  GONOSUMDB=""
  GOOS="linux"
  GOPATH="/home/runner/go"
  GOPRIVATE=""
  GOPROXY="https://proxy.golang.org,direct"
  GOROOT="/opt/hostedtoolcache/go/1.20.0/x64"
  GOSUMDB="sum.golang.org"
  GOTMPDIR=""
  GOTOOLDIR="/opt/hostedtoolcache/go/1.20.0/x64/pkg/tool/linux_amd64"
  GOVCS=""
  GOVERSION="go1.20"
  GCCGO="gccgo"
  GOAMD64="v1"
  AR="ar"
  CC="gcc"
  CXX="g++"
  CGO_ENABLED="0"
  GOMOD="/dev/null"
  GOWORK=""
  CGO_CFLAGS="-O2 -g"
  CGO_CPPFLAGS=""
  CGO_CXXFLAGS="-O2 -g"
  CGO_FFLAGS="-O2 -g"
  CGO_LDFLAGS="-O2 -g"
  PKG_CONFIG="pkg-config"
  GOGCCFLAGS="-fPIC -m64 -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build40190[36](https://github.com/klauspost/compress/actions/runs/4116631066/jobs/7106914584#step:2:37)[40](https://github.com/klauspost/compress/actions/runs/4116631066/jobs/7106914584#step:2:41)0=/tmp/go-build -gno-record-gcc-switches"

What did you do?

goreleaser crosscompile: https://github.com/klauspost/compress/actions/runs/4116631066/jobs/7106914584

What did you expect to see?

Builds.

What did you see instead?

⨯ release failed after 681.35s error=failed to build for aix_ppc64: exit status 1: # crypto/aes
panic: list lo: not found

goroutine 1 [running]:
main.replaceAsmNames(0xc00018e840?, {0xc00018e870?, 0x21?, 0xa?})
    /home/runner/go/pkg/mod/mvdan.cc/garble@v0.9.1/main.go:813 +0x9b6
main.transformAsm({0xc0000a4030?, 0x13, 0xc000022234?})
    /home/runner/go/pkg/mod/mvdan.cc/garble@v0.9.1/main.go:709 +0x8ac
main.mainErr({0xc0000a4010, 0x15, 0x15})
    /home/runner/go/pkg/mod/mvdan.cc/garble@v0.9.1/main.go:435 +0x7c8
main.main1()
    /home/runner/go/pkg/mod/mvdan.cc/garble@v0.9.1/main.go:238 +0x16e
main.main()
    /home/runner/go/pkg/mod/mvdan.cc/garble@v0.9.1/main.go:138 +0x19
exit status 1
lu4p commented 1 year ago

Can you test again on 0.9.2 just to make sure?

klauspost commented 1 year ago

Same error, but different platform:

⨯ release failed after 581.91s error=failed to build for linux_ppc[64](https://github.com/klauspost/compress/actions/runs/4118242672/jobs/7110532455#step:9:65): exit status 1: # crypto/aes
panic: list lo: not found

goroutine 1 [running]:
main.replaceAsmNames(0xc0001928a0?, {0xc0001928d0?, 0x21?, 0xa?})
    /home/runner/go/pkg/mod/mvdan.cc/garble@v0.9.2/main.go:812 +0x9b6
main.transformAsm({0xc0000a4030?, 0x13, 0xc000020234?})
    /home/runner/go/pkg/mod/mvdan.cc/garble@v0.9.2/main.go:708 +0x8ac
main.mainErr({0xc0000a4010, 0x15, 0x15})
    /home/runner/go/pkg/mod/mvdan.cc/garble@v0.9.2/main.go:434 +0x7c8
main.main1()
    /home/runner/go/pkg/mod/mvdan.cc/garble@v0.9.2/main.go:237 +0x16e
main.main()
    /home/runner/go/pkg/mod/mvdan.cc/garble@v0.9.2/main.go:137 +0x19
exit status 1

https://github.com/klauspost/compress/pull/749

mvdan commented 1 year ago

Ah, comments in assembly files strike again.

$ git grep 'lo·'
crypto/aes/gcm_ppc64x.s:129:    VPMSUMD IN, HL, XL // H.lo·H.lo