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

relocation target reflect.(*rtype).ptrTo not defined #669

Closed
smjure opened this issue Feb 3, 2023 · 2 comments
Closed

relocation target reflect.(*rtype).ptrTo not defined #669

smjure opened this issue Feb 3, 2023 · 2 comments

Comments

@smjure
Copy link

smjure commented Feb 3, 2023

What version of Garble and Go are you using?

$ garble version
mvdan.cc/garble v0.9.1

Build settings:
      -buildmode exe
       -compiler gc
     CGO_ENABLED 1
          GOARCH amd64
            GOOS linux
         GOAMD64 v1

$ go version
1.20

What environment are you running Garble on?

go env Output
$ go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/oem/.cache/go-build"
GOENV="/home/oem/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/oem/golib/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/oem/golib"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.20"
GCCGO="/usr/bin/gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=".../golang_tests/goccy/go.mod"
GOWORK=".../golang_tests/goccy/go.work"
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 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3188426963=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Upgraded Go from 1.19.5 to 1.20

What did you expect to see?

Go garble compiler to work

What did you see instead?

garble -debug build goccy.go 
[garble] original build info obtained in 54.82ms via: go list -json -export -compiled -trimpath -e -deps goccy.go
[garble] calling via toolexec: /usr/local/go/bin/go build -trimpath -buildvcs=false -toolexec=/home/oem/golib/bin/garble -debug toolexec goccy.go
# command-line-arguments
[garble] transforming link with args: -o $WORK/b001/exe/a.out -importcfg $WORK/b001/importcfg.link -buildmode=exe -buildid=HSFtnO9s9f98xQBkmS99/YpqWFQp_weOeWM23yhKk/zyuLtzbC27HLyZ3hsCXo/HSFtnO9s9f98xQBkmS99 -extld=gcc /home/oem/.cache/go-build/3b/3bbe0286166c3f9884876682d4840a5c3fc468c2ff261b75b1a9b41495b1534f-d
[garble] shared cache loaded in 310µs from /tmp/garble-shared1294808897/main-cache.gob
[garble] import path "fmt" hashed with 2b0aca2c7887bf4b179d682d21a237 to "gecJ2mrN8E"
[garble] import path "github.com/goccy/go-json" hashed with d7a82fd38326e06c9158eb33ef6ea3 to "SSpWHag"
[garble] import path "errors" hashed with 8fe41ca625f0a9ade3a2709a4cf4d0 to "exBnSp_"
[garble] import path "internal/fmtsort" hashed with 0eb5f040485c3204a65ac67132bb81 to "oXqll3Oc52"
[garble] import path "io" hashed with 7c7dd75889cc94afb816214d1ecf44 to "unSNhq"
[garble] import path "os" hashed with 37fdf32b67b94083033c520ca04df6 to "a46QeP"
[garble] import path "sort" hashed with bdcab47f36ae0bd0a06295816a8067 to "lT0eMwNYLu2I"
[garble] import path "strconv" hashed with f36d9cd676f7e254fd0483ff175c68 to "uYFTMzThEwh"
[garble] import path "unicode/utf8" hashed with a95efc63db99e7781e9c7c20400443 to "CNCZBR"
[garble] import path "bytes" hashed with 725adc237635d1c9d218e11e78ea7d to "eePMBp7s"
[garble] import path "context" hashed with c5d43558266261b2663d93a6775850 to "yBrbkL1rA"
[garble] import path "encoding/json" hashed with 84caee54baec1cf58e420a2c94b350 to "w6O4UaR"
[garble] import path "github.com/goccy/go-json/internal/decoder" hashed with 9f3b863516f63221d344edef3a2c48 to "eqwycJZMBu"
[garble] import path "github.com/goccy/go-json/internal/encoder" hashed with 341877547486be87375f25a210b88f to "UoyGx0depjG6"
[garble] import path "github.com/goccy/go-json/internal/encoder/vm" hashed with bb1fbc3e05468f31fa623a46e38ea8 to "ERvLIL4yj"
[garble] import path "github.com/goccy/go-json/internal/encoder/vm_color" hashed with 3bde3d0b6f6ee4d13232ee52445443 to "XGqooLtGj3"
[garble] import path "github.com/goccy/go-json/internal/encoder/vm_color_indent" hashed with 6ed6947ca28c0600721933eb87fbd1 to "uuwonO3"
[garble] import path "github.com/goccy/go-json/internal/encoder/vm_indent" hashed with 8ab7736981cdd6eba0219c71053779 to "fhPC2xbe5T"
[garble] import path "github.com/goccy/go-json/internal/errors" hashed with 35ac17ce8ffe19604b43b0d624cc24 to "l7u0Oibl2zu"
[garble] import path "github.com/goccy/go-json/internal/runtime" hashed with 39db503c1ca6a80a03247f4a0f1371 to "ho2Mrpg"
[garble] import path "internal/reflectlite" hashed with b061b44e93a6f36d01f88c86246c05 to "IZzrDZKx5GT_"
[garble] import path "internal/itoa" hashed with 5a2b317269fb041626573dd5326cf6 to "ivuTRaOqYX"
[garble] import path "internal/poll" hashed with 3de27c48031843402426bb9bf66ed4 to "g_l7yXAo"
[garble] import path "internal/safefilepath" hashed with 1929b9046358b8a04362828f6c409f to "x6baw9ptbwB"
[garble] import path "internal/syscall/execenv" hashed with b85ddb4f68e74d8a9aab37234470d9 to "CE__F7"
[garble] import path "internal/syscall/unix" hashed with 954c9f3b1721537b715e5ed3fc66b5 to "X6NVxjo1r5Wo"
[garble] import path "internal/testlog" hashed with 37f685e5f5b4b445daf6be6596979f to "C_GbtBEZ2"
[garble] import path "io/fs" hashed with f034a9dac8a849d66b0b700094a2d8 to "gaAAVN"
[garble] import path "syscall" hashed with 964c930d1a2be85b7aa1aa766fa963 to "bIeVNO"
[garble] import path "time" hashed with 4cd32b0f7feffafe780180e380c9bc to "qzDUIMRknF8"
[garble] import path "internal/unsafeheader" hashed with 029fb8c65f188d488465d3ac0f4431 to "KSs4i8Ya"
[garble] import path "unicode" hashed with 8632b8536b8a6cb426bf91e399e459 to "xBAIa4"
[garble] import path "internal/race" hashed with f641694efb2da3081aed7bf90068b4 to "RzNeVDBuiyOq"
[garble] import path "encoding" hashed with 7f1323351f45e6159f6356cd221dc1 to "d8HGlqCG"
[garble] import path "encoding/base64" hashed with 160c04c2638952679310370dff4c41 to "JkX0GbQJCe"
[garble] import path "strings" hashed with 22c18e508830d3873a0ef128c49a82 to "fX54qJ"
[garble] import path "unicode/utf16" hashed with 382245c6c748e5526c0793cac1b3f0 to "iUnYBewoFClD"
[garble] import path "internal/oserror" hashed with f63eef3fcaf1b8f1c56927c19c096d to "dUgab1lwV"
[garble] import path "path" hashed with c499933cd79c94c0314ce6ecfe03b3 to "wpr6x63bzL4z"
[garble] import path "encoding/binary" hashed with 937ca4e94c557789086e35829121ab to "BqHIgHXU3"
[garble] transformed args for link in 630µs: -o $WORK/b001/exe/a.out -importcfg /tmp/garble-shared1294808897/importcfg586897144 -buildmode=exe -buildid= -extld=gcc -X=runtime.buildVersion=unknown -w -s /home/oem/.cache/go-build/3b/3bbe0286166c3f9884876682d4840a5c3fc468c2ff261b75b1a9b41495b1534f-d
[garble] replaced linker with: /home/oem/.cache/garble/link
UoyGx0depjG6.(*REq7jHL45).fgYpoJgv4Ad: relocation target reflect.(*rtype).ptrTo not defined
UoyGx0depjG6.(*REq7jHL45).jKRgcgu: relocation target reflect.(*rtype).ptrTo not defined
UoyGx0depjG6.(*REq7jHL45).txAmh9HqDx: relocation target reflect.(*rtype).ptrTo not defined
UoyGx0depjG6.(*REq7jHL45).bc8uQXRzu: relocation target reflect.(*rtype).ptrTo not defined
UoyGx0depjG6.(*REq7jHL45).l5Vaa0wq0RJL: relocation target reflect.(*rtype).ptrTo not defined
UoyGx0depjG6.(*REq7jHL45).q4m1MqGHD: relocation target reflect.(*rtype).ptrTo not defined
UoyGx0depjG6.(*REq7jHL45).zJ5wQkyW: relocation target reflect.(*rtype).ptrTo not defined
eqwycJZMBu.pshs69ez48B: relocation target reflect.(*rtype).ptrTo not defined
eqwycJZMBu.hXxNH0V36: relocation target reflect.(*rtype).ptrTo not defined
eqwycJZMBu.hU4CsU: relocation target reflect.(*rtype).ptrTo not defined
eqwycJZMBu.dapVuag37UOH: relocation target reflect.(*rtype).ptrTo not defined
eqwycJZMBu.hkGnN1G: relocation target reflect.(*rtype).ptrTo not defined
exit status 2
exit status 1
@mvdan
Copy link
Member

mvdan commented Feb 3, 2023

Maybe there's been some confusion. This bug is #656, which is fixed in master. We haven't done a new release with the fix yet, so v0.9.1 is still broken. For the time being, you should install garble at its master version via go install mvdan.cc/garble@master, at least until we've released v0.9.2 later today.

@smjure
Copy link
Author

smjure commented Feb 3, 2023

Sorry about that, wasn't aware of the @master option. Yap working now 👍🏻 Also my primary code, I reported on previously, works, but will test different options more. Thank you 🙏🏻

@smjure smjure closed this as completed Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants